Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #82  
Old 10-17-2002, 07:58 AM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome Hack!

Would it be possible to add some comfort to it? New Option in ACP (I don't care about the 1 query) and some usefull buttons to easier configure the conditionals, similiar to bbcode in posts, like a drop down menu where you can choose the usergroup it is shown to, Integration of BBCode-Buttons etc...

Guess this is a lot work, isn't it? I would very appreciate if you could take the time.
Reply With Quote
  #83  
Old 10-17-2002, 12:10 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 TheSaint-AeD
Guess this is a lot work, isn't it? I would very appreciate if you could take the time.
yes that's a lot of work and would take time which I dont have at the moment..

Actually I use "conditonals" in many of my hacks and I know that although they are powerful, they are not "newbie-friendly". Therefore I always thought a kind of visual mask for conditionals which would help ordinary users to form them more easily. But there is no easy way to code such an integration. For example you told about choosing "usergroups" from a pull down option which is a good idea but a conditional does not necessarily include a usergroup. It can involve ALL vb user related variables like userid, register date, style id etc, and also ALL the other VB variables like forumid, threadid, post id (that's for my other hacks using conditionals). Besides they can coexist together: For example someone might want to create a conditional which will apply if user group is 6 AND user is viewing thread 17 AND today is his birthday. Well I still couldnt find a way to create a visual mask that will help you forming this conditional. I have to trust the fact that most of the users using hacks with conditionals are "power users" who would need little help to form them..
Reply With Quote
  #84  
Old 10-27-2002, 08:25 AM
kreatiV kreatiV is offline
 
Join Date: Oct 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Most fantastic this hack! Very easy to install and works as promised in 2.2.8 with the changed step 4.
Reply With Quote
  #85  
Old 10-27-2002, 09:12 AM
kreatiV kreatiV is offline
 
Join Date: Oct 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to have a general Personal Conditional?

Something like,

Welcome, [NICKNAME] to the board. Please make sure that you read the Info & News Forum.

So instead of [NICKNAME] it shows the users name?
Reply With Quote
  #86  
Old 10-27-2002, 09:38 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Welcome, $bbuserinfo[username] to the board. Please make sure that you read the Info & News Forum.
Reply With Quote
  #87  
Old 10-31-2002, 12:24 AM
cono's Avatar
cono cono is offline
 
Join Date: Jul 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way to make it have a fader? like its a news fader.

i saw a hack on a board once, i dont know the name of the hack, but i was wondering if this could do the same thing?

it fades from one paragraph to the other, like a javascript fader? could this hack do that also with somw extra modifications?

btw, awesome hack! i installed it with no problems.

thanks.
Reply With Quote
  #88  
Old 10-31-2002, 09:08 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 cono
is there a way to make it have a fader? like its a news fader.

i saw a hack on a board once, i dont know the name of the hack, but i was wondering if this could do the same thing?

it fades from one paragraph to the other, like a javascript fader? could this hack do that also with somw extra modifications?
If a javascript is doing the fade, it may be applied to this hack. I dont know how that script works but say if it has a main function and a tag like
[fade] your text goes here [/fade]

all you have to do is put the tag [fade] in your announcement box and the main function inside your forumhome template..

Of course if the script works differently, different solutions may apply..
Reply With Quote
  #89  
Old 11-01-2002, 06:29 PM
RayMatrix RayMatrix is offline
 
Join Date: Feb 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

. . .that warns a user when the PN-Counter ($allpm[messages]) is higher than 'x' PN's.

I tried this code:

[[($bbuserinfo[allpm]>=40)]]
Hallo $bbuserinfo[username],

In Deinen PN Postf?chern liegen zur Zeit $allpm[messages] gesammelte Nachrichten.

Noch $rest und Du kannst keine mehr empfangen !!

Bitte ?berpr?fe Dein Postfach und l?sche nicht mehr ben?tigte Nachrichten.

Danke und Gru?

RayMatrix[[/($bbuserinfo[allpm]>=40)]]


And also this one:

[[($allpm[messages]>=40)]]
Hallo $bbuserinfo[username],

In Deinen PN Postf?chern liegen zur Zeit $allpm[messages] gesammelte Nachrichten.

Noch $rest und Du kannst keine mehr empfangen !!

Bitte ?berpr?fe Dein Postfach und l?sche nicht mehr ben?tigte Nachrichten.

Danke und Gru?

RayMatrix[[/($allpm[messages]>=40)]]


Both wont work for me.

My Question is:
Is $bbuserinfo only looking for fields wich are in DB Folder 'user' ?
If no, what do i have to change to read from all the other folders in the DB ?

Thanks for your help

Regards
Reply With Quote
  #90  
Old 11-02-2002, 10:34 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 RayMatrix
. . .that warns a user when the PN-Counter ($allpm[messages]) is higher than 'x' PN's.
Actually this works:

[[($allpm[messages]>=40)]]
Hallo $bbuserinfo[username],

In Deinen PN Postf?chern liegen zur Zeit $allpm[messages] gesammelte Nachrichten.

Noch $rest und Du kannst keine mehr empfangen !!

Bitte ?berpr?fe Dein Postfach und l?sche nicht mehr ben?tigte Nachrichten.

Danke und Gru?

RayMatrix[[/($allpm[messages]>=40)]]


But you need to apply the hack to your index.php (not global.php) so that it will work. Because variable $allpm[messages] is assigned a value in index.php and global.php runs before index.php runs. Therefore it is blank if you apply the code in global.php.

The answer to your question is: This hack is competible with ALL vb variables available provided that they are assigned a value before dynamic announcement code is run..
Reply With Quote
  #91  
Old 11-02-2002, 01:42 PM
RayMatrix RayMatrix is offline
 
Join Date: Feb 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

. . .but your explanation is to hard for me to understand.

Quote:
Original posted by Logician
But you need to apply the hack to your index.php (not global.php) so that it will work
Wich hack do you meen here ?

If you meen your code:
PHP Code:
// Logician Dynamic Forum Announcements Hack
$dynamic_fha=strchr($optionstemp['template'],'$dynamic_fha = "');
eval(
$dynamic_fha);
$dfh_announcement=dynamic_a($dynamic_fha);
// Logician Dynamic Forum Announcements Hack 
then its ok, i added it to index.php, cause your installinstruction tells to do at step 4.

And another Question:

Is there any place where i can read about the Variables so i can understand where '$bbuserinfo' comes from ? And is it right that your Code only get called in index.php when i insert the code as step 4 tells to do ?

Thanks for all

Regards
Reply With Quote
Reply

Thread Tools

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 05:11 PM.


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.04910 seconds
  • Memory Usage 2,321KB
  • 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_php
  • (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_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