vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals (https://vborg.vbsupport.ru/showthread.php?t=97073)

Yousof 07-10-2007 05:43 AM

when i press close , why the popup doesnt close ? its annoying

Desesperao 07-13-2007 12:50 AM

HI,

This is my community: http://www.foromotos.com

You can see the popup announcement at the top. This is the problem.

I need to show the popup in the middle of the page.

Is it possible?

I have changed some parameters in the "dfh_announcement_popup" template but I can?t put the popup in the middle

Thanks

Desesperao 07-19-2007 06:05 PM

Any idea?

symptome 08-01-2007 05:56 AM

at http://www.symptome.ch you see a picture in the welcome message.
this is only avaiable today.

why is there so much space at the top of the picture?

thanks a lot!
marcel

this is my code:
Quote:

<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
<td width="18%"><img border="0" src="http://www.symptome.ch/vbboard/images/schweiz.jpg" width="135" height="92"></td>
<td width="82%"><b>Schweizer Nationalfeiertag</b><br>
Ich w?nsche allen Schweizern unter uns heute einen tollen Feiertag!<br>
Wer eine 1.August-Rede halten m?chte, kann das <a href="http://www.symptome.ch/vbboard/alle-themen/8680-rede-1-august.html">hier</a>
tun.</td>
</tr>
</table>

silence88 08-02-2007 01:42 PM

Thanks alot, i tried installing this once then it didnt work. But now it works i dont know why. WHO CARES LOL IT WORKS!

brfrankl 08-08-2007 04:18 PM

Ok, didn't find this mentioned anywhere, but how would I make an announcement "expire" at a certain time (say august 20, 2007 8:00pm EST)...

Great mod by the way!

skariko 08-29-2007 09:52 PM

Quote:

Originally Posted by morrow (Post 1024489)
Nice hack... had it installed for a while but unfortunately, Photopost no longer functions when this product is enabled. Once I disabled the product, Photopost fired right back up again.

I noticed someone else asked about this but didn't get a response. Does anyone have this working with VBA/Photopost?

Thanks

*I'll leave it installed until tomorrow night. I'll fool around with it a little and if I figure anything out, I'll be sure to post the results. Too bad, I really liked this one!

I've the same problem.

Do you resolve that?

woodcreeker 09-03-2007 10:56 AM

Clicked Install !!!! Worked perfect for vB 3.6.8 !!!!

Great work !!!!

periphrastic 09-30-2007 03:30 AM

installed & currently working & thank you (3.6.8)

Quote:

Originally Posted by Fusion.nl (Post 895122)
Tested it. The > before strtotime must be <. Then its fine. :)

Code:

[[($bbuserinfo[usergroupid]==2 AND $bbuserinfo[posts]<1 AND $bbuserinfo[joindate] < strtotime("-1 days"))]]


that was helpful, thanks

badboyz 10-07-2007 10:18 AM

how do i stop this popups for guest?

andor 10-09-2007 03:48 AM

3.6.8 installation here - very nice job - laughed when I saw first message. Thanks!

lolzers 10-09-2007 11:11 AM

Thanks a lot for this. Just installed it now.

SemperFideles 10-19-2007 02:26 PM

What are the conditionals for:

1. Day of the week? (e.g. Today is Saturday)
2. Hour of the day? (e.g. Time is between 3:00 pm and 5:00 pm)

Soliloquy 10-19-2007 04:18 PM

Quote:

Originally Posted by SemperFideles (Post 1363758)
What are the conditionals for:

1. Day of the week? (e.g. Today is Saturday)
2. Hour of the day? (e.g. Time is between 3:00 pm and 5:00 pm)

SemperFideles, I've been wondering the same thing, so I just started experimenting and found the answer to your first question:

Code:

[[(date("l"))==Saturday]]Test...[[/(date("l"))==Saturday]]
Still working on the second one. Theoretically it should be
Code:

[[(date("G"))==13]]Test...[[/(date("G"))==13]]
but that's not working. I'll report back later.

indiancinema 10-20-2007 01:15 AM

how do i add img code?
any help

Soliloquy 10-20-2007 05:21 AM

Day (as a full text representation of the day of the week)
Code:

[[(date("l"))==Saturday]]Today is Saturday[[/(date("l"))==Saturday]]
Month (full text representation of the month)
Code:

[[(date("F"))==October]]This is the month of October[[/(date("F"))==October]]
Year (four digits)
Code:

[[(date("Y"))==2007]]This is the year 2007[[/(date("Y"))==2007]]
Whether it's a.m. or p.m. (must use capital letters)
Code:

