Log in

View Full Version : running a function on a vbcode bit...


soopa
08-12-2003, 08:23 PM
i never really write custom hacks for vbb... but i know php.

i have a function i wrote that i want to run on some text when its encased in a vbCode [tag] on my forum.

where in the vbulletin code should i be looking to make this happen... or is there some triggers i can put in the bbcode table to that vb will know to pass the param to a function?

soopa
08-12-2003, 08:27 PM
so for example

i have a function... say its called myFunc($var)

where is a universally accepted spot in vBB to put custom code bits, or do we just free for all?

so someone goes and posts:


blah blah blah blah text to pass to myFunc blah blah blah


i want to pass the text in [tag] now to $var in myFunc() and return it back to let vBB do whatever it does from there.

so say myFunc just changed the text in $var to "JUNK" i want the post to appear as


blah blah blah blah JUNK blah blah blah

SmEdD
08-12-2003, 09:54 PM
<a href="https://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=1201" target="_blank">http://www.vbulletin.org/hacks/index...ck&hackid=1201</a>

Download that hack and take a look at it and try useing that as a refrence.

soopa
08-13-2003, 02:04 AM
hmm. thx...

seems tho this will just help with adding the bbcode bits... still not sure where to tell vBulletin to process the contents with a PHP function...?

SmEdD
08-13-2003, 02:53 AM
Check in you admin panel ;)

soopa
08-13-2003, 01:21 PM
all i know of in there that applies is the add custom vb code bit... but still... where am I telling this thing to send {param} to a custom PHP function and wait for return?