View Full Version : Php in custom BB code ?
losedude
07-04-2008, 01:52 PM
Well, I have a friend that's a coder, he doesn't know a lot about vBulletin but I've asked him to make me a script so that when a BB code is used, a script will be activated (PHP) and it'll run it when the BB code is used.
However I've been unable to find a way to do this and after talking to vBulletin staff they said that custom modifications / hacks would have to be made.
Does anyone have an idea on which files need editing ? This would be very helpful =)
Antivirus
07-04-2008, 05:32 PM
It really depends upon what you want to do. Your question is very vague, and without an explaination of exactly what ypu,re looking to do it's quite difficult for anyone to offer advice on the matter :)
Opserty
07-04-2008, 08:07 PM
There should be hooks which you can create plugins for in the vB_BbCodeParser (http://members.vbulletin.com/api/vBulletin/vB_BbCodeParser.html) class.
losedude
07-05-2008, 07:11 AM
Well I have a url.. on my site, say :
http://mysite.com/asdasd
This url is a free hosting URL that allows people to download files as long as they wait 60 seconds.. write the captcha code and then they get a download link.. , however when this is put on my site with the BB code
http://mysite.com/asdasd I want it to give the direct URL to the file (That's normally not given.., for this I have a script that'll generate that for me) , as I have to generate a new URL everytime the page is loaded as the URL expires etc. This of course will only happen for certain files and only certain users would be able to see this..
Thanks for your help :)
Marco van Herwaarden
07-05-2008, 08:16 AM
A BB-code does not really sound like the best approach for this, as posts are pre-parsed and cached on the first view. In order to do it like this you will probably need to turn off the post caching and this would have a negative impact on performence.
losedude
07-05-2008, 10:45 AM
Is there a way to turn post caching off for only one category ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.