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
  #202  
Old 01-23-2004, 01:57 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 Kerr
Ok, call me dumb...LOL I am new to VB. BTW....love love love this hack....*hits install*...

How do I find out what my Usergroup ID numbers are???
If you right click Edit USergroup link and open in a new window you will see its usergroup id in the URL like:
http://......../usergroup.php?s=&act...&usergroupid=4
Reply With Quote
  #203  
Old 01-23-2004, 03:18 PM
Kerr's Avatar
Kerr Kerr is offline
 
Join Date: Jan 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oK....got a few more quick questions...

Why does it show the link to my image and not my image??? (code below)

What is the correct way to add <br> and <center> to my message? I cant get those to parse correctly they just keep showing up as is instead of doing what I want LOL.

Heres the code as is now......

[[($bbuserinfo[userid]>0)]][i m g]http://www.exoticpethaven.com/vb/images/announcementpic.jpg[/img]
We would like to welcome all our new members to our permanent home!
We hope you enjoy yourself here and stick around for a long time.
We all look forward to making some great friends.
We would like to thank everyone for their patience while we upgrade and add some great things that we all can enjoy.
Please know that over the next few weeks off and on we will be down for small periods of time due to the addition of a few things here and there. Enjoy your stay....see you in the forums!
Sincerely, The EPH Admins and Mods.
[[/($bbuserinfo[userid]>0)]]

The [img] tag of course is not spaced I did that so you could see the code. On my site it just shows the link.

Ok...fixed the problem with the pic not showing...it had to do with general settings of my board nothing with your hack (as I figured )

Now...I just cant get anything to center....Is there another way to do ...in a nother file? I am still stumped on that one. Thanks for any help you can give me.
Reply With Quote
  #204  
Old 01-24-2004, 09:01 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have problems displaying HTML/smilie/bbcode in your announcement, make this tiny change in hack code (which is in STEP 2):

Find:
PHP Code:
$matches14[2]=bbcodeparse(trim($matches14[2])); 
Replace it as:
PHP Code:
$matches14[2]= bbcodeparse2(trim($matches14[2]),1,1,1,1); 
This will fix your problem..
Reply With Quote
  #205  
Old 03-01-2004, 11:35 PM
klaattu klaattu is offline
 
Join Date: May 2003
Location: mexico
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One quick question:

I have already put images and everything, it works perfectly .

Is there a way in which I can for example make a folder and put 10 images inside and make a conditional so the hack pulls a random one from the folder and put it in the announcemnets hack?

that would make me very happy
Reply With Quote
  #206  
Old 03-02-2004, 06:30 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 klaattu
Is there a way in which I can for example make a folder and put 10 images inside and make a conditional so the hack pulls a random one from the folder and put it in the announcemnets hack?
nope
Reply With Quote
  #207  
Old 03-12-2004, 05:55 PM
ctsolutions ctsolutions is offline
 
Join Date: Dec 2002
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="DarkOrange">Absoluetly brilliant hack</font>

Thanks,

CtSolutions
Reply With Quote
  #208  
Old 04-23-2004, 11:41 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As always, this is a wonderful hack, Logician! I've actually used it for a while, but only now got around to re-adding it to my upgraded forum.

Quick question about the fix code posted in #205. Is there an extra space in the replacement line?

Quote:
Originally Posted by Logician
Find:
PHP Code:
$matches14[2]=bbcodeparse(trim($matches14[2])); 
Replace it as:
PHP Code:
$matches14[2]= bbcodeparse2(trim($matches14[2]),1,1,1,1); 
My functions.php stopped working when I used the above replacement code.

Instead, what worked for me was:

PHP Code:
$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1); 
Dunno if it's just me, but anyway, I thought it might help anyone who had the same problem. Thanks again for the great work, Logician!
Reply With Quote
  #209  
Old 04-24-2004, 06:59 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 kira
Instead, what worked for me was:

PHP Code:
$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1); 
Thx for sharing it Kira but it really can not matter These 2 lines have the same meaning in PHP so you can have a space or not. I guess your problem was something else and you accidenly fixed it while adding the space
Reply With Quote
  #210  
Old 09-16-2004, 04:18 PM
Symbian.info Symbian.info is offline
 
Join Date: Nov 2001
Location: Netherlands
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can U uninstall it from the Admin CP? I allready use it no more because I have V 3.03 but it stills standing in Admin CP. So how can I delete that??
Reply With Quote
  #211  
Old 09-16-2004, 04:52 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 Symbian.info
How can U uninstall it from the Admin CP? I allready use it no more because I have V 3.03 but it stills standing in Admin CP. So how can I delete that??
They are harmless there if you removed the hack from the code but if you like to delete them anyway, follow instructions here:
https://vborg.vbsupport.ru/showpost....&postcount=199
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:14 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.04700 seconds
  • Memory Usage 2,332KB
  • 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
  • (6)bbcode_php
  • (5)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
  • (3)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