![]() |
Will my code break vBulletin?
Hi,
I want to use phpAdsNew with vBulletin (I saw the existing hack already but it isn't what I'm looking for). All my banners for the forums will be in one zone in phpMyAdsNew with keywords associated with them. keyword forumx means the banner can be displayed in the forum with ID x and forumhome means it can be displayed on the home page. So, I need to get vbulletin to return a list of all the forums that the page is currently in (the current forum and all the parent ones). So, I hacked vBulletin to do that and I'm wondering if anything I did will make it break. Here is my code In global.php I replaced every occurence of the query Code:
SELECT forum.forumid,styleid,styleoverride FROM forum,thread WHERE forum.forumid=thread.forumid AND threadid='$threadid' Code:
SELECT forum.forumid,styleid,styleoverride,forum.parentlist FROM forum,thread WHERE forum.forumid=thread.forumid AND threadid='$threadid' Code:
if (isset($pollid) and !isset($codestyleid)) { That's all for that file. In index.php, right before "require('./global.php'); I added the following line Code:
$adkeyword = "forumhome,"; Code:
global $adkeyword; Code:
while ($var=$DB_site->fetch_array($vars)) { Well, I'm wondering if any of this code will make any of the normal vBulletin stuff break. It's just the modified query that is worrying me but all my tests show that it is working correctly. Do you guys know of any problems right off of the top of your heads? Thanks, carl http://www.djforums.com/ |
No, it will not break your vbulletin.
You might want to add this to remove the last comma: $adkeyword substr($adkeyword,0,-1); And you might also want to add a new replacement variable through the cp named {adkeywords} and add $adkeyword as the replacement, instead of actually hacking vbulletin to do that... |
All times are GMT. The time now is 08:08 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|