PDA

View Full Version : Notification trigger by php page


WTFKarateMonkey
06-28-2013, 09:29 PM
I would like to add a new trigger to the notification system and I'm not sure how to do it. I'm on VB 4.2.1.

I will have a notice that is triggered by the built in "not a member of xxxx usegroup" but I need to make a new trigger to go with it that says "is viewing the page xxx.php.

The php file is the index of a modification.

kh99
06-28-2013, 09:49 PM
Are you talking about the Notification drop-down where unread PMs show up, or Notices?

WTFKarateMonkey
06-29-2013, 02:47 AM
Notices, hence the triggers. You find them in the Admin CP and it allows you to set messages. For example "display this" if "user is guest or not logged in". Most common example being the notice asking guests to register.

kh99
06-29-2013, 08:41 AM
OK, well there's this mod that adds some triggers: https://vborg.vbsupport.ru/showthread.php?t=277022 . One of them is "THIS_SCRIPT value is..." which is just about the same as "is viewing the page xxx.php" except that the value doesn't have .php on the end (and sometimes it's not the same as the script name). You can find out the THIS_SCRIPT value for xxx.php by looking at the code, and near the top there should be something like:
define('THIS_SCRIPT', 'register');


or you can ask here.

ETA: I almost forgot, "register" is the one value that doesn't work because there's a condition in the navbar template that stops any notices. You can take out the condition of you want (See Note #2 in the mod description).

WTFKarateMonkey
06-30-2013, 02:35 PM
Thanks I will check that out