PDA

View Full Version : Creating an advanced BBCode


ralle89
06-14-2006, 04:51 PM
Hello!
I own a website where I am making a code highlighting system like the php highlighting system so now I want to make a bbcode for it so I say somecode which the bbcode system then will parse. I cant use the standard custom bbcode system for this. so how do I add a new one?

ralle89
06-17-2006, 06:06 PM
sry for bumping but can anyone answer my question?

Christine
06-17-2006, 09:36 PM
The bbcode system basically replaces html. For example, doing a spoiler box -- it sets the opening and closing of the table with the content in the middle.

I am not sure what you mean by "parsing highlighting"?

Tralala
06-17-2006, 10:21 PM
Can there be a conditional in the HTML replacement?

Something like, "if the browser is MSIE, use this.
If the browser is Firefox, use that."

I'd love to see an example of code that could do that.

ralle89
01-29-2007, 07:08 PM
have you ever seen the [highlight] mod for vbulletin? well I don't understand the source of it, but I am making something similiar to that.
I don't know which hook to use when wanting to modulate the text..

I have seem something in the source saying
// [PHP]
$tag_list['no_option']['php'] = array(
'callback' => 'handle_bbcode_php',
'strip_empty' => true,
'stop_parse' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 1
);
SO I would like to make something similiar to that.. But I dunno what to set these values to. if we said my function was called highlight_kralimut().

And I want to do this with hooks and plugins