[[(date("A"))==AM]]It's morning[[/(date("A"))==AM]]
if it's a certain hour (using 24 hour format without leading zeros)
Code:

[[(date("G"))==0]]It's way too early in the morning[[/(date("G"))==0]]
if it's a certain hour or later (using 24 hour format without leading zeros)
Code:

[[(date("G"))>=10]]You're late for breakfast[[/(date("G"))>=10]]
So I think this will work for you, though I haven't tested it yet:
Code:

[[(date("G"))>=14 AND (date("G"))<=17]] It's between three p.m. and five p.m., time to get ready for dinner[[/(date("G"))>=14 AND (date("G"))<=17]]
You can find more parameters that should work with the date function in the PHP manual.:)

indiancinema 10-20-2007 10:21 AM

how do i insert image in the pop up?

SemperFideles 10-21-2007 09:43 AM

Quote:

Originally Posted by Soliloquy (Post 1363824)
SemperFideles, I've been wondering the same thing, so I just started experimenting and found the answer to your first question:

Code:

[[(date("l"))==Saturday]]Test...[[/(date("l"))==Saturday]]
Still working on the second one. Theoretically it should be
Code:

[[(date("G"))==13]]Test...[[/(date("G"))==13]]
but that's not working. I'll report back later.

Thanks. I have the first code working in the Table Announcement but, for some reason, it doesn't work in the popup announcement until I set the frequency to 0.

Desesperao 11-02-2007 03:32 PM

I can“t insert images in the pop up.

Any idea?

Desesperao 12-21-2007 11:23 PM

How can I insert images in the popup?

Raptor 01-03-2008 02:35 AM

tested perfect on 3.6.4 - thanks

wavelets95 02-08-2008 11:58 AM

thanks for this mod ! I'm on 3.6.4

winpro19 02-11-2008 06:36 PM

on 3.6.8, when I click "Close", nothing happens. My popup template is not edited....

Any ideas?

Thanks

noreturn 03-19-2008 08:37 PM

Hi - Could some one please explain to me the correct way to include these other usergroups (2,3,5,7) IDs in this? I have tried duplicating the line of code with only editing the usergroups ID. But that did not work. Is there a way to do it all in the same line of code?

[[($bbuserinfo[usergroupid]==2)]]

Thanks

anoob 05-13-2008 09:12 PM

Does this work in vb 7?

Logician 05-14-2008 06:37 AM

Quote:

Originally Posted by anoob (Post 1518760)
Does this work in vb 7?

I haven't tested it but this hack will probably work in 3.7.0. Yet IMO it is pointless to use this hack in 3.7.0 as it already introduced a very similiar builtin feature.

dt_truck11 05-15-2008 11:16 AM

Quote:

Originally Posted by Logician (Post 1519095)
I haven't tested it but this hack will probably work in 3.7.0. Yet IMO it is pointless to use this hack in 3.7.0 as it already introduced a very similiar builtin feature.

ive tried this is in 3.7 and it doesnt completely work. the welcome message that is below the navbar works but the pop up message does not

TheMusicMan 07-06-2008 06:27 AM

Quote:

Originally Posted by Logician (Post 1519095)
I haven't tested it but this hack will probably work in 3.7.0. Yet IMO it is pointless to use this hack in 3.7.0 as it already introduced a very similiar builtin feature.

What's this feature...? I have only just upgraded and haven't discovered everything as yet. Can you advise please Logician? Ta.

Logician 07-06-2008 09:27 AM

Quote:

Originally Posted by TheMusicMan (Post 1567935)
What's this feature...? I have only just upgraded and haven't discovered everything as yet. Can you advise please Logician? Ta.

You can find it in Admin CP under "Notices".

Domenico 07-07-2008 01:45 PM

Can this be used to show a popup when someone starts a new thread in a particular forum on your board?

Konstantinos 08-26-2008 09:12 AM

Quote:

Originally Posted by morrow (Post 1024489)
Nice hack... had it installed for a while but unfortunately, Photopost no longer functions when this product is enabled. Once I disabled the product, Photopost fired right back up again.

I noticed someone else asked about this but didn't get a response. Does anyone have this working with VBA/Photopost?

Thanks

*I'll leave it installed until tomorrow night. I'll fool around with it a little and if I figure anything out, I'll be sure to post the results. Too bad, I really liked this one!

this conflicts with photopost when the hack is configured to be used in all pages. can u fix it ?

Ransy72560 01-18-2009 08:07 PM

Great mod, thanks so much for this! Installed!

JoeBOBBillyTed 02-12-2009 12:24 PM

For the guy wanting the img code, I believe you can use HTML.

<img src="Img URL GOES HERE" />

JoeBOBBillyTed 02-15-2009 02:39 PM

[[($bbuserinfo[lastvisit]<='1234704000' AND strtotime("now") < '1235258206')]]<a href='http://www.sportscardfreaks.com/forums/contests/137396-new-guess-ending-price-contest-free-cards-join.html'>New Contest For All</a> - Check it out, if you collect another sport, a replacement prize will be offered :)[[/($bbuserinfo[lastvisit]<='1234704000' AND strtotime("now") < '1235258206')]]

I am trying to make it so that this message shows up only to people that haven't visited the site since a certain date, and I want the messages to stop showing up at a certain date. Finally, I want the message to show up 1 time only.

JoeBOBBillyTed 02-17-2009 02:06 PM

No one?

tafreeh 08-09-2009 03:42 AM

does it work with 3.8?

ruchemist 12-27-2009 07:14 PM

Quote:

Originally Posted by tafreeh (Post 1863895)
does it work with 3.8?

Yes, it works. Version 3.8.4 - tested

dhaimy 01-20-2010 06:39 PM

thanks
an update vb4

TexArkana 06-19-2010 05:23 AM

FWIW... I'm using this in vB 3.8.5, along with the hack to make the announcement appear on every forum page, not just FORUMHOME. Works fine. (Nice mod BTW. Thanks!)

imedic 02-16-2011 08:02 AM

Quote:

Originally Posted by dc3dreamer (Post 827831)
Update #2 (final!): All is well now. Here is the code for dynamic_a() which implements nested conditionals:
Code:

function dynamic_a($logician_dfa_incoming1)
{
    extract ($GLOBALS);

    // Prevent successive conditionals on separate lines from generating
    // spurious <br /> after running thru BbCode parser. You might not
    // like this, it's optional.
    $logician_dfa_incoming1 = ereg_replace("\]\][\r\n\f \t]*\[\[", "]][[", $logician_dfa_incoming1);
    // Recursively process nested conditionals
    $logician_dfa_incoming1 = trim(dynamic_b($logician_dfa_incoming1));
    // Finish up by running result through BbCode parser
    if (trim($logician_dfa_incoming1))
    {
        $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
        $logician_dfa_incoming1 = $parser->do_parse($logician_dfa_incoming1, 1, 1, 1, 1, 1, 1);
    }
    return $logician_dfa_incoming1;
}

function dynamic_b($dc3dreamer_dfa_incoming1)
{
    extract ($GLOBALS);

    while (preg_match("/\[\[(.*)\]\](.*)\[\[(\/\\1)\]\]/siU", $dc3dreamer_dfa_incoming1, $matches14))
    {
        @eval ('if ('.stripslashes($matches14[1]).') { $eval_deger= "1"; } else { $eval_deger= "0"; }');
        if ($eval_deger == 1)          //if conditional applied, replace with inner text
        {
            $dc3dreamer_dfa_incoming1 = dynamic_b(str_replace($matches14[0], $matches14[2], $dc3dreamer_dfa_incoming1));
        }
        else                            // Conditional not applied, delete the whole chunk
        {
            $dc3dreamer_dfa_incoming1 = dynamic_b(str_replace($matches14[0], '', $dc3dreamer_dfa_incoming1));
        }
    }
    return $dc3dreamer_dfa_incoming1;
}

The recursion continues until there are no conditionals found, at which point the final result is passed through the BbCodeParser at the end of the first method. The trick was to remove line endings from conditionals that follow one another with just newlines between. They generated extra breaks and line spacing after going through the BbCode parser. You might want to remove the * in the regexp for the call to ereg_replace(). Er, do I really have to name my parameter variable like it might exist in the host page? I hope not, but I copied Logician's style. I would have used sumpin' like $src for the parameter var :nervous:

I'm slowly coming up to speed on PHP :nervous: I was killed by the $bbuserinfo[membergroupids] variable testing against values, till my ancient Perl tablets fell out on the ground. Yumba! It can be an array and it may not even exist! Well, rookie me! I got it now.

This is so nice! Nested conditionals open up a whole new world of possibilities, but ... Thank you Logician Thank you Logician Thank you Logician ...

I have read almost all of this thread but can't figure out where to put this code ....
Does it goes in the window where you put the announcements, or you need to do some file editing?
A short how to use description would be v appreciated. :)

Very good mode, mostly for the pop up. The conditional announcement can be done easyer with other mods however this one gives maximum flexibility.
For example I need to make an anouncement show if you have not selected aditional usergroup and probably this one can help.
Thanks for the mod. Will install soon.


All times are GMT. The time now is 06:15 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.01642 seconds
  • Memory Usage 1,840KB
  • 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
  • (13)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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