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)

ShadowOne 11-19-2005 11:14 AM

is it possible for you to add some options in the admincp?
like where you can type in a username to send it to or the user number...
And Maybe Have It Seperated By Commas(,), so i can put more than one username or number, like to send it to lets say 16 people....but only one time or whenever i need to...
or just click a radio button or something providing which usergroup you want it to be sent out to....
and maybe have a radio button for guests too...

Logician 11-19-2005 11:48 AM

Quote:

Originally Posted by ShadowOne
is it possible for you to add some options in the admincp?
like where you can type in a username to send it to or the user number...
And Maybe Have It Seperated By Commas(,), so i can put more than one username or number, like to send it to lets say 16 people....but only one time or whenever i need to...
or just click a radio button or something providing which usergroup you want it to be sent out to....
and maybe have a radio button for guests too...

You can point users with their userid

[[($bbuserinfo[userid]==1 OR $bbuserinfo[userid]==1)]]
Show this announcement if user id is 1 or 2
[[/($bbuserinfo[userid]==1 OR $bbuserinfo[userid]==1)]]

Logician 11-19-2005 11:48 AM

Quote:

Originally Posted by lulala
[[($bbuserinfo[lastvisit] and $bbuserinfo[lastvisit] < strtotime("-7days"))]]
Show this announcement if page visitor has not visited my board for over 7 days
[[/($bbuserinfo[lastvisit] and $bbuserinfo[lastvisit] < strtotime("-7days"))]]

Is It Correct as above?
I cannot show it... :ermm:

put space between -7 and days

Logician 11-19-2005 11:52 AM

Quote:

Originally Posted by lulala
Popup Frequency Unit is Hour
Can change to Second or minute??

edit pluggin "Dynamic Forum Home Announcement Hack by Logician" at "forumhome_complete"

find:
PHP Code:

        if ($vbulletin->userinfo[lastactivity] > AND $vbulletin->userinfo[lastactivity] > mktime (date("H")-$vbulletin->options[dynamic_pop_freq], date("i"), date("s"), date("m"), date("d"), date("Y")))     //popup once in every XX hours 

replace it as:

PHP Code:

        if ($vbulletin->userinfo[lastactivity] > AND $vbulletin->userinfo[lastactivity] > mktime (date("H"), date("i")-$vbulletin->options[dynamic_pop_freq], date("s"), date("m"), date("d"), date("Y")))     //popup once in every XX hours 

Save it.

Now it is minutes

ShadowOne 11-19-2005 11:55 AM

Quote:

Originally Posted by Logician
You can point users with their userid

[[($bbuserinfo[userid]==1 OR $bbuserinfo[userid]==1)]]
Show this announcement if user id is 1 or 2
[[/($bbuserinfo[userid]==1 OR $bbuserinfo[userid]==1)]]


well i was trying to see if you could somehow add what i suggested? :ermm:

lulala 11-19-2005 12:19 PM

Quote:

Originally Posted by Logician
put space between -7 and days

I tried what you say,but the same

It not work.... :disappointed:

lulala 11-19-2005 12:24 PM

It's work....YAYA
I used this variable "$bbuserinfo[lastactivity]"
[[($bbuserinfo[lastactivity] and $bbuserinfo[lastactivity] < strtotime("-7days"))]]
Show this announcement if page visitor has not visited my board for over 7 days
[[/($bbuserinfo[lastactivity] and $bbuserinfo[lastactivity] < strtotime("-7days"))]]

Logician 11-19-2005 04:44 PM

Quote:

Originally Posted by lulala
It's work....YAYA
I used this variable "$bbuserinfo[lastactivity]"
[[($bbuserinfo[lastactivity] and $bbuserinfo[lastactivity] < strtotime("-7days"))]]
Show this announcement if page visitor has not visited my board for over 7 days
[[/($bbuserinfo[lastactivity] and $bbuserinfo[lastactivity] < strtotime("-7days"))]]

When you use lastactivity, the conditional checks his last forum visit date, not last post date.

lulala 11-19-2005 06:34 PM

Quote:

Originally Posted by Logician
When you use lastactivity, the conditional checks his last forum visit date, not last post date.

Ya,it 's i need.
Could you show how to
show an announcement in user's birthday?
What is user's birthday of conditional syntax?
$bbuserinfo[birthday] ?
I want to show "Happy Birthday" to User?

Brandon Sheley 11-20-2005 05:04 PM

Quote:

Originally Posted by Logician
[[($bbuserinfo[userid] AND $bbuserinfo[posts]<5)]]
Hello $bbuserinfo[username] pls post more :D
[[($bbuserinfo[userid] AND $bbuserinfo[posts]<5)]]

Translation :

If visitor is a user but has less than 5 posts, say :

Hello $bbuserinfo[username] pls post more :D


thank you :D


All times are GMT. The time now is 09:35 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.01431 seconds
  • Memory Usage 1,755KB
  • 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
  • (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