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)

Logician 02-10-2006 12:58 PM

Quote:

Originally Posted by D.Ilyin
Is there any chance to do something like that?
Code:

[[($bbuserinfo[usergroupid]==3 OR $bbuserinfo[usergroupid]==6)]]
Request activation HERE
[[/($bbuserinfo[usergroupid]==3 OR $bbuserinfo[usergroupid]==6)]]
[[($bbuserinfo[usergroupid]==6)]]
This text see ONLY awaiting conf. group & I.
[[/($bbuserinfo[usergroupid]==6)]]

I see (admin) only first condition :( and do not see second.
I tried also like this:
Code:

[[($bbuserinfo[usergroupid]==3 OR $bbuserinfo[usergroupid]==6)]]
Request activation HERE
[[($bbuserinfo[usergroupid]==6)]]
This text see ONLY awaiting conf. group & I.
[[/($bbuserinfo[usergroupid]==6)]]
[[/($bbuserinfo[usergroupid]==3 OR $bbuserinfo[usergroupid]==6)]]

But stil see only first condition :(.

Any help for this? Or maybe in future version?

It is not clear to me what exactly you are trying to achieve but some notes:

1- Hack Only displays one announcement per user. If more than 1 conditional applies, the one with highest priority (=which is at top) is displayed.
2- Admin is usergroup 6, not 3

fkatzenb 02-10-2006 01:54 PM

I am trying to figure out a way to have a dynamic message for all people that only displays between two different server times... Is there a variable that I can use similar to the linux data function to pull hours and minutes from to allow me to show a message between 9:50am and 10:30am?

Thanks!

Frank

D.Ilyin 02-10-2006 03:54 PM

Quote:

Originally Posted by Logician
It is not clear to me what exactly you are trying to achieve but some notes:

I'd like that Users Awaiting confirmation & Admins see that line:
HTML Code:

Request activation HERE
and admins only see that additional line
HTML Code:

This text see ONLY awaiting conf. group & I.
Quote:

Originally Posted by Logician
1- Hack Only displays one announcement per user. If more than 1 conditional applies, the one with highest priority (=which is at top) is displayed.

yepp... i see why my condition not work :(
And what about future versions?
Quote:

Originally Posted by Logician
2- Admin is usergroup 6, not 3

i know that.... :ermm:

fkatzenb 02-10-2006 04:18 PM

Quote:

Originally Posted by fkatzenb
I am trying to figure out a way to have a dynamic message for all people that only displays between two different server times... Is there a variable that I can use similar to the linux data function to pull hours and minutes from to allow me to show a message between 9:50am and 10:30am?

Thanks!

Frank

I just figured out what to do

edited functions_dfha.php and added
PHP Code:

// time variables...
$time_hour date("H");
$time_minute date("i");
$time_zone date("T"); 


Code:

[[($time_hour==3 AND $time_minute>=45 AND $time_minute<=59)]]
The server is schedule to do perform a daily backup between 0345 CST and 0430 CST.  Current Server Time is $time_hour$time_minute $time_zone
[[/($time_hour==3 AND $time_minute>=45 AND $time_minute<=59)]]
[[($time_hour==4 AND $time_minute>=0 AND $time_minute<=29)]]
The server is schedule to do perform a daily backup between 0345 CST and 0430 CST.  Current Server Time is $time_hour$time_minute $time_zone
[[/($time_hour==4 AND $time_minute>=0 AND $time_minute<=29)]]


fkatzenb 02-10-2006 04:38 PM

Ok... I wasnt thinking clearly on the date function... fixing that now... new to php.

PHP Code:

// time variables...
$time_for_announce date("Hi"); 

Code:

[[($time_for_announce>=0345 AND $time_for_announce<=0430)]]
The server is schedule to do perform a daily backup between 0345 CST and 0430 CST.  Current Server Time is $time_for_announce
[[/($time_for_announce>=0345 AND $time_for_announce<=0430)]]



Frank

David_R 02-14-2006 01:25 PM

I had this hack installed on vbulletin 3.0.x version, installed the new 3.5.3 via plugin system and now i find Forum Home Table Announcement and Forum Home PopUp Announcement appearing twice in my AdminCP..

thanks.

Logician 02-15-2006 05:30 AM

Quote:

Originally Posted by David_R
I had this hack installed on vbulletin 3.0.x version, installed the new 3.5.3 via plugin system and now i find Forum Home Table Announcement and Forum Home PopUp Announcement appearing twice in my AdminCP..

thanks.

Please read and follow the instructions labelled "IMPORTANT FOR 3.x USERS:" in the first post of the thread.

D.Ilyin 02-15-2006 07:46 AM

Quote:

Originally Posted by D.Ilyin
And what about future versions?

Logician will you plan to add in future version support for multi annoucements for milti user groups? As i described above.

Logician 02-15-2006 09:22 AM

Quote:

Originally Posted by D.Ilyin
Logician will you plan to add in future version support for multi annoucements for milti user groups? As i described above.

I think you can do what you like to do with the hack as it is:
PHP Code:

[[($bbuserinfo[usergroupid]==6)]]
Request activation HEREThis text see ONLY awaiting confgroup I.
[[/(
$bbuserinfo[usergroupid]==6)]]
[[(
$bbuserinfo[usergroupid]==3)]]
Request activation HERE
[[/(
$bbuserinfo[usergroupid]==3)]] 


D.Ilyin 02-15-2006 01:25 PM

Logician, yes, i did as you sad two day's ago, but....
but i use this scheme:
annoucement: for guests and not login
annoucement: for registred
annoucement: for moders
and another 4 groups.
i'd just like to add some notes for all annoucements visible for admins only... some for moders.
That's why i asked you about crossed permisions for annoucements.

PS Anyway thanks for this usefull hack!!!! It's very helpfull!!!! :)
PSS Sory for my bad english :(


All times are GMT. The time now is 08:12 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.01403 seconds
  • Memory Usage 1,760KB
  • 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_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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