bbClasse

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • bbClasse

    Hi,

    jetzt bin ich schon so weit aber so recht will das nicht funktionieren da
    zB. wenn ich farbe und größe angebe geht nur das äußere der beiden
    bbcodes ...

    classe -> class_link

    PHP Code:

    $this->classBBcode->addParser ('htmlspecialchars', array ('block','listitem', 'inline', 'link'));
    $this->classBBcode->addParser ('bbcode_striplastlinebreak', 'listitem');

    $this->classBBcode->addParser ('nl2br', array ('block','listitem', 'inline', 'link'));
    $this->classBBcode->addParser ('bbcode_stripcontents', array ('list'));

    $this->classBBcode->addCode ('list', 'simple_replace', null, array ('<ul style="list-style-type : box">', '</ul>'),
    'list', array ('block', 'listitem'), array ());
    $this->classBBcode->addCode ('*', 'simple_replace', null, array ('<li>', "</li>\n"),
    'listitem', array ('list'), array ());
    $this->classBBcode->setCodeFlag ('*', 'no_close_tag', true);

    # $this->classBBcode->addParser ('htmlspecialchars', array ('block', 'inline', 'link'));
    # $this->classBBcode->addParser ('nl2br', array ('block', 'inline', 'link'));

    $this->classBBcode->addCode ('b', 'simple_replace', null, array ('<b>', '</b>'),
    'inline', array ('block', 'inline', 'link'), array ());
    $this->classBBcode->addCode ('i', 'simple_replace', null, array ('<i>', '</i>'),
    'inline', array ('block', 'inline', 'link'), array ());
    $this->classBBcode->addCode ('u', 'simple_replace', null, array ('<u>', '</u>'),
    'inline', array ('block', 'inline', 'link'), array ());

    $this->classBBcode->addCode ('url', 'usecontent?', 'do_bbcode_url', array ('default'),
    'link', array ('block', 'inline'), array ('link'));

    $this->classBBcode->addCode ('color', 'usecontent', 'do_bbcode_color', array ('default'),
    'block', array ('block', 'inline' ,'link' ,'listitem'), array ());
    $this->classBBcode->addCode ('size', 'usecontent', 'do_bbcode_size', array ('default'),
    'block', array ('block', 'inline' ,'link' ,'listitem'), array ());


    $this->classBBcode->addCode(
    'img',
    'simple_replace',
    null,
    array('<img src="','">'),
    'inline',
    array('block','inline'),
    array()
    );
    $this->classBBcode->addCode(
    'quote',
    'simple_replace',
    null,
    array('<P CLASS="f2 c3 b" style="display:inline">Zitat:<BR></P><P CLASS="f2 c3 b4" >','</P>'),
    'inline',
    array('block','inline'),
    array()
    );
    $this->classBBcode->addCode(
    'code',
    'simple_replace',
    null,
    array('<P CLASS="f2 c3 b" style="display:inline">Code:<BR></P><P CLASS="f2 c3 b4">','</P>'),
    'inline',
    array('block','inline'),
    array()
    );
    $this->classBBcode->addCode(
    'php',
    'simple_replace',
    null,
    array('<P CLASS="f2 c3 b" style="display:inline">PHP-Code:<BR></P><P CLASS="f2 c3 b4">','</P>'),
    'inline',
    array('block','inline'),
    array()
    );

    $text = $this->classBBcode->parse ($text);
    return $text;



    hmm weis aber leider nicht weiter jemand einen Denkanstoss oder
    sieht einen Fehler den ich mache ... die classe die ich verwende ist die
    im ersten Post angegebene ...

    Danke ...

  • #2
    $this->classBBcode->addCode ('inline', 'usecontent', 'do_bbcode_color', array ('default'),
    'block', array ('block', 'inline' ,'link' ,'listitem'), array ());

    Der erste Parameter legt fest, von welchem Typus der BBCode ist. Im vorletzten Parameter legst du fest in welchen Typen dieser Typus interpretiert wird.

    Steht diesbezüglich alles auf der HP die du gepostet hast.

    Kommentar


    • #3
      Bitte immer Code im [ PHP] oder [ Code] Tag posten. Ist mir gerad bei deinen andern Beiträgen aufgefallen..
      PHP Handbuch - MySQL Handbuch - PHP Einsteiger Tutorial - CSS Referenz - Browserunterstützung von CSS

      Kommentar

      Lädt...
      X