The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
vBCMS - Detect articles in section X
Hello
I would like to use some different style/lang for my articles in section for example X than Y, so i need to separate them, the only way i find was the following code and the problem is that i have to writ the $_GET['r'] == x manually for every each article. I believe that there should be a way to detect all articles in section X instant of writing the numbers manually. Any help would be great. Thank you Code:
if (( $_GET['r'] == x OR $_GET['r'] == xx OR $_GET['r'] == xx) && (THIS_SCRIPT == 'vbcms')) { Do somthing } else { Do somthing } |
#2
|
||||
|
||||
PHP Code:
|
#3
|
||||
|
||||
Quote:
https://www.vbulletin.com/forum/show...in-plugin-code |
#4
|
||||
|
||||
What specifically doesn't work? Can you post some sample code, along with which hook you're putting it in, what you expect to see, and what you're seeing?
|
#5
|
||||
|
||||
I have created a plugin with hook location vbcms_article_populate_end and this code:
Code:
global $sectionid; $sectionid = $this->content->getParentId(); Code:
if ($sectionid == x) { ... } else { ... } |
#6
|
||||
|
||||
Whoops! That's not going to work! init_startup is called a little to early. I'd wager $sectionid isn't available either.
I have an idea on how to do this...I'll take another quick look tonight. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|