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
  #62  
Old 09-25-2002, 08:09 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 LawnDawg
[edit]Is there any way I could add this into my "header" template? does seem to work.. [/edit]
I havent tested it with header template but I cant see a reason it wouldnt work. Just make sure you delete the code from index.php and add it to global.php as mentioned in the install instructions.. Not tested, should work though..

But if you need to use conditional power inside your header template (or any other template) I suggest you checking my Advanced Templates hack either..(Please find it in my profile). You can set conditionals inside your header (or any other template) and if you want you can set announements there too..

2 methods, choose your pick!
Reply With Quote
  #63  
Old 09-25-2002, 04:40 PM
RayMatrix RayMatrix is offline
 
Join Date: Feb 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

. . .but got this Error Message:

Warning: Failed opening '/home/ish/install.php' for inclusion (include_path='.:/usr/share/php') in Unknown on line 0

This comes up when running the DFHA_install.php

The File ist in the Board root Folder, the Board work and its php4.1.x installed.

Any Ideas ?
Reply With Quote
  #64  
Old 09-25-2002, 05:19 PM
Willard Reece Willard Reece is offline
 
Join Date: Aug 2002
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RayMatrix
permissions for that folder and file?
Do you have that dir and or file chd to 777 so you can run it.
If its not, then it will do that too.
Reply With Quote
  #65  
Old 09-25-2002, 07:24 PM
RayMatrix RayMatrix is offline
 
Join Date: Feb 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

. . .thats it. . .the simplest things are most time the hardest aranoid:

THANKS !!
Reply With Quote
  #66  
Old 09-29-2002, 02:56 AM
PIMPY PIMPY is offline
 
Join Date: Apr 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You maze me yet again Logi, I now have three of your additions on my forums, Currently i'm trying to get them integrated and working, but they are on and working.

Only questions I have are..

Simple: How can I find the usergroup IDs? (i'm sure its very simple and I'm sure I could just create a small bit of PHP to tell me, but hey, why screw up when ya'll are so smart)

and two..

Would it be possible to somehow get more conditionals working at one time? I know you say it can't be done in all of your readmes, but I'm sure there is a way for it to parse each thing not just do one then stop. I havn't looked but I'm assuming that the general code is similar to
If conditional1 is true end, else goto next bit

but could it be possible to do

if conditional1 is true display, now do conditional2, and so on

yes good 'ol PSEUDO

because currently how I plan to do it willl be have one conditional with all things i want in it, plus everything else, then another conditional for some thigns already in the other and so on, but that takes SOO much time, and is SOO un-efficiant. Theres gotta be someway we cna make it so it parses every conditional no matter what.


Edit: OK, now i was thinking that considering most code in the php files around everywhere, its along the lines of

If Blah
elseif blah
elseif blah

so really maybe it just should be

if blah;
if blah;
if blah;

then each conditional is parsed and used no matter what

little bit of editing needed so that all things appear in one box and not in 4 or 5 :P
Reply With Quote
  #67  
Old 09-29-2002, 10:00 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
How can I find the usergroup IDs?
This will help..

Quote:
if conditional1 is true display, now do conditional2, and so on
Before trying to modify this hack I suggest you first checking Advanced Templates Hack. It has the same conditional power (now for vb templates) and its parsing is just like you want: It parse through the entire template and parse all met conditionals, does not return when found a first true conditional. So you can use it for your needs, say, by creating conditionals in your forumhome template and putting inside your announcement and its HTML code. All of them will be displayed if condition is true..
Reply With Quote
  #68  
Old 09-29-2002, 12:01 PM
The General's Avatar
The General The General is offline
 
Join Date: Aug 2002
Location: Netherlands
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers mate!

VeryVERY cool hack, works like a charm on 2.2.8!
Reply With Quote
  #69  
Old 10-09-2002, 08:20 AM
Wildthinks's Avatar
Wildthinks Wildthinks is offline
 
Join Date: Apr 2002
Location: .:BeRLiN:.
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[[($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]
Hi $bbuserinfo[usergroupid],
diese Nachricht k?nnen nur Moderatoren und Admins lesen. Bitte einen Thread im Mod-Board aufmachen oder in einem Antworten, ob Du das lesen kannst :umfall:
Gr??e Wildthinks
[[/($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]

The "Hi $bbuserinfo[usergroupid]," are on screen and not "Hi Wildthinks"
Reply With Quote
  #70  
Old 10-09-2002, 04:55 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
[[($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]
Hi $bbuserinfo[usergroupid],
diese Nachricht k?nnen nur Moderatoren und Admins lesen. Bitte einen Thread im Mod-Board aufmachen oder in einem Antworten, ob Du das lesen kannst :umfall:
Gr??e Wildthinks
[[/($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]

The "Hi $bbuserinfo[usergroupid]," are on screen and not "Hi Wildthinks"
Did you see my default text correctly when you installed the hack?

And BTW. you should use "Hi $bbuserinfo[username],", not "$bbuserinfo[usergroupid]"
Reply With Quote
  #71  
Old 10-09-2002, 07:56 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to thank you for another great and powerful hack, Logician. Every bit of personalization and customization helps, and as always you've added tremendously to my abilities to control my forum. Thanks!
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 06:25 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.02745 seconds
  • Memory Usage 2,312KB
  • Queries Executed 27 (?)
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
  • (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
  • (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_postinfo_query
  • fetch_postinfo
  • 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