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
  #282  
Old 01-23-2005, 03:52 PM
Mechanical Mind's Avatar
Mechanical Mind Mechanical Mind is offline
 
Join Date: Sep 2004
Location: USA
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anybody know how to change the position of the pop-up window in relation to the forum or to modify the color?
Reply With Quote
  #283  
Old 01-23-2005, 11:12 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mechanical Mind
Does anybody know how to change the position of the pop-up window in relation to the forum or to modify the color?
1. Change the position of $dfh_announcement in your FORUMHOME template to where you want it.

2. Edit aforementioned template's DIV or TD attributes to make it look how you want.

A slightly modified version (mine) is here: http://forums.nzboards.com/index.php
Reply With Quote
  #284  
Old 01-23-2005, 11:59 PM
Takamine334 Takamine334 is offline
 
Join Date: Aug 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would this work for X days and X time?

Ex. Message would show up only on Monday through Friday from 9am-5pm ?
Reply With Quote
  #285  
Old 01-24-2005, 04:04 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T3MEDIA
Hey how about a clean list of commands for other users to use? that would be nice
guys? at lest respond to one of my posts... lol
Reply With Quote
  #286  
Old 01-25-2005, 07:24 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 djjeffa
i upgraded to 3.0.5 and its in my admin panel but its not showing up.
can I get a lil help?
Do you mean admin interface is there but announcements not showing up? Have you reapplied the code changes after you upgraded? Also check if template modifications are also valid. You may lose them if you reverted your templates.
Reply With Quote
  #287  
Old 01-25-2005, 07: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 T3MEDIA
Hey bro...
how do I do a syntax for something that is null?
=="" I am not sure if "" is ok. or can I do ()
Not sure what you mean but in php this conditional checks whether the variable is blank or now: $variable==''

Does it answer your question? If not, plz elborate.
Reply With Quote
  #288  
Old 01-25-2005, 07:31 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 master786
Nice hack but its size is too much. Our forum's speed is slow after we installed this hack. Can you please tell me the easiest way how to uninstall this hack?
I wouldn't suspect this hack as the culprit of the slowness. It has really no performance problems and it is running in hundreds of boards some of which are most largest vbulletin boards with heaviest traffic.

But if you still like to remove it here is how:
a) Delete the codes you added to .php files.
b) Turn debug mode on in your board (https://vborg.vbsupport.ru/showthrea...bug#post504557), then go to vb admin cp/options and remove the hack options by following the new removal links you'll find there.
c) Template modifications are harmless but if you want, you can remove them either by deleting the new templates hack added or deleting the HTML lines you added in existing templates.
Reply With Quote
  #289  
Old 01-25-2005, 07:42 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 lanc3lot
It works ok... But just in case, is there any uninstall script to have?
Please see my message above this one.

Quote:
Originally Posted by lanc3lot
Also, what is the "load" of page, that creates
No significient load. It is performance friendly. It just adds a single query to forum home page loads, provided that you installed as it is. However if you change the installation or working of the hack and say applied the announcements in all forum pages (hack of the hack 1), then additional query applies for all vb pages. My recommendation is to run it as it is, ie in main page only.



Quote:
In your first Hack, of the hack, u say: (at the end)
Now put
$dfh_announcement_headercode
$dfh_announcement_popup
$dfh_announcement
variable in any template you like

What do u mean with that? I must do something else, so this will work on every page?
The hack is coded to work only in forum home page. However some users want to display the announcements in different pages or in every vb pages so hack of the hack you mentioned aims to do it. The template you need to modify will change according to the page you like to display the announcement so I can not tell you to "modify template X" in this scenario. It depends on your intention. However for all vb pages, the template to modify will be "header". Hope this helps.


Quote:
Is there any way, i can "change" the background color of the table of the announcement, the color of the text and the font size of the text?

I tried a code like:
Code:
<td style="background-color:#000000;color:#FF6600;font-size:9px;">
but it didnt work Can i do it differently?
You mean the color and font of popup announcement right?

Edit template "dfh_announcement_popup" and change the section that says "background-color: lime;" for the bg color. And for the font change this section:

PHP Code:
<div class="normalfont">$dfh_announcement_popuptopaste</div
to something like this:
PHP Code:
<font size='10'>$dfh_announcement_popuptopaste</font

Quote:
Something last...To add more than one announcement, i just write them under the first one?
You can have more than one announcements in the conditional format. But only one of them will be showed to the user (the higher one) where the conditional applies.
Reply With Quote
  #290  
Old 01-25-2005, 07:44 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 kall
*bangs head on desk in frustration*

Well, I have tried to work out how to get 'Your Paid Subscription expires in X days' to display, but can't for the life of me think of what the variable might be to call.

Please, oh great Logician, tell me if this is even possible.
Unfortunately this can't be done with this hack because this info is not valid in vb code until you specificially query the db to get it.
Reply With Quote
  #291  
Old 01-25-2005, 07:52 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 Takamine334
Would this work for X days and X time?

Ex. Message would show up only on Monday through Friday from 9am-5pm ?
yes possible.

PHP Code:
[[((date("w")>=AND date("w")<=5) AND (date("H")>=AND date("H")<21))]]
Day is now between monday to friday and hour is between 9.00 AM to 8.59 PM
[[/((date("w")>=AND date("w")<=5) AND (date("H")>=AND date("H")<21))]] 
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:43 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.05851 seconds
  • Memory Usage 2,340KB
  • 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
  • (3)bbcode_php
  • (12)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