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)

illPhever 06-10-2005 05:26 PM

logician,

thanks for this hack. i just installed it and it works great. it is very handy! this is the kind of thing that should come standard in vb.

AaronFry 07-07-2005 12:52 AM

awesome! thanks for the great hack!

EFairy 08-01-2005 02:52 AM

Thank you very much, I love it!

Antivirus 08-20-2005 03:00 PM

Logician,
Great hack, this feature should be standard on all vB upgrades, i was using this previously, however now that we're testing 3.5 rc2, i was wondeiring if you were working on a ported version for 3.5, for eventual release?

acidkid00 08-23-2005 09:29 PM

great hack... installed.. thanks

pgowder 08-31-2005 12:59 PM

I'm trying to have a different header/footer for certain templates. Can this hack do this??

Logician 08-31-2005 01:14 PM

Quote:

Originally Posted by pgowder
I'm trying to have a different header/footer for certain templates. Can this hack do this??

no.. but what you wanted can be achieved this way:

make a copy of these lines in global.php:

PHP Code:

eval('$header = "' fetch_template('header') . '";');
eval(
'$footer = "' fetch_template('footer') . '";'); 

Like
PHP Code:

eval('$header = "' fetch_template('header') . '";');
eval(
'$footer = "' fetch_template('footer') . '";');
eval(
'$header2 = "' fetch_template('header2') . '";');
eval(
'$footer2 = "' fetch_template('footer2') . '";'); 

find :
PHP Code:

    // the really important ones
    
'header',
    
'footer'

and replace it as
PHP Code:

    // the really important ones
    
'header',
    
'footer',
             
'header2',
    
'footer2'

Then user $header2 and $footer2 in anytemplate you like.

CyberRanger 09-01-2005 01:54 PM

Can the conditionals be used to only show the announcement in a certain forum? For example, we have an "Off Topic" area (f=161) where I'd like the announcement to show there but not in other forums. (I have changed the code so that the announcement is part of the header).

Thanks!

Logician 09-01-2005 02:04 PM

Quote:

Originally Posted by westpointer
Can the conditionals be used to only show the announcement in a certain forum? For example, we have an "Off Topic" area (f=161) where I'd like the announcement to show there but not in other forums. (I have changed the code so that the announcement is part of the header).

Thanks!

not tested personally, but I believe this should work in your case:

[[($forumid==161 OR $f==161)]]
...
[[/($forumid==161 OR $f==161)]]

CyberRanger 09-01-2005 02:31 PM

Quote:

Originally Posted by Logician
[[($forumid==161 OR $f==161)]]
...
[[/($forumid==161 OR $f==161)]]

Thanks! I did need to take out the $f==161 then it worked great!


All times are GMT. The time now is 06:07 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.01423 seconds
  • Memory Usage 1,744KB
  • 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
  • (4)bbcode_php_printable
  • (3)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