vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding PHP to templates (https://vborg.vbsupport.ru/showthread.php?t=160763)

clarke_kent 10-21-2007 06:01 PM

Adding PHP to templates
 
I would like to add my own custom php code to the vbulletin templates.

I have modified the templates to give me a column on the left hand side. I would like to place my own code in here to display information from a DB not associated with Vbulletin.
This code will display for example a list of links stored in a DB, images stored in a DB etc....

In terms of php coding I am fine, but am unsure where to even start to add it to the templates.

Could anyone point me to a tutorial or provide some insight where to start? I have searched for several hours and come up with nothing useful.

Cheers

Marco van Herwaarden 10-22-2007 04:36 AM

You can not use PHP in templates, they are HTML only.

You will need to create a plugin and assign the output of your PHP code to a variable. The variable can be used in the template.

Marc.F 10-22-2007 09:06 PM

Have a look here: http://www.vbulletin.com/docs/html/t..._externalfiles. I found this really helpful.

testebr 10-22-2007 09:31 PM

Let PHP Live! (Allow PHP code in templates)

https://vborg.vbsupport.ru/showthread.php?t=124094

Dismounted 10-23-2007 05:48 AM

That's not really a good idea.


All times are GMT. The time now is 06:15 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.02462 seconds
  • Memory Usage 1,711KB
  • 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)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