News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Highlighted BBcode

Started by Pandabeer, April 29, 2009, 05:51:18 AM

Previous topic - Next topic

Pandabeer

Hey,

i want to make a highlighted BBCode like [!PHP][!/PHP] but than other things highlighted.
How can i make that ? please answer me :D

H

Edit the bbcode section of Subs.php. You'll need to know php
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Pandabeer

Quote from: H on April 29, 2009, 09:57:04 AM
Edit the bbcode section of Subs.php. You'll need to know php

yes, but where is the list of things that are being highlighted (for [!php])

H

From Subs.php

array(
'tag' => 'php',
'type' => 'unparsed_content',
'content' => '<div class="phpcode">$1</div>',
'validate' => isset($disabled['php']) ? null : create_function('&$tag, &$data, $disabled', '
if (!isset($disabled[\'php\']))
{
$add_begin = substr(trim($data), 0, 5) != \'&lt;?\';
$data = highlight_php_code($add_begin ? \'&lt;?php \' . $data . \'?&gt;\' : $data);
if ($add_begin)
$data = preg_replace(array(\'~^(.+?)&lt;\?.{0,40}?php(&nbsp;|\s)~\', \'~\?&gt;((?:</(font|span)>)*)$~\'), \'$1\', $data, 2);
}'),
'block_level' => true,
'disabled_content' => '$1',
),


http://support.simplemachines.org/function_db/index.php?action=view_function;id=221
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Advertisement: