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
  #252  
Old 12-19-2004, 01:46 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey anyway to mod this to just make a user go thru web pages insted of pop ups?

like a NEW NEW just joined user could go thru stuff like would you like to subscribe to these things? or sign up for our job bank and there would be a table for that stuff... or intrested in our love connections? and there would be info for that.

conditional websites for vbulletin. so it turns this forum software into a server or some sort of a extent.
Reply With Quote
  #253  
Old 12-19-2004, 01:58 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician
Yes they are 3, not 4. I corrected the .txt file, thx for the heads up.
Is there a list of conditions for vb? just a table format?
Reply With Quote
  #254  
Old 12-24-2004, 11:49 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey how about a clean list of commands for other users to use? that would be nice
Reply With Quote
  #255  
Old 12-24-2004, 01:08 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by docvader
I'm having trouble getting this to work. Shouldn't there be another "conditional" that defines what group your inquiring about? And, is that the way the field conditional should be worded?

Thanks! Love this hack.
I didnt try it but I thought the same thing. but. A guest wouldnt have a new field to fill out... so the other guys would. And there isnt a condition for certain groups when it comes to option boxes. They all get them.

Did I get that right guys?
Reply With Quote
  #256  
Old 12-24-2004, 02:18 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician
I see! This should help:

[[(!$bbuserinfo[fieldX])]] You haven't filled the location field yet! Please do so by following the link to your profile edit page. [[/(!$bbuserinfo[fieldX])]]

(X should be replaced by the profile field id of your location field.)
ummm after my slew of posts... yeah this doesnt work. this is exactly what I need.
Reply With Quote
  #257  
Old 12-24-2004, 03:40 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 T3MEDIA
ummm after my slew of posts... yeah this doesnt work. this is exactly what I need.
You remember to:
a) change "x" with the profileid
b) Test it with a test user account (not admin account) who has this profile field empty.
right?
Reply With Quote
  #258  
Old 12-24-2004, 10:38 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician
You remember to:
a) change "x" with the profileid
b) Test it with a test user account (not admin account) who has this profile field empty.
right?
give me some credit! You sound like my bank now! lol.
Yep. the Profileid was 16 on mine it is not a required field though. and there are about 6 check boxes in this field.
Reply With Quote
  #259  
Old 12-25-2004, 07:23 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
and there are about 6 check boxes in this field.
k this explains now. My code was for inputbox profile fields. I can't think of an easy way to do it for check box profile fields.
Reply With Quote
  #260  
Old 12-28-2004, 12:15 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh man... no? darn... that is exactly what I wanted. man. But to be honest I made a new field called last name and that was field18 that didnt work either so I dont think this will work with that code bro. Here is what I go so far.

Quote:
[[($bbuserinfo[usergroupid]==3)]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because you have not yet confirmed your registration via the email we sent you. You will not be able to post or use other features of the site until you do. Please click the activation link in the email you were sent, or visit <a href="register.php?$session[sessionurl]do=requestemail">this page</a> to resend the activation email. If you did not receive the email then it's possible it was blocked by your email client. In this case you can either disable your blocker software or enter a new email address in <a href="profile.php?$session[sessionurl]do=editpassword">your profile</a> Thanks for coming by! This message will dissappear once you confirm your registration.[[/($bbuserinfo[usergroupid]==3)]]

[[(!$bbuserinfo[field16])]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because You haven't filled in new required locations in your profile yet! Please do so by clicking <a href="profile.php?$session[sessionurl]do=editprofile">here.</a> This message will dissappear once you complete this.[[/(!$bbuserinfo[field16])]]

[[($bbuserinfo[usergroupid]==2 AND $bbuserinfo[posts]==0)]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because You haven't posted on our forums. Please take the time and participate with others. You can start <a href="forum.php?">here</a>!
[[/($bbuserinfo[usergroupid]==2 AND $bbuserinfo[posts]==0)]]

[[($bbuserinfo[usergroupid]>1 AND $bbuserinfo[lastpost]<strtotime("-14 days"))]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because you have not posted a message in the last 2 weeks. Please take the time and participate with others. We would love to hear your opinions. You can start <a href="forum.php?">here</a>!
[[/($bbuserinfo[usergroupid]>1 AND $bbuserinfo[lastpost]<strtotime("-14 days"))]]

[[($bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $bbuserinfo[pmtotal]>65)]]
Attention: $bbuserinfo[username]! You have nearly reached your Private Messages limit of 70.

This counts for messages in your 'Inbox' and 'Sent Items' folder. Please delete unwanted messages, as once your limit is reached you will no longer be able to receive new Private Messages.
[[/($bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $bbuserinfo[pmtotal]>65)]]
Reply With Quote
  #261  
Old 01-01-2005, 02:16 AM
paulz paulz is offline
 
Join Date: Sep 2004
Location: Boston
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ixian
Aha!!! I have it working for vbadvanced! Now it shows up all throughout your site, assuming you are using it

Mini-mod for vba:

Install hack as normal, confirm it works.

Edit vbadvanced's index.php

Find:

PHP Code:
'bbcode_quote'
); 
Add under

PHP Code:
// Logician Hack: Dynamic Forum Announcements Hack
$globaltemplates[] = 'dfh_announcement';
$globaltemplates[] = 'dfh_announcement_headercode';
$globaltemplates[] = 'dfh_announcement_popup';
// Logician Hack: Dynamic Forum Announcements Hack 

Find

PHP Code:
######################### News ######################### 
Add ABOVE

PHP 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 
Now, edit your vbAdvanced INDEX template.

Find:

</head>

Add ABOVE

$dfh_announcement_headercode

Find:

$header
$navbar

CHANGE TO:

$dfh_announcement_popup
$header
$navbar
$dfh_announcement


Or put the two announcement bits wherever you want them to appear. Don't forget to do this for all your styles.

I may add this to the add-on hack section, but it's such a little mod - no code changes, just figuring out where the code goes in vba's scheme of things - it may not be worth the bother.

Enjoy, and thanks again Logician for a great hack!
prolly overlooking something dumb here, but my vba index.php file doesn't have any of that code you mentioned. we are talking vba cmps right? if so, what am i missing here?

my index.php code:

PHP Code:
<?php
// ++=========================================================================++
// || vBadvanced CMPS v1.0 RC2                                                ||
// || ? 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved      ||
// || This file may not be redistributed in whole or significant part.        ||
// || http://vbadvanced.com                                                   ||
// ++ ========================================================================++

error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''adv_index');
define('VBA_PORTAL'true);

// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================

chdir('./forums');

// ============================================
// No Further Editing Necessary!
// ============================================

require_once('./global.php');

print_portal_output($home);

?>
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 01:52 PM.


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.05002 seconds
  • Memory Usage 2,356KB
  • 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
  • (5)bbcode_php
  • (8)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