vb.org Archive

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

Logician 02-25-2003 07:32 PM

Quote:

Originally posted by Boofo

But there's no way to be able to do it in the announcement itself? That would make it easier if you want to change the size of text on the fly. ;)

Not tested but I guess you can apply bbcodeparse2 to the hack code. Like this:

Replace: (2 instances!)
PHP Code:

$matches14[2]=bbcodeparse(trim($matches14[2])); 

with
PHP Code:

$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1


Boofo 02-25-2003 07:51 PM

Worked like a charm. Thank you, Sinan! ;)

One last question...all bbcode or html code HAS to be in between the tags, right? You can't do it before and after the tags.

Like this:

Quote:

[[($bbuserinfo[usergroupid]==6)]]<normalfont>
and not like this:

Quote:

<normalfont>[[($bbuserinfo[usergroupid]==6)]]

Logician 02-25-2003 08:01 PM

that's right because the announcement is only the part in-between conditionals. Rest including the conditionals are cut when it is parsed

Boofo 02-25-2003 08:07 PM

Thank you for confirming that for me. Another fantastic hack by the "Great One!" I'm definitely going to have to make a trip back over there one of these days to meet the Master. ;)

Logician 02-25-2003 08:30 PM

thank you for the undue kind words.. :)

Bad Bunny 02-26-2003 06:08 AM

It was a stupid mistake on my poart.
As usual, your hack is awsome. Not that I ever doubted you. heh (Would not have installed it otherwise)

Thanks for all your hard work.

Triade 03-07-2003 07:14 AM

I didn't installed this hack, but i have a question:

How many time the message stay in the user's screen?
I explain: the user see the message, but when it disappear?
There's a time for it or it rest in the page all the time?

Logician 03-07-2003 01:17 PM

Quote:

Originally posted by Triade
I didn't installed this hack, but i have a question:

How many time the message stay in the user's screen?
I explain: the user see the message, but when it disappear?
There's a time for it or it rest in the page all the time?

The announcement is a part of the page (HTML code), not a popup, so it stays there when user loads the main page.

If you want it not displayed anymore, you need to delete/modify it from your Admin CP..

Logician 03-22-2003 12:39 PM

Here is a April Fools Day announcement for people who is using this hack: :rambo:

Enter this announcement in your dynamic announcement box:
Quote:

[[($bbuserinfo[userid]>0 AND date("m-d")=="04-01")]]
[ SIZE=4][ COLOR=red]Our member [ b]$bbuserinfo[username][ /b] has been caught while trying to hack into our site server and we are instituting legal proceedings ASAP. In the mean time please do not contact $bbuserinfo[username], nor reply his posts/pms. Please [ url="http://yoururl/forum/showthread.php?s=&threadid=x"]get more info here now![/ url][ /COLOR][ /SIZE]
[[/($bbuserinfo[userid]>0 AND date("m-d")=="04-01")]]
(Remove spaces in vbcodes and edit XX with a threadid)

You can insert it now, you don't need to wait for April 1st. This announcement will be visible in that day only if visitor is a forum member (it is invisible to guests). Everyforum member will see his name in this announcement and following the link will take them to a thread of your choice. :cool:

Enjoy..

Boofo 03-22-2003 01:03 PM

LOL at Sinan. Getting in to the old April Fool's day spirit already. ;)

Would there be a way to make an addon where you could enter pre-made announcements like this for different days of the year and it could pull it from the db as needed?


All times are GMT. The time now is 12:21 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.01442 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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