vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   vB4 Template Conditionals List (https://vborg.vbsupport.ru/showthread.php?t=231525)

Divvy 08-13-2011 09:01 AM

Hello guys,

Maybe someone can help me...

I have this code:
PHP Code:

$template_hook['postbit_userinfo_right_after_posts'] .= '<div style="clear:both;" class="left"><a target="_blank" href="'.$mylink.''.$usernumber.'">'.$mylinktitle.'</a></div>'

That shows a link at postbit with all topics from the user at a two specific forums.

I need that:
- the link only shows when the user have threads at least in one of that two forums.
- If not, the link doesn't appear.

Is there any syntax for this?

Or else, I had another idea...
The links only appear If the user belongs to a specific group.

BirdOPrey5 08-13-2011 09:45 AM

Quote:

Originally Posted by Divvy (Post 2232927)
Hello guys,

Maybe someone can help me...

I have this code:
PHP Code:

$template_hook['postbit_userinfo_right_after_posts'] .= '<div style="clear:both;" class="left"><a target="_blank" href="'.$mylink.''.$usernumber.'">'.$mylinktitle.'</a></div>'

That shows a link at postbit with all topics from the user at a two specific forums.

I need that:
- the link only shows when the user have threads at least in one of that two forums.
- If not, the link doesn't appear.

Is there any syntax for this?

Or else, I had another idea...
The links only appear If the user belongs to a specific group.

You're posting PHP code- that has nothing to do with template conditionals. I suggest asking in the VB4 Programming forum, it's not part of this discussion.

8thos 08-25-2011 01:03 AM

How do you use conditionals to hide a thread by use of it's thread id or a combination of thread ids?

Say for instance, I have a thread in a forum that I don't want guests to view but I want guests to be able to view the whole subforum and it's other threads.

Crow 08-25-2011 05:31 PM

Awesome, thanks!

Dirt Bike Addict 09-12-2011 02:26 PM

Is this the most efficient way to do a multi-THIS_SCRIPT if conditional?

Code:

<vb:if condition="in_array(THIS_SCRIPT, array('search' , 'calendar' , 'usercp' , 'online' , 'faq' , 'album' , 'profile' , 'member' , 'misc' , 'subscription' , 'private' , 'showgroups'))">
Show on the above pages/scripts
<vb:else />
Show on all other pages/scripts
</vb:if>


BirdOPrey5 09-12-2011 04:15 PM

^yes, that is how I would do it.

Dirt Bike Addict 09-12-2011 04:40 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2244931)
^yes, that is how I would do it.

Awesome, thanks Joe!

It might not be a bad idea to have that added to the article, it took me awhile to figure out how to do. :mad:

VinavB 09-13-2011 07:20 AM

any condition for article in CMS ???

Budget101 11-21-2011 03:21 PM

What is the correct syntax for a conditional that is a member with at least 'X' posts/threads made in the last 30 days?

Any ideas? TIA!

BirdOPrey5 11-21-2011 09:02 PM

You cannot use a template conditional for posts within x days, you would need a plugin to calculate this value.


All times are GMT. The time now is 10:25 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02078 seconds
  • Memory Usage 1,743KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)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