vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   <?php in 'description' under forum manager? (https://vborg.vbsupport.ru/showthread.php?t=256244)

karlm 12-31-2010 07:32 AM

<?php in 'description' under forum manager?
 
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

Quote:

Originally Posted by Lynne (Post 2141972)
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

Quote:

Originally Posted by karlm (Post 2143114)
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:
Code:

$foruminfo['description'] .= 'your custom code';


All times are GMT. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00970 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete