View Full Version : Using php in styles to access my own db
gregr328
03-19-2009, 03:18 AM
I'm trying to add a few lines of php to an Ad Location style to pull some code out of a table in my mySQL db and echo it. Does anybody know the right syntax for this? Standard code doesn't seem to be working for me. Thanks.
-Greg
nexialys
03-19-2009, 04:33 AM
on top of this page, you see a tab called "Articles"... you will see there how to integrate your codes to vBulletin.
TigerC10
03-19-2009, 04:44 AM
The style manager limits which PHP functions can be called in templates to:
in_array
is_array
is_numeric
isset
empty
defined
array
can_moderate*
can_moderate_calendar*
exec_switch_bg*
is_browser*
is_member_of*
Note:
Functions marked * are custom functions defined by vBulletin itself. Each function name is a link that will take you to the documentation for that function. Use of these functions requires knowledge of PHP
http://www.vbulletin.com/docs/html/functions_in_conditionals
What you need to do is write a plugin, then define a variable and output the variable in your template.
Marco van Herwaarden
03-19-2009, 08:58 AM
Including External Files (http://www.vbulletin.com/docs/html/main/templates_externalfiles)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.