PDA

View Full Version : Navbar notices


Razasharp
Tue 18th Dec '07, 12:49am
Is there anyway we can call plug-in data into these?

For eg, have a plug-in at global start and then put $results (from that plug-in) in the navbar notice?

I just tried it and it doesn't work (I can put $results in the header template and it works fine tho) - is there any reason why this is disabled/wasn't included?

It would make the navbar notices really powerful if we could do this, and it could save a tonne of <if> statements in the templates.

Is there anyway I can get this to work?

Cheers,

Edit: Actually the more I think about it the more I think we need the navbar notices to be like templates - i.e. where we can put tables, divs, images, ads etc etc

Wayne Luke
Tue 18th Dec '07, 8:52am
Your plugin would have to be hooked to notices_check_criteria instead of global start. You can see this hook in includes/functions_notice.php. You can use HTML in individual notices as well.

Razasharp
Tue 18th Dec '07, 9:23am
Hi Wayne, thanks for replying - and glad we can use HTML :D

Unfortunately the plug-in still doesn't work :-(

I changed the plug-in hook to notices_check_criteria, and now all I get in the notice is: $latestthreads (whereas in the header template that actually shows the latest 10 threads).

I must be doing something wrong... any ideas?

Shall I PM you the code I am using and you can see where I am going wrong? (Can't post it here as it is not my code).

Kerry-Anne
Tue 18th Dec '07, 10:06am
You will need to contact the author of the modification that you are using for support.

Razasharp
Tue 18th Dec '07, 10:19am
I am trying to understand how part of vBulletin works (the plug-in system in relation to the notices), hence posting my question here.

Namaless
Tue 25th Dec '07, 1:15pm
I have the same problem. I want pass one or more variables from plugin system to notice system for parsing to {variable}.

Where I possible to read how work notice system?

I have tested also with php code, but not work..

Thanks for support.

Best regards.

Namaless
Tue 25th Dec '07, 8:10pm
I found the solution:
Create new plugin and use "notices_noticebit" hooks.
For code use this syntax

$text = "This is a test of plugin system for notices system";

// Parse text to notice system
$notice_html = str_replace('{text}', $text, $notice_html);


Now you able to use "{text}" in notice system and works perfectly.