PDA

View Full Version : <?php in 'description' under forum manager?


karlm
12-31-2010, 07:32 AM
I am versed in adding HTML to the 'description' field under the forum manager for specific forums, for example to allow me to draw attention to a specific forum of interest by adding <b>bold</b> or even <img src="abc"> and so on.

However, I would like know if I can use php in there too? If not... why not?

I have a simple ad rotator and would like to put some links to books of interest under the forum for 'mens health', but have them rotate every refresh. I have the script and have added the necessary require_once added to the forumdisplay.php file. However, the intended outcome is not possible as it doesn't appear to be reading the php code to randomly select data from the source file.

Any help always appreciated.

Lynne
12-31-2010, 06:14 PM
You'll have to put the php in a plugin and then find a way to insert it where the description goes in the template (maybe there is a template_hook?).

karlm
01-03-2011, 05:42 AM
You'll have to put the php in a plugin and then find a way to insert it where the description goes in the template (maybe there is a template_hook?).
Thanks Lynne, I appreciate the gentle hints you're proffering, but they're meaningless to me - I don't understand what a hook is, how it works or anything - I get html and the basics of php, but that's my limit.

So.. could you perhaps offer a smidgen more information?

TheLastSuperman
01-03-2011, 06:16 AM
Thanks Lynne, I appreciate the gentle hints you're proffering, but they're meaningless to me - I don't understand what a hook is, how it works or anything - I get html and the basics of php, but that's my limit.

So.. could you perhaps offer a smidgen more information?

Try this link:
https://vborg.vbsupport.ru/showthread.php?t=242454

Then once your ready for more info visit this link:
https://vborg.vbsupport.ru/forumdisplay.php?f=242

Hope that helps :D

Yellow Slider
01-04-2011, 04:06 PM
You can go to the acp and create a new plugin (hook location: forumdisplay_complete).
If you want to add a certain code at the bottom of the description of all forums, you would do something like this:
$foruminfo['description'] .= 'your custom code';