Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals Details »»
Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals
Version: 1.00, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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:
  1. user is X
  2. user's usergroup is Y
  3. his profile field Z is X
  4. user has X posts or has more than Y posts but less than Z posts
  5. his last visit time was X days ago
  6. 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
  7. User is invisible/visible
  8. user is using style A
  9. his cookies are on
  10. his timeset is set to A
  11. 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..

Here is a Screenshot from a "general announcement".
Here is a Screenshot of announcement which is addressed to a certain user.

Some Features:
  • It's Admin CP integrated (Screenshot)
  • Smiley and BBCode in announcements are parsed
  • You can address your users with their usernames inside announcements (Use $bbuserinfo[username] variable)
  • Announcements are displayed directly in Forum Home so users are forced to read them.
  • The Conditionals help you to design powerful and ever changing announcements/private messages/forum home notifications.


If you have problems displaying HTML/smilie/bbcode in your announcements, make this tiny change in hack code

If you install the hack, click INSTALL, thank you..

Logician \\=^))

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 10-10-2002, 02:13 PM
Dan Flynn's Avatar
Dan Flynn Dan Flynn is offline
 
Join Date: Nov 2001
Location: Crown Point, IN
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks this is sweet. Your hacks are always useful and great!
Reply With Quote
  #73  
Old 10-10-2002, 03:51 PM
Wildthinks's Avatar
Wildthinks Wildthinks is offline
 
Join Date: Apr 2002
Location: .:BeRLiN:.
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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

:-/
Reply With Quote
  #74  
Old 10-10-2002, 04:33 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.

Sorry Tom, this is all I can do at the moment..
Reply With Quote
  #75  
Old 10-10-2002, 05:30 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...

- miSt
Reply With Quote
  #76  
Old 10-10-2002, 06:31 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #77  
Old 10-11-2002, 07:34 AM
digitalJE5U5 digitalJE5U5 is offline
 
Join Date: Sep 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Man I love this thing! It's so sweet!

One small thing.

How can I make the box where you edit the code LARGER?

It's a real hassle trying to type in a lot of code into this tiny box, and if I write the code in notepad, it really screws up the formatting.

Great work, though.

/DJ
Reply With Quote
  #78  
Old 10-11-2002, 05:05 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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 
Now it becomes like this:
Reply With Quote
  #79  
Old 10-11-2002, 09:34 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IMPORTANT NOTICE FOR V.2.2.8 (OR LATER) USERS:

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.

Enjoy..
Reply With Quote
  #80  
Old 10-12-2002, 03:03 PM
Wildthinks's Avatar
Wildthinks Wildthinks is offline
 
Join Date: Apr 2002
Location: .:BeRLiN:.
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BIG BIG BIG THX.... for your help

:laugh: :banana: :laugh:
Reply With Quote
  #81  
Old 10-16-2002, 03:53 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
lol always one step ahead of us

- miSt
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04790 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete