PDA

View Full Version : Plug in


James Birkett
06-24-2009, 12:07 PM
Before it is mentioned - I realise how seriously unsecure this is but I will take the necessary precautions.

I was hoping to create a plug in using the bbcode_fetch_tags which parses PHP script in the bbcode tags. I wanted to use this for such pranks like
echo "$_SERVER['REMOTE_ADDR']"
I realise a lot of you probably feel like this is pointless or whatever but i'd like to create this.

How would I go about creating the bbcode tags and hooking it to the plug in?

Dismounted
06-25-2009, 05:38 AM
The example will not work with the standard BB code system, as posts are fully parsed, then cached for X amount of time. You are better off doing an eval() at a plugin at postbit_display_complete.

I can't stress enough how dangerous this is!

James Birkett
06-25-2009, 02:55 PM
Does the eval() function parse the PHP as it is displayed? Thus displaying all PHP codes as it is parsed?

Also, how would I call the input using eval(), I am not familiar with vBulletin's global variables.

Dismounted
06-26-2009, 06:24 AM
<a href="http://www.php.net/manual/en/function.eval.php" target="_blank">http://www.php.net/manual/en/function.eval.php</a>

James Birkett
06-27-2009, 06:57 PM
I have tried reading and understanding the use of eval(), with no success.
Could anyone help me implement this into my vBulletin?

Andreas
06-28-2009, 07:58 AM
Honestly, if you don't understand how PHP (or specifically eval()) does work you should not code such an Add-on (in fact nobody should anyway).