The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Global.php variables? (trying to call foruminfo)
I'm trying to use this mod on my forums, however I ONLY want it to apply to one specific sub-forum. Currently the mod works by applying this code at the top of the global.php file..
if(file_exists('dnp_fw.php')){require_once('dnp_fw .php');} How do I make it so that it only calls that script if the user is inside of a specific subforum? Right now I'm trying to use the below code but it's not working, I assume it's because the global.php file doesn't have access to these variables? What do I use instead? if ($foruminfo[forumid]==XX) { if(file_exists('dnp_fw.php')){require_once('dnp_fw .php');} } |
#2
|
||||
|
||||
The mod had you modify the global.php file? You need to look at the code around it and see what variables are used there and if that code is valid there.
You need to ask questions regarding mods in the mod threads. We know nothing about the mods out here in the main forums. |
#3
|
|||
|
|||
The Author hasn't been online in a few months so I have to figure it out on my own.
Besides, this question isn't neccessarily specific to that particular mod, I just want to know what code to insert into global.php that would allow me to have a script that only applied to a specific subforum. I'm pretty sure this can be done. I can do it inside of templates but the conditionals don't work in PHP files. What are the mirror conditionals for vBulletin .php files? That's what I'm asking here. |
#4
|
|||
|
|||
At the top of global.php there's a call to clean_array_gpc, I think if you put your code under that you could use $vbulletin->GPC['forumid']. But I guess that only works if a forum was somehow specified. Looking lower down in global.php it looks like if a threadid is specified it gets the forumid from the threadinfo, so you may have to put your code under that to make it work. I guess that could be a problem, if that code's supposed it be inserted at the top of the file (instead of at a hook location) then there's probably a reason.
|
#5
|
||||
|
||||
From the mod description:
Quote:
|
#6
|
|||
|
|||
Quote:
I have ONE sub-forum that has issues with automated post-bots, they cause MySQL to over-load several times a day. Having this script working in only that forum and not the entire site would be useful for me. So yes it would do me good to run it in only one forum. Since I couldn't get this to work, with the help of kh99 (this guy is awesome), I have instead installed CAPTCHA in the particular forum that was causing issues. It doesn't work as well in reducing the server load since the bots still hit the forum but it's better than nothing. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|