hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : vBulletin Template Files and PHP
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

vBulletin Template Files and PHP

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-28-2003, 04:01 PM
TAH-Max TAH-Max is offline
Disabled
 
Join Date: Jun 2003
Posts: 104

vBulletin Template Files and PHP


Hi all!

I tried to put PHP code in the footer template for vBulletin and the output is not displayed in the footer. Does anyone have any ideas how to get this to work?

Thanks
Max

Reply With Quote


Sponsored Links
  #2  
Old 06-28-2003, 04:43 PM
FW-Mike FW-Mike is offline
Web Hosting Master
 
Join Date: Aug 2002
Location: Southwest Michigan
Posts: 935
Could you paste the top bit of your code?

Reply With Quote
  #3  
Old 06-28-2003, 04:44 PM
TAH-Max TAH-Max is offline
Disabled
 
Join Date: Jun 2003
Posts: 104
Huh? <?php is the top line

Reply With Quote
Sponsored Links
  #4  
Old 06-28-2003, 05:52 PM
andhosting andhosting is offline
Junior Guru Wannabe
 
Join Date: Jun 2003
Location: Wisconsin
Posts: 35
From vbulletin.org:

Quote:
These are PHP codes, you can not put them directly inside templates unless you dont want them to be displayed as a code. To parse them you have to put them in .php files. Since you are trying to use them inside header/footer, you may try to put them in global.php for instance. Assign their values in the file, then use the variable in your template.

eg. in global.php use:
$users_date=vbdate("h:i",time());

Then in footer use
$users_date

You can also put them into phpinclude template, it's a template which is parsed..
Just change the code in his example to whatever PHP you want to include. Hope that helped.

__________________
Ben McClure
andHosting.com

Reply With Quote
  #5  
Old 06-28-2003, 06:13 PM
TheForumHost TheForumHost is offline
Disabled
 
Join Date: Jun 2003
Posts: 17
*


Last edited by TheForumHost; 06-28-2003 at 08:01 PM.
Reply With Quote
  #6  
Old 06-28-2003, 06:15 PM
TAH-Max TAH-Max is offline
Disabled
 
Join Date: Jun 2003
Posts: 104
Hi

I'm not a PHP guru...actually I don't know much at all about PHP. I'm just using vBulletin with phpAdsNew. I need to put the following in my footer template and am struggling to figure out how to create a variable of it...Can you help?

<?php
if (@include(getenv('DOCUMENT_ROOT').'/ads/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '_blank', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>

Thanks

Reply With Quote
  #7  
Old 06-28-2003, 06:20 PM
TheForumHost TheForumHost is offline
Disabled
 
Join Date: Jun 2003
Posts: 17
you can't do it "raw deal" like that.. vB is very self driven and does not play well with third parties UNLESS it is a hack. check www.vbulletin.org for them. I recommend using Arrow Ads, It is what I use for my vB site that I sell banner space on. I PM'd you earlier about a spnsorship you were looking for, If you decide to pick us as your sponsor, I would be happy to help you install Arrow Ads.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Malwarebytes Launches Data Scan-and-Backup Service Web Hosting News 2013-05-07 14:51:03
Court Documents Show Megaupload Helped Feds Take Down File Sharing Service NinjaVideo Web Hosting News 2012-11-21 10:53:49
Web Host eApps Offers Control Panel ISPmanager for Free Web Hosting News 2011-12-07 21:48:20
Web Host GlowHost Offers Tutorials, Template for Resellers Web Hosting News 2011-11-29 20:44:14
Web Host Hosting Ireland Launches Online Backup Service CloudBox Web Hosting News 2011-09-27 20:00:52


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?