Version: 1.00, by Logician
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 09-04-2002
Last Update: Never
Installs: 146
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 (or other board pages), not inside thread view. So visitors will read them without clicking on them.
The Hack's announcements are not static: ie. they can be powerfully programmed to change themselves according to many conditions.
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
user is using style A
his cookies are on
his timeset is set to A
etc..
The conditionals even allows you to design "Board Tips" ever changing according to user's seniority or post number. See how-to document for conditional usage and more info..
It's tested in both v.2.2.6 and v.2.2.7 but it should work with any versions > 2.0.3. (v.2.2.8 or later Users READ HERE!) I'm using it in my own board and a friend's board for more than a month and found it quite stable and released it. Although not likely, if you found any bugs, holler and I'll fix it..
Originally posted by Logician
Did you see my default text correctly when you installed the hack?
And BTW. you should use "Hi $bbuserinfo[username],", not "$bbuserinfo[usergroupid]"
The conditional woorks fine, but I see only
Congratulations $bbuserinfo[username]! You have successfully installed Dynamic Forum Home Announcements Hack Now you can login to your Admin CP/Choose VB settings and configure the announcements you want to set according to different conditions. BTW. This announcement is visible to only Site Admins.. Logician
Originally posted by Wildthinks
The conditional woorks fine, but I see only Congratulations $bbuserinfo[username]!
This is weird.. I have never heard such a complaint before and I can not see a reason which will cause this problem. I dont know what can I suggest for you except checking the installation instructions again to make sure you applied the code correctly. If you cant find anything wrong and still want to use the hack, I can try to debug it in your site if you can give me FTP and Admin CP access to your board.
Originally posted by Mist just an idea Logician... instead of having this done via the "Vbulletin Options" ...
it would be far easier to have a seperate option on the nav bar on the left of the admin cp...
Integrating it to vb settings has an advantage though: Since the settings are already loaded everytime a vb page is called, there is no extra SQL connection that this hacks creates since the announcement is loaded with vb settings. If we seperated it from that section (I mean in db), the hack would add 1 extra SQL query to forum home.
Originally posted by digitalJE5U5 How can I make the box where you edit the code LARGER?
yeah good idea:
Edit admin/options.php find:
PHP Code:
} elseif ($setting[optioncode]=="textarea") {
BEFORE that add:
PHP Code:
// Logician Dynamic Forum Home Announcement Hack
} elseif ($setting[optioncode]=="textarea" AND $setting[varname]=='dynamic_fha') {
echo "<textarea name=\"setting[$setting[settingid]]\" rows=\"30\" cols=\"70\">".htmlspecialchars($setting[value])."</textarea>";
// Logician Dynamic Forum Home Announcement Hack
As I mentioned in the conditional help message , I have discovered a bug in vbulletin while coding this hack. I coded the hack in 2.2.6 and 2.2.7 and report the bug in vbulletin.com. Vbulletin 2.2.8 fixed the bug I reported but I have recently discovered that while fixing the issue, 2.2.8 might also be clashing with my hack since it changed the way you insert texts to vb settings page..
I'm not a 2.2.8 user (yet), so can't provide you with a 100% tested solution, but if you want to use this hack in your board, I believe this should work for you:
Install the hack as mentioned in the instructions. If it does not work as it should be (for example you might see $bbuserinfo[username] instead of your name in the test announcement) then IN STEP 4 use this code instead of the code in the instructions:
PHP Code:
// Logician Dynamic Forum Announcements Hack
$dynamic_fha=strchr($optionstemp['template'],'$dynamic_fha = "');
$dynamic_fha=str_replace('\$', '$', $dynamic_fha);
eval($dynamic_fha);
$dfh_announcement=dynamic_a($dynamic_fha);
// Logician Dynamic Forum Announcements Hack
(Notice the one extra line)
(THIS CODE IS FOR 2.2.8 (OR LATER) USERS, DO NOT APPLY THIS IF YOU ARE USING vb VERSION <2.2.8!)
This should cure the problem and I believe you can use the hack without any problems in your board too.
Originally posted by Logician
Integrating it to vb settings has an advantage though: Since the settings are already loaded everytime a vb page is called, there is no extra SQL connection that this hacks creates since the announcement is loaded with vb settings. If we seperated it from that section (I mean in db), the hack would add 1 extra SQL query to forum home.