The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Can't get $notifications_total variable.
Hello guys.
I am trying to edit "Cyb - PM System Enhancements" and add some part to it via the $notifications_total, but it seems that it's not working at all. My code is below: PHP Code:
Thank you! |
#2
|
||||
|
||||
You need to make sure that $notifications_total has already been defined before you go use it in a plugin. So, you need to pick your plugin hook location to be after the variable is defined. Go find it in the code and then look at where your plugin is location and figure out if it's before or after the variable was defined and move it if necessary.
|
#3
|
|||
|
|||
Quote:
Can you simplify it for me? Thank you! |
#4
|
||||
|
||||
Hmmm, I don't know that I can simplify that much. Basically, you are trying to use a variable, $notifications_total, which is probably not defined. It's like doing algebra - you can do this:
Code:
a=1 b=2 what is a+b Code:
b=2 what is a+b You need to make sure $notifications_total is defined before you can go use it in an 'equation'. |
#5
|
|||
|
|||
Quote:
|
#6
|
||||
|
||||
I'm sorry, I thought you were originally saying that $notifications_total was the problem (someone else had a similar problem recently), but I guess that isn't it. I must admit that I don't understand what you are trying to do here. I don't know what hook location you are using nor what output you are trying to achieve. Maybe an image would help out?
|
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
Well, I'll post the code I use on one of my mods to put in an extra line in the Notifications box and you can change it for your own needs.
location - notifications_list PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|