vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals (https://vborg.vbsupport.ru/showthread.php?t=64189)

Imperial Fritz 11-30-2004 03:48 PM

Installed :) Thanks for the great hack.


edit: removed stupid question, found answer :)

docvader 12-07-2004 03:45 AM

Awesome hack. Installs easily on 3.3, and works great.
Thanks!

docvader 12-07-2004 04:18 AM

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.)

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.

Edric 12-07-2004 04:55 AM

How do I change the colours of the announcement, I am not referring to the popup window.
Is it possible to have a white background and a red border (the announcement seems to have a frame, I am referring to that). My coding knowledge is close to nothing but with the right instructions I find no problems.

Any help is appreciated thanks.

docvader 12-07-2004 05:12 AM

Edric, I think you do it by going into your Admin CP, into the general settings for that particular style, (Styles and Templates/ Style Manager/ All Style Options) and altering the "panel" and "panel" surround areas (lots of options there). It might affect other parts of your board though. I have no doubt that you could rewrite and add html to the dfh_announcement template.

Tbird66 12-15-2004 02:51 PM

Installed :) I used Hack 1 and put the variables into the forum header, and it worked with vBadvanced CMPS without doing the integration to CMPS!

Thanks!

Tbird66 12-15-2004 08:25 PM

I have one question - in my announcement logic I need to check the email address that a user has stored in their profile; how do I do this?

Edit:
doh! - $bbuserinfo[email] :o

trackpads 12-19-2004 12:29 PM

Excellent work!

trackpads 12-19-2004 01:27 PM

This is a great hack!

I have one problem related to my site if you can help. I have javascript pulldowns on the nav of my site and the dhtml popup displays under these. Is there a way to make this show up below the message instead of above it?

Thanks again,

-Jason

T3MEDIA 12-19-2004 01:34 PM

Quote:

Originally Posted by ixian
Aha!!! I have it working for vbadvanced!

Im so excited I didnt read to see if anyone got this to work for vbindex!!!

T3MEDIA 12-19-2004 01:46 PM

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. :rolleyes:

T3MEDIA 12-19-2004 01:58 PM

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?

T3MEDIA 12-24-2004 11:49 AM

Hey how about a clean list of commands for other users to use? that would be nice

T3MEDIA 12-24-2004 01:08 PM

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?

T3MEDIA 12-24-2004 02:18 PM

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.

Logician 12-24-2004 03:40 PM

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?

T3MEDIA 12-24-2004 10:38 PM

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.

Logician 12-25-2004 07:23 AM

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.

T3MEDIA 12-28-2004 12:15 AM

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)]]

paulz 01-01-2005 02:16 AM

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);

?>


n_wattam 01-01-2005 10:36 PM

If i want to display the announcement if other sections of the forum i'm guessing i edit the FORUMDISPLAY / FORUMDISPLAY and use the following code in the same place

Quote:

STEP 6- Edit forumhome/forumhome template and find:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</head>
<body>
$header
$navbar
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

REPLACE IT AS :
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$dfh_announcement_headercode
</head>
<body>
$dfh_announcement_popup
$header
$navbar
$dfh_announcement
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The thing is i have done this and it doesnt work??? any ideas

paulz 01-02-2005 12:02 AM

if you want the same thing everywhere on the site, the easiest way is to put it at the very bottom of the header template. search this forum for "header" and you'll find a link to an excellent article on the hack to do this.

n_wattam 01-02-2005 12:15 AM

the problem is when i put this code in any other place it does not work for some reason!!!!

Logician 01-02-2005 08:46 AM

Quote:

Originally Posted by n_wattam
the problem is when i put this code in any other place it does not work for some reason!!!!

https://vborg.vbsupport.ru/showpost....&postcount=126

T3MEDIA 01-04-2005 03:51 AM

Quote:

Originally Posted by Logician
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.

Will it work for Single-Line Text Boxes then???

T3MEDIA 01-04-2005 04:15 AM

Quote:

Originally Posted by Host Directory
Works a treat Logician !
Try it yourself - www.hostcompanies.com/forums - register and then do not confirm by email - now login and your see the message explaining that the email may have been bounced. Obviously you can't post either. Now confirm the registration email and the message dissapears and everything works fine.

Brilliant !

I have recently had a lot of bounced emails from people trying to register because of their stupid spam software - thats one of the reasons why people sign up and never post. Atleast they now know its their email spam software which is the problem.

Your a star Logician... a star!

Im almost positive he wont do that.

Anyone figured out other cool conditionals?

T3MEDIA 01-04-2005 02:34 PM

I know I have posted a few here... sorry.
how do I do a syntax for something that is null?
=="" I am not sure if "" is ok. or can I do ()

TruthElixirX 01-05-2005 01:31 AM

Sorry, I didn't read through all 18 pages to see if this had already been answered but ehre:

https://vborg.vbsupport.ru/attachmen...chmentid=18274

there are two edit boxes. I've only got the bottom one ot edit the bright green pop up. I do not have the edit box to change the one on the actual forum. Any ideas?

Also, is there anyway to change the color of the pop-up announcement.

Logician 01-08-2005 08:41 AM

Hack of Hack:

If you apply this modification, the popup announcement will popup once in every 12 hours:

Edit index.php, find (hack code):
PHP Code:

$dfh_announcement_popuptopaste dynamic_a($dynamic_popup); 

REPLACE IT AS:
PHP Code:

$dfh_announcement_popuptopaste dynamic_a($dynamic_popup);
if (
$bbuserinfo[lastactivity]>AND $bbuserinfo[lastactivity]>mktime (date("H")-12date("i"), date("s"), date("m"), date("d"), date("Y")))     {unset ($dfh_announcement_popuptopaste);} //popup once in every XX hours 

(Change 12 above if you want to apply a different popup duration.)

djjeffa 01-16-2005 09:05 PM

i upgraded to 3.0.5 and its in my admin panel but its not showing up.
can I get a lil help?

lanc3lot 01-17-2005 01:33 PM

Hmm, and please Logician(nice nick, u are from greece maybe?:D) tell us if this works with 3.0.5 :)

Thnx

yoyoyoyo 01-17-2005 03:10 PM

Quote:

Originally Posted by lanc3lot
Hmm, and please Logician(nice nick, u are from greece maybe?:D) tell us if this works with 3.0.5 :)

Thnx

works fine with 3.0.5!

T3MEDIA 01-18-2005 02:45 AM

Quote:

Originally Posted by Logician
Hack of Hack:

If you apply this modification, the popup announcement will popup once in every 12 hours:

Edit index.php, find (hack code):
PHP Code:

$dfh_announcement_popuptopaste dynamic_a($dynamic_popup); 

REPLACE IT AS:
PHP Code:

$dfh_announcement_popuptopaste dynamic_a($dynamic_popup);
if (
$bbuserinfo[lastactivity]>AND $bbuserinfo[lastactivity]>mktime (date("H")-12date("i"), date("s"), date("m"), date("d"), date("Y")))     {unset ($dfh_announcement_popuptopaste);} //popup once in every XX hours 

(Change 12 above if you want to apply a different popup duration.)

Hey bro...
how do I do a syntax for something that is null?
=="" I am not sure if "" is ok. or can I do ()

master786 01-19-2005 10:00 AM

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?

lanc3lot 01-20-2005 01:28 AM

Just installed:)

It works ok...

But just in case, is there any uninstall script to have?

Also, what is the "load" of page, that creates


Thanks in advance:)

Ps

A question:

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?

Ps2

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?

Ps3

Something last...To add more than one announcement, i just write them under the first one?

Thnx and sorry for the q, just trying to fix it better:)

lanc3lot 01-21-2005 10:48 AM

Anybody else who use this hack, knows about that i asked?

As i think Logician is not available right now:(

Mechanical Mind 01-22-2005 02:34 PM

* clicks install *

I am looking forward to using this hack. Thanks Logician.

This may be the perfect tool to irritate "lurkers" into posting.

Plus - great instructions and thread here. This is the first hack that I have been able to successfully install.

I'll update this post when I learn how to use it... :nervous:

UPDATE

This is the best frickin' hack in modern history. I don't know what's better vBadvanced or this! Seriously!

kall 01-22-2005 08:24 PM

*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. :)

bigmonay2k 01-23-2005 12:41 AM

I got this... what I am doing wrong?? Fatal error: Call to undefined function: dynamic_a() in /home/gamewar2/public_html/forums/index.php on line 427

djjeffa 01-23-2005 03:43 PM

Quote:

Originally Posted by djjeffa
i upgraded to 3.0.5 and its in my admin panel but its not showing up on my index page
can I get a lil help?

?BUMP


All times are GMT. The time now is 11:13 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.01829 seconds
  • Memory Usage 1,882KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (9)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete