The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Get CMS section in plugin code
I am trying to create a Tab for a specific CMS section. For this I am creating a plugin that adds the tab.
My question: How do I check if the curent article belongs to a specific section? Its easy to check that I am in the CMS by using if (THIS_SCRIPT == 'vbcms') but what can I use to check for the category an article belongs to? :erm: |
#2
|
||||
|
||||
I believe you want to look at the parentnodeid. Take a look at the table cms_node
|
#3
|
|||
|
|||
Thanks, but how do I get parentnodeid?
Can I test something like if ($parentnodeid == 3) ? |
#4
|
||||
|
||||
Since I haven't tried this, I can't tell you exactly how to do it. I just know that that is the variable you'll need. If I were to do this, I'd play with a few plugins and see what I could figure out and I'd also look in the code to see what variables are available, and more importantly, what their names are.
|
#5
|
|||
|
|||
I found something called $sectionid but it seems that this variable can not be used when creating a tab plugin using this method: https://vborg.vbsupport.ru/showthread.php?t=226914
|
#6
|
||||
|
||||
As I just wrote in another thread, some templates are rendered at the beginning of the page and so page variables aren't available for use unless you do something in a plugin to make that so beforehand.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|