Version: 1.00, by Logician
Developer Last Online: Nov 2023
Version: 3.0.9
Rating:
Released: 04-20-2004
Last Update: 05-18-2004
Installs: 318
Template Edits
Code Changes
No support by the author.
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:
The announcement is displayed in forum home page, not inside thread view. So visitors will read them on home page without clicking any links.
The Hack's announcements are not static: ie. they can be powerfully programmed to display themselves according to many conditions.
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:
user is X
user's usergroup is Y
his profile field Z is X
user has X posts or has more than Y posts but less than Z posts
his last visit time was X days ago
today is X, hour is between Y and Z, day is wednesday, month is Y, week is month's 2nd week, today is user's birthday
User is invisible/visible
his timeset is set to A
etc.
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.
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
This modification may not be copied, reproduced or published elsewhere without author's permission.
Seems that I get a blank page on index.php (forum not admincp) everytime I make an announcement.
I know you're going to get tired of hearing this, but I'm gonna say it anyway - you missed something important/messed up a step.
Go back to the original versions of the files and do it again line by line. You missed something - a quote, a comma, a ;, something, I guarentee it. Either that or you did the edits with a crappy editor like Notepad which inserted invisible line breaks for you.
I know you're going to get tired of hearing this, but I'm gonna say it anyway - you missed something important/messed up a step.
Go back to the original versions of the files and do it again line by line. You missed something - a quote, a comma, a ;, something, I guarentee it. Either that or you did the edits with a crappy editor like Notepad which inserted invisible line breaks for you.
yes either as ixian said or it is your vb version. As far as I can see you are using "RC" and I haven't tested this hack with vb versions prior to 3.0.0 as I mentioned in the instructions.
Actuall yI forgot to update my user option, I'm using 3.0.0, thanks for reminding me to update that.
As for the editor I used. I have Erwin's vBFTP installed, which comes with a built in editor for php and such. Obviously I used that editor. I'll give it a try again.
Anyone know a simple way to make this work for all pages?
I've made the HTML for a quick registration and it's displayed through the DHTML announcement. It'd be nice to have it enabled on all pages. I don't currently have the time to look at the editing which is why I ask.
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.
Can you make it display both (all) announcements (1+2+3) if user32 is also from usergroupid3? or will you have any plan to make it posible
Quote:
STEP 1 - Edit admincp/options.php,find:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if ($debug)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Replace it as: (Important : there are 2 instances of this line in options.php. Make sure you replace BOTH!)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Logician Hack: Always debug on while adding a setting
$debug=1;
// Logician Hack: Always debug on while adding a setting
if ($debug)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Upload the file into the server NOW. (Important : before you proceed to step 2 make sure you upload hacked options.php in step 1!)
Should we remove these $debug=1 after installation? (upload the original file, maybe?)
Can you make it display both (all) announcements (1+2+3) if user32 is also from usergroupid3? or will you have any plan to make it posible
You can create a conditional for this and put all 3 announcements in it.
eg.
[[($bbuserinfo[userid]==32 AND $bbuserinfo[usergroupid]==3)]] Announcement 1
Announcement 2
Announcement 3
[[/($bbuserinfo[userid]==32 AND $bbuserinfo[usergroupid]==3)]]
Quote:
Originally Posted by mtha
Should we remove these $debug=1 after installation? (upload the original file, maybe?)
It is upto you. It does not hurt if you don't and it does not hurt if you do. But if you want a technical suggestion, I say leave it "hacked", it is better this way if you later decide to add an option to vbsettings. Because the hacked version allows you to make the setting perminent.