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
  #162  
Old 08-21-2004, 01:02 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 kall
Kall's DFH-vBA_CMPS Integration :
Thx for sharing it. I've referred it in the first post.
Reply With Quote
  #163  
Old 08-24-2004, 04:32 PM
adieball adieball is offline
 
Join Date: Mar 2004
Location: Berlin, Germany
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there.

First of all: great hack, thanks a lot for the work you've done.

During install I encountered some problems I can't resolve (tried for hours now without success)
I've got the default style of vb 3.0.3 installed and another style (ambience by extremepixels). Everything works fine with the default style, but the message bar nor the popup seem to work under the other style. I've created the templates in both styles and changed the FORUMHOME tamplete as well in both styles.

Does anyone has any idea why it doesn't work with the style of extremepixels?

any help is highly appreciated.

Thanks

Andre
Reply With Quote
  #164  
Old 08-24-2004, 04:37 PM
adieball adieball is offline
 
Join Date: Mar 2004
Location: Berlin, Germany
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adieball
Hi there.

First of all: great hack, thanks a lot for the work you've done.

During install I encountered some problems I can't resolve (tried for hours now without success)
I've got the default style of vb 3.0.3 installed and another style (ambience by extremepixels). Everything works fine with the default style, but the message bar nor the popup seem to work under the other style. I've created the templates in both styles and changed the FORUMHOME tamplete as well in both styles.

Stupid me .... forget this post, I solved it. I just forgot to change the adv_portal template as well ....

Andre
Reply With Quote
  #165  
Old 08-26-2004, 02:12 PM
BunkTek BunkTek is offline
 
Join Date: Jul 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dumb question coming.

We had a database crash Sunday and lost everything. When I was reinstalling DFA I messed up on the variable for the dynamic_announcement_popup. In the options I put "test" instead of "text". I need to remove the variable and redo it, but can't figure out how. Dumb mistake, dumb question, but I've been working on getting our board back up.

Thanks for any help.
Reply With Quote
  #166  
Old 08-26-2004, 04:26 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you add
$debug=1;
to your includes/config file (before ?>) you will be able to edit/delete any settings in your vbulletin but be careful while playing with them.
Reply With Quote
  #167  
Old 08-26-2004, 10:04 PM
proxyMX's Avatar
proxyMX proxyMX is offline
 
Join Date: Jun 2002
Location: Seven of Nine is hot! :do
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Are you planning on releasing a version that does?
btw this is the greatest hack ever
Reply With Quote
  #168  
Old 08-26-2004, 11:31 PM
duncan99 duncan99 is offline
 
Join Date: Feb 2003
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful hack, installed it. Thank you Logician .

One small request, since the announcement editor is so small, could you please show me how to add a larger editor on it?

I found the statment :

print_textarea_row($vbphrase['signature'], 'signature', $user['signature'], 8, 45);

This one gets the Larger edit box, but wonder where I can find the right place to replace the small input text.

Thanks.
Reply With Quote
  #169  
Old 08-30-2004, 01:28 PM
BunkTek BunkTek is offline
 
Join Date: Jul 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Logician. I got the popup textarea fixed.

I got everything set up, seems to be working with everything but the index.php. I get the following error:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in
... /index.php(429) : eval()'d code on line 2

I'm assuming that the message means there is something wrong with line 429, not sure if this is right or not. Looking at it in my editer I see the following (line 429 is bold):

Code:
// Logician Hack: Dynamic Forum Announcements Hack
if ($vboptions['dynamic_fha'] OR $vboptions['dynamic_popup']) {require_once('./includes/functions_bbcodeparse.php');}

if ($vboptions['dynamic_fha'])
{
eval('$dynamic_fha = "' . addslashes($vboptions['dynamic_fha']) . '";'); 
$dynamic_fha=str_replace("\\'", "'", $dynamic_fha);
$dfh_announcement_announcementtopaste = dynamic_a($dynamic_fha);
if (trim($dfh_announcement_announcementtopaste)) {eval('$dfh_announcement = "' . fetch_template('dfh_announcement') . '";');}
}

if ($vboptions['dynamic_popup'])
{
eval('$dynamic_popup = "' . addslashes($vboptions['dynamic_popup']) . '";'); 
$dynamic_popup=str_replace("\\'", "'", $dynamic_popup);
$dfh_announcement_popuptopaste = dynamic_a($dynamic_popup);
if (trim($dfh_announcement_popuptopaste)) 
	{
	eval('$dfh_announcement_headercode = "' . fetch_template('dfh_announcement_headercode') . '";');
	eval('$dfh_announcement_popup = "' . fetch_template('dfh_announcement_popup') . '";');
	}
}

// Logician Hack: Dynamic Forum Announcements Hack
I copied and pasted from the instructions, so it should be fine, it worked fine when I first installed it. I stared at it for an hour or so last night, but I can't see anything wrong with it.

Thanks for any help or ideas.
Reply With Quote
  #170  
Old 08-30-2004, 01:42 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 BunkTek
I copied and pasted from the instructions, so it should be fine, it worked fine when I first installed it. I stared at it for an hour or so last night, but I can't see anything wrong with it.
Very likely its your conditional set that is incorrect. Remove it (use a plain announcement without a conditional) and the error will go.
Reply With Quote
  #171  
Old 08-30-2004, 01:55 PM
BunkTek BunkTek is offline
 
Join Date: Jul 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, that worked. Thanks for the quick response.

I had a conditional to show a message to everyone and then a conditional to show a message to a certain user id, removed the 2nd and it works fine.

Is there a way to make the popup "move" when people scroll their browser down... so that it remains in the same relative spot in the bowser?

Would that be done by changing the "position: absolute;" to "position: relative;" in the template?
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 02:10 AM.


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.05451 seconds
  • Memory Usage 2,322KB
  • 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
  • (4)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
  • (2)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