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.
i upgraded to 3.0.5 and its in my admin panel but its not showing up.
can I get a lil help?
Do you mean admin interface is there but announcements not showing up? Have you reapplied the code changes after you upgraded? Also check if template modifications are also valid. You may lose them if you reverted your templates.
Nice hack but its size is too much. Our forum's speed is slow after we installed this hack. Can you please tell me the easiest way how to uninstall this hack?
I wouldn't suspect this hack as the culprit of the slowness. It has really no performance problems and it is running in hundreds of boards some of which are most largest vbulletin boards with heaviest traffic.
But if you still like to remove it here is how:
a) Delete the codes you added to .php files.
b) Turn debug mode on in your board (https://vborg.vbsupport.ru/showthrea...bug#post504557), then go to vb admin cp/options and remove the hack options by following the new removal links you'll find there.
c) Template modifications are harmless but if you want, you can remove them either by deleting the new templates hack added or deleting the HTML lines you added in existing templates.
It works ok... But just in case, is there any uninstall script to have?
Please see my message above this one.
Quote:
Originally Posted by lanc3lot
Also, what is the "load" of page, that creates
No significient load. It is performance friendly. It just adds a single query to forum home page loads, provided that you installed as it is. However if you change the installation or working of the hack and say applied the announcements in all forum pages (hack of the hack 1), then additional query applies for all vb pages. My recommendation is to run it as it is, ie in main page only.
Quote:
In your first Hack, of the hack, u say: (at the end)
Now put
$dfh_announcement_headercode
$dfh_announcement_popup
$dfh_announcement
variable in any template you like
What do u mean with that? I must do something else, so this will work on every page?
The hack is coded to work only in forum home page. However some users want to display the announcements in different pages or in every vb pages so hack of the hack you mentioned aims to do it. The template you need to modify will change according to the page you like to display the announcement so I can not tell you to "modify template X" in this scenario. It depends on your intention. However for all vb pages, the template to modify will be "header". Hope this helps.
Quote:
Is there any way, i can "change" the background color of the table of the announcement, the color of the text and the font size of the text?
You mean the color and font of popup announcement right?
Edit template "dfh_announcement_popup" and change the section that says "background-color: lime;" for the bg color. And for the font change this section:
Something last...To add more than one announcement, i just write them under the first one?
You can have more than one announcements in the conditional format. But only one of them will be showed to the user (the higher one) where the conditional applies.
Well, I have tried to work out how to get 'Your Paid Subscription expires in X days' to display, but can't for the life of me think of what the variable might be to call.
Please, oh great Logician, tell me if this is even possible.
Unfortunately this can't be done with this hack because this info is not valid in vb code until you specificially query the db to get it.
Ex. Message would show up only on Monday through Friday from 9am-5pm ?
yes possible.
PHP Code:
[[((date("w")>=1 AND date("w")<=5) AND (date("H")>=9 AND date("H")<21))]]
Day is now between monday to friday and hour is between 9.00 AM to 8.59 PM
[[/((date("w")>=1 AND date("w")<=5) AND (date("H")>=9 AND date("H")<21))]]