The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals Details »» | |||||||||||||||||||||||||||
Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals
Developer Last Online: Nov 2023
This hack allows you to post powerful dynamic announcements (changing according to different conditions) on forum home page. It differs from vbulletin's default announcements in 2 ways:
This hack is the VB3 version of my Dynamic Forum Home Announcement Hack and it is a bit more improved in that it is now able to display your announcement as it was before AND also in DHTML popup box as well which ever you prefer better or even both. (DHTML poupup announcement is not technically a popup so popup killers can not kill it either.) Basic Usage : You can set a text in your Admin CP and it's displayed in forum home to all users. Advanced Usage : With conditionals you can set different texts/notifications/messages/announcements and they will be displayed if your pre-configured condition applies. This allows you to create powerful announcements/private messages/texts which address their receipt only if a certain condition is met. Some examples: You can set to show an announcement in forum home IF:
It's tested in vb versions from v.3.0.0 to 3.0.9 and works fine with all of them. It will work for all future 3.0.x versions too. For vb2 version click here. Here is a Screenshot from a general table announcement. Here is a Screenshot from a popup announcement. Some Features:
If you install the hack, click INSTALL, thank you.. Hacks of the hack: * Hack 1: Puts the announcement into header instead of forum home page so that announcement appears in all forum pages. * Hack 2: Integrates announcement with vBA_CMPS portal hack. * Hack 3: Popup announcement will popup once in every XX hours. Logician \\=^)) Show Your Support
|
Comments |
#2
|
||||
|
||||
How To Use - Conditionals Help
After you installed the hack: Basic Usage: If you want to display an announcement to ALL users, simply login to Admin CP/Choose VB Settings/Dynamic Forum Announcements and enter your announcement as a plain text into the box. You can use smilies and all other bbcode in your announcements. This text will be dragged to your forum home regardless of whoever the page visitor is. You can use the poup box if you want to display the annnoucement as popup and the other box if in a table in forum home. Advanced Usage: You can use "conditionals" to set announcements displayed if a certain condition applies. If you are using my WebTemplates Hack , you should be already familiar with the term "conditional". In Webtemplates conditionals could be used to put different texts/HTML codes which will be parsed if certain condition appied in your non-vb pages. It's the same concept and their usage is same. Here is its format: [[(your conditional)]] Your Announcement [[/(your conditional)]] Conditional Rules:
* [[($bbuserinfo[userid]==32)]] Show this announcement if page visitor's user id is 32 [[/($bbuserinfo[userid]==32)]] * [[($bbuserinfo[usergroupid]==5)]] Show this announcement if page visitor's usergroupid is 5 (=if he is a Super Mod) [[/($bbuserinfo[usergroupid]==5)]] * [[($bbuserinfo[usergroupid]==1)]] Show this announcement if page visitor is a guest [[/($bbuserinfo[usergroupid]==1)]] * [[($bbuserinfo[userid]>1)]] Show this announcement if page visitor is NOT a guest [[/($bbuserinfo[userid]>1)]] * [[($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]] Show this announcement if page visitor's a Super Mod OR a Mod OR an Admin [[/($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]] * [[($bbuserinfo[posts]<10)]] Show this announcement if page visitor has less than 10 posts [[/($bbuserinfo[posts]<10)]] * [[($bbuserinfo[lastvisit] and $bbuserinfo[lastvisit]<strtotime(-30 days))]]Show this announcement if page visitor has not visited your board for 30 days[[/($bbuserinfo[lastvisit] and $bbuserinfo[lastvisit]<strtotime(-30 days))]] * [[($bbuserinfo[joindate]>strtotime("-2 weeks") AND $bbuserinfo[joindate]<strtotime("-4 weeks"))]]Show this announcement if page visitor registered in a date between 2 weeks to 4 weeks from now[[/($bbuserinfo[joindate]>strtotime("-2 weeks") AND $bbuserinfo[joindate]<strtotime("-4 weeks"))]] You can use conditionals together too. Here is an example: -=-=-=-=-=-=-=-=-=-=-=-=-=-= [[($bbuserinfo[userid]==32)]] Announcement 1 [[/($bbuserinfo[userid]==32)]] [[($bbuserinfo[usergroupid]==3)]] Announcement 2 [[/($bbuserinfo[usergroupid]==3)]] Announcement 3 -=-=-=-=-=-=-=-=-=-=-=-=-=-= If you set this text as your announcement, the hack will: Show Announcement 1, if user's userid = 32 Show Announcement 2, if user's usergroupid = 3 (=email confirmation waiting members) show Announcement 3, For ALL other users What if user 32 is also from user groupid 3? He will be displayed Announcement 1 because even if he matches both conditional 1 and conditional 2, conditional 1 (which is above) has a higher priority. Hope this document helps you to understand the term conditional. Needless to say my hack's conditional syntax is different than vb3's default conditional syntax and this is because I use my syntax for a long time (before vb3 was up). If you need more help to design a "conditional", before asking me please read this document carefully for a few times, try to form it by yourself and if they all fail, ask in the hack's thread giving details about exactly what conditional you tried to form and what text (format) have you tried (and failed). You are welcomed to ask them in thread but my apologies in advance if I'm too busy to answer all questions. Thank you. |
#3
|
|||
|
|||
sounds good logician - i used the one on vb2 so will be using this as well
[high]* lasto clicks install [/high] |
#4
|
||||
|
||||
This will totally help me out! Thank you! Will install tonight.
EDIT: I was reading over the txt file, and it says add 4 new templates... I only see 3 there. o.o; announcement, announcement_headercode, and announcement_popup. Or did I miss something. |
#5
|
||||
|
||||
Quote:
|
#6
|
||||
|
||||
wow complex hack Will definitely give it a closer look!
|
#7
|
||||
|
||||
Quote:
To put it in a more simple way I can tell it this way: If you put a text inside the box 1 in this admin cp settings, this text appears in your forum home like this. If you enter a text in the second box, then it appears like this. |
#8
|
||||
|
||||
I tried out an ! conditional. Say for example I use "[[($bbuserinfo[usergroupid]!==6)]]", the message tries to load (if you're usergroup 6) but cannot (works for everyone else of course). I get a perpetual browser alert saying about 'transferring data from domain.com'.
Also, I suppose we can use multi-conditionals for one announcement like [[($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)]]? Tests... |
#9
|
||||
|
||||
mod screenshots seems quit impressive
i will TRY this for sure. thnx for nice HACK.. |
#10
|
||||
|
||||
Tested it. Multi conditionals DO work... at least for two. Doesn't seem to want to work for three when I use the NOT condition.
Example of what I'm trying to do; [[($bbuserinfo[usergroupid]!==8 || $bbuserinfo[usergroupid]!==13 || $bbuserinfo[userid]!==1)]]For people not userid 1 or usergroups 8 or 13[[/($bbuserinfo[usergroupid]!==8 || $bbuserinfo[usergroupid]!==13 || $bbuserinfo[userid]!==1)]] |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|