Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 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: 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:
  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. his timeset is set to A
  9. 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.

Here is a Screenshot from a general table announcement.
Here is a Screenshot from a popup announcement.

Some Features:
  • It's Admin CP integrated (Screenshot)
  • Smiley, BBCode, HTML, IMG tags are supported in announcements.
  • 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.
  • Poupup announcement can not be killed by popup killer software

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

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

Comments
  #82  
Old 05-21-2004, 02:42 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working like a charm.. Thanks Logician

I even installed it incorrectly and it still worked..
Originally, I only added $debug=1; once.. It was only after reading the file for a second time that I noticed I should have added it twice. I've corrected this now, but everything still worked doing it just the once.!
Reply With Quote
  #83  
Old 05-21-2004, 06:45 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 Oblivion Knight
I even installed it incorrectly and it still worked..
Originally, I only added $debug=1; once.. It was only after reading the file for a second time that I noticed I should have added it twice. I've corrected this now, but everything still worked doing it just the once.!
If your forget to apply step 1 correctly before installing step 2, the hack can stop running when you update your forum. If hack options disappear when you update your forum, now you know why. In this scenario apply step 1 and 2 again when this happens.
Reply With Quote
  #84  
Old 05-22-2004, 01:03 AM
brandy's Avatar
brandy brandy is offline
 
Join Date: Mar 2004
Location: Florida
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, what I'm trying to do is this:

Registered Users are group ID: 2
Paid Subscribers are group IDs: 10, 11, & 12

All Paid Subscribers' primary usergroup is 2.
Paid Subscriber's secondary usergroups are either 10,11, or 12.

I want the following announcement to show up for paid subscribers only, but paid subscribers do not see any announcement.

Code:
[[($bbuserinfo[usergroupid]==10 OR $bbuserinfo[usergroupid]==11 OR $bbuserinfo[usergroupid]==12)]]
Welcome $bbuserinfo[username]! Thank you for being a Contributing Member! :)
<br> If you do not see an icon before your name, <a href="profile.php?do=editusergroups">Click Here</a> to choose to be recognized as a contributing member.
[[/($bbuserinfo[usergroupid]==10 OR $bbuserinfo[usergroupid]==11 OR $bbuserinfo[usergroupid]==12)]]
If I include group ID 2 in the above syntax, then registered users see the above message even if they haven't paid anything.

Any suggestions?

Thanks,
Brandy
Reply With Quote
  #85  
Old 05-22-2004, 09:13 AM
idwf's Avatar
idwf idwf is offline
 
Join Date: Jun 2003
Location: England
Posts: 413
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey there. i follwoed the steps with now problems atall, however, when i got to the AdminCP, Options, and put in my message 'Tester : im testing to see if this appears' i could't see anything :S

what have i done wrong?!
Reply With Quote
  #86  
Old 05-22-2004, 04:58 PM
brandy's Avatar
brandy brandy is offline
 
Join Date: Mar 2004
Location: Florida
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by brandy
Hi, what I'm trying to do is this:

Registered Users are group ID: 2
Paid Subscribers are group IDs: 10, 11, & 12

All Paid Subscribers' primary usergroup is 2.
Paid Subscriber's secondary usergroups are either 10,11, or 12.

I want the following announcement to show up for paid subscribers only, but paid subscribers do not see any announcement.

Code:
[[($bbuserinfo[usergroupid]==10 OR $bbuserinfo[usergroupid]==11 OR $bbuserinfo[usergroupid]==12)]]
Welcome $bbuserinfo[username]! Thank you for being a Contributing Member! :)
<br> If you do not see an icon before your name, <a href="profile.php?do=editusergroups">Click Here</a> to choose to be recognized as a contributing member.
[[/($bbuserinfo[usergroupid]==10 OR $bbuserinfo[usergroupid]==11 OR $bbuserinfo[usergroupid]==12)]]
If I include group ID 2 in the above syntax, then registered users see the above message even if they haven't paid anything.

Any suggestions?

Thanks,
Brandy
OK, I've tried a variety of different things and I think I've figured out the problem. The Dynamic Announcements only read the PRIMARY group ID. Am I right? Can you make it so that they also recognize the SECONDARY group ID as well?

I can't make the paid subscribers a primary group manually, because when their subscription runs out, they still need to be a registered user, so they need to have the "registered user" group as their primary group.

Is this clear as mud? :tired:
Any hope for it being able to work?
Brandy
Reply With Quote
  #87  
Old 05-22-2004, 07:14 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 brandy
OK, I've tried a variety of different things and I think I've figured out the problem. The Dynamic Announcements only read the PRIMARY group ID. Am I right? Can you make it so that they also recognize the SECONDARY group ID as well?

I can't make the paid subscribers a primary group manually, because when their subscription runs out, they still need to be a registered user, so they need to have the "registered user" group as their primary group.
$bbuserinfo[usergroupid] keeps only primary usergroup id. So if you use this variable in your conditional you can not make the announcement displayed to your paid users.

It is $bbuserinfo[membergroupids] that saves secondary userid. So theorically you need to use it to target your paid user like:

[[($bbuserinfo[membergroupids] == 10 OR $bbuserinfo[membergroupids] == 11 OR $bbuserinfo[membergroupids] == 12)]]
thanks for paying
[[/($bbuserinfo[membergroupids] == 10 OR $bbuserinfo[membergroupids] == 11 OR $bbuserinfo[membergroupids] == 12)]]

HOWEVER:

$bbuserinfo[membergroupids] is technically a different variable then $bbuserinfo[usergroupid] because unlike primary usergroup, secondary usergroup can have more than 1 values. For instance you can have a user put into 3 different secondary usergroups at the same time. Therefore such a conditional will fail for these users when they are a member of more than 1 secondary usergroup.

Bottom line what you are trying to achieve is not easily possible with this hack in certain conditions.
Reply With Quote
  #88  
Old 05-22-2004, 07:15 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 idwf
hey there. i follwoed the steps with now problems atall, however, when i got to the AdminCP, Options, and put in my message 'Tester : im testing to see if this appears' i could't see anything :S

what have i done wrong?!
check template modifications. You probably did not make them in all active templates sets available.
Reply With Quote
  #89  
Old 05-22-2004, 07:32 PM
SmasherMaster's Avatar
SmasherMaster SmasherMaster is offline
 
Join Date: Feb 2004
Location: Florida
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks nice, great hack Logican, i'll be installing later.
Reply With Quote
  #90  
Old 05-24-2004, 11:58 PM
WAR WAR is offline
 
Join Date: Jan 2004
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician
$bbuserinfo[usergroupid] keeps only primary usergroup id. So if you use this variable in your conditional you can not make the announcement displayed to your paid users.

It is $bbuserinfo[membergroupids] that saves secondary userid. So theorically you need to use it to target your paid user like:

[[($bbuserinfo[membergroupids] == 10 OR $bbuserinfo[membergroupids] == 11 OR $bbuserinfo[membergroupids] == 12)]]
thanks for paying
[[/($bbuserinfo[membergroupids] == 10 OR $bbuserinfo[membergroupids] == 11 OR $bbuserinfo[membergroupids] == 12)]]

HOWEVER:

$bbuserinfo[membergroupids] is technically a different variable then $bbuserinfo[usergroupid] because unlike primary usergroup, secondary usergroup can have more than 1 values. For instance you can have a user put into 3 different secondary usergroups at the same time. Therefore such a conditional will fail for these users when they are a member of more than 1 secondary usergroup.

Bottom line what you are trying to achieve is not easily possible with this hack in certain conditions.
I am also having trouble trying to get this to work properly...

I have tried using the is_member_of() function but it doesn't seem to be recognizing it either. Does anyone else have any idea how to post an announcement to display for peoples secondary usergroups?
Reply With Quote
  #91  
Old 05-25-2004, 01:25 AM
DrkFusion's Avatar
DrkFusion DrkFusion is offline
 
Join Date: Nov 2001
Posts: 1,926
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is a similar hack available for vb2?
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 04:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04814 seconds
  • Memory Usage 2,330KB
  • 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
  • (2)bbcode_code
  • (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