News:

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

Main Menu

How can i create this?

Started by gijsmin, April 26, 2009, 01:45:11 PM

Previous topic - Next topic

gijsmin

hey all

there is a script language named: Pawn and i want tags for it like [pawn][/pawn]
it is just the same as [php'][/php'] how can i create a tag if i type: [pawn]code here[/pawn]
then i see a code like

code here with the colors of [php][/php]

Marcus Forsberg

Hello.

BBC's are located in ./Sources/Subs.php.

gijsmin


Marcus Forsberg

You'll need some basic PHP knowledge.

Have a look at function parse_bbc() in ./Sources/Subs.php, the $codes array.
Look at how [code] and [php] are done.

gijsmin

Thanks i see but i have a problem
i don't want the Blue Text :S
like this:

public hello(something[])

But then i want:

public hello(something[])

How can i do that ?

perplexed

there is a custom bbc mod available, you could install that and use it to create your own bbcode

Rumbaar

So you don't want it to be exactly the same as the PHP BBCodes.  You'll need to alter/create a replacement to the function highlight_php_code($code) (also found in $source/Subs.php) used by the PHP BBCode that formats the contents of the data.

Be mindful that function is also used in the CODE BBCode as well, if you are going to alter it directly.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

N3RVE

Are there any further concerns regarding this topic?

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Advertisement: