Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
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.01, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.5 Rating:
Released: 09-27-2005 Last Update: 01-10-2007 Installs: 721
Uses Plugins Template Edits
 
No support by the author.

(This hacks works with both 3.5.x and 3.6.x)

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 different texts according to different conditions.
For instance you can tell "why they should register" if visitor is a guest, but if he is a member with 0 posts, you can tell him why he should start posting etc.! All in one announcement! Everybody will see the relevant text according to his status. (This is the hack everybody keeps asking in the TheAdminZone.com whose using the hack for members with 0 and 1 posts.)


This version of the hack is for vbulletin 3.5.x and 3.6.x (vb 3.0.x version is here and vb 2.x version is here. 3.5 version is coded as a plugin so you can install it WITHOUT modifying vb PHP files. It is easily installed in 2 steps through your admin cp.

Basic Usage of This Hack: You can set a text in your Admin CP and it's displayed in forum home to all users. Alternatively if you want, you can set another text as a popup announcement and it is displayed to all as a pop up announcement (it can't be killed with popup killers software!)

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. user has X posts or has more than Y posts but less than Z posts
  4. his last visit time was X days ago
  5. 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
  6. etc.
Here is a Screenshot from a general table announcement.
Here is a Screenshot from a popup announcement.

Some Features:
  • Coded as a vbulletin pluggin. Can be installed easily without hacking PHP files.
  • It's Admin CP integrated
  • 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
Hacks of Hack:
* For CMPS Integration see here
* French Translation by Allan : https://vborg.vbsupport.ru/showpost....&postcount=143
* Nested Conditionals by dc3dreamer : https://vborg.vbsupport.ru/showpost....&postcount=175
* Hack Annoucement appears in all vb pages:
https://vborg.vbsupport.ru/showthrea...498#post911498



IMPORTANT FOR 3.x USERS:
If you were already using this hack in 3.0.x, remember to do 2 things:
BEFORE YOU INSTALL THIS HACK : Follow this instructions to remove the remnants of 3.0.x hack.
AFTER YOU INSTALL THIS HACK : Go to your admin cp / styles, find these 3 styles:
dfh_announcement
dfh_announcement_headercode
dfh_announcement_popup
and REVERT THEM so that your new templates that comes with 3.5 version will apply.

About vb4.x version:

I didn't consider porting this hack to vb4 because vbulletin has now a VERY SIMILAR feature in vb4 called "NOTICES". You can find it under your admin cp/Notices submenu/Notice Manager. It is not as powerful as this hack as this hack allows you to use any kind of conditional to produce your announcement but it is more user friendly because you don't need to deal with conditional syntax, you simply build your announcement (notice) with menus

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
  #322  
Old 09-27-2006, 09:28 AM
istvan istvan is offline
 
Join Date: May 2006
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doesnt work ->
[[($bbuserinfo[usergroupid]==10)]]testmessage[[/($bbuserinfo[usergroupid]==10)]]

does work ->
testmessage

so i cant get an message to show for usergroups... Is it so that it only checks on primarygroups?
Reply With Quote
  #323  
Old 09-30-2006, 10:34 AM
istvan istvan is offline
 
Join Date: May 2006
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by istvan
doesnt work ->
[[($bbuserinfo[usergroupid]==10)]]testmessage[[/($bbuserinfo[usergroupid]==10)]]

does work ->
testmessage



so i cant get an message to show for usergroups... Is it so that it only checks on primarygroups?
/bump
Reply With Quote
  #324  
Old 10-08-2006, 09:15 PM
tqvn2004 tqvn2004 is offline
 
Join Date: Sep 2005
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those who have problem with closing the announcement popup, do the following:

Edit FORUMHOME template, find: (if you have more than 1 template set apply this to all sets)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$dfh_announcement_headercode
</head>
<body>
$dfh_announcement_popup
$header
$navbar
$dfh_announcement
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Replace by:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</head>
<body>
$dfh_announcement_headercode
$dfh_announcement_popup
$header
$navbar
$dfh_announcement
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

This should do the trick!

===============================================

@Logician: I think it better to embed the announcement popup's closing script in the "dfh_announcement_popup" template, for example:

Code:
<script>function clearpopupannouncement(id) {document.getElementById(id).style.display = 'none';}</script>

<DIV ID="ANNLAYER" STYLE="background-color: red; position: absolute; margin-left:5; margin-right:5; margin-top:5; margin-bottom:0; top: 50px; bottom: 50px; padding: 10px; overflow: auto; border-color: 000000; border-style: solid; border-top-width: 2px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 2px;">

<table cellpadding="1" cellspacing="0" border="0" class="tborder" width="100%" height="100%" align="center"><tr><td>
    <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" height="100%">
     <tr height="100%">
	     <td class="panelsurround" align="center" height="100%"> 
       <div class="panel"><div align="$stylevar[left]">

$dfh_announcement_popuptopaste

<br /><br />

<input type="button" onclick="clearpopupannouncement('ANNLAYER')" name="clear" value="$vbphrase[closeannouncement]" class="button">
<br />

</div></div>
	</td>
</tr>
</table>
</td></tr></table>
</div>
By this you dont have to define and calling other template, "dfh_announcement_headercode"

PS: Actually you can put 3 templates into one
Reply With Quote
  #325  
Old 10-23-2006, 08:46 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The anouncment screen very BIG Firefox and IE7,it is very bad view.

Any fix for that ?

Thanks
Reply With Quote
  #326  
Old 12-02-2006, 09:16 PM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paul41598 View Post
What if I want two popups?
I think that's its only drawback
Reply With Quote
  #327  
Old 12-13-2006, 09:53 AM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bulent Tekcan View Post
The anouncment screen very BIG Firefox and IE7,it is very bad view.

Any fix for that ?

Thanks
Any idea for this problem ?
Reply With Quote
  #328  
Old 12-22-2006, 10:08 PM
Cooleyvol Cooleyvol is offline
 
Join Date: Jul 2006
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I'm not understanding the time settings.
I've done the change so that you can set it to minutes.

When I set any variable >0, the box doesnt show up.

If I set negative integers, it does.

What is the setting for 15 minutes?

-0.25?
Reply With Quote
  #329  
Old 12-23-2006, 08:21 AM
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 Cooleyvol View Post
OK, I'm not understanding the time settings.
I've done the change so that you can set it to minutes.

When I set any variable >0, the box doesnt show up.

If I set negative integers, it does.

What is the setting for 15 minutes?

-0.25?
Numbers should be positive.

The box normally shows up but it does not show up for you because you visited the board in the last 15 minutes (while setting this setting). Log out and wait for 20 minutes, then revisit the board and you'll see that it will show up.
Reply With Quote
  #330  
Old 12-23-2006, 08:26 AM
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 Bulent Tekcan View Post
The anouncment screen very BIG Firefox and IE7,it is very bad view.

Any fix for that ?

Thanks
Sorry HTML is not my strong point but if you have a design related problem in popup announcement, you can edit template "dfh_announcement_popup" and play with the setting of the DIV style here:

PHP Code:
<DIV ID="ANNLAYER" STYLE="background-color: red; position: absolute; margin-left:5; margin-right:5; margin-top:5; margin-bottom:0; top: 50px; bottom: 50px; padding: 10px; overflow: auto; border-color: 000000; border-style: solid; border-top-width: 2px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 2px;"
Reply With Quote
  #331  
Old 12-23-2006, 02:56 PM
Cooleyvol Cooleyvol is offline
 
Join Date: Jul 2006
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician View Post
Numbers should be positive.

The box normally shows up but it does not show up for you because you visited the board in the last 15 minutes (while setting this setting). Log out and wait for 20 minutes, then revisit the board and you'll see that it will show up.

So the setting for 15 minutes is '15?

If that's the case, how many times does it show during that 15 minutes. Am I correct in thinking that with a setting of '15' that the box will show up for userX for 15 minutes after his first visit to the forums following my setting up of the popup?

If that is incorrect, how can I set it to show up only one time per user OR to show up for the 15 minutes following their first visit? I don't want it to continue popping up for UserX for more than 15 minutes past his first visit after I set it up.
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 08:05 AM.


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.04896 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (6)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