Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #61  
Old 17 May 2011, 11:00
genxstan genxstan is offline
 
Join Date: Nov 2009
Can somebody tell me how to hide code tags with something else for unregistered users using if conditional statement?
Reply With Quote
  #62  
Old 17 May 2011, 12:16
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
You need to edit your bbcode templates, such as the template: bbcode_code

Put the entire template in a template conditional- something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Do this for all the code templates you want (CODE, PHP, HTML) and their associated "print" templates as well otherwise people can see them if they go to print the page.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #63  
Old 18 May 2011, 19:15
genxstan genxstan is offline
 
Join Date: Nov 2009
Originally Posted by BirdOPrey5 View Post
You need to edit your bbcode templates, such as the template: bbcode_code

Put the entire template in a template conditional- something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Do this for all the code templates you want (CODE, PHP, HTML) and their associated "print" templates as well otherwise people can see them if they go to print the page.
Thanks for the help mate
Reply With Quote
  #64  
Old 03 Sep 2011, 18:19
Curious Too Curious Too is offline
 
Join Date: Jun 2006
I have an ad that I want to show to one particular social group. This is the code I tried but it didn't work:

if condition="$groups[groupid] == X
if condition="$group[groupid] == X
if condition="$grps[groupid] == X

Are there any conditionals for social groups?

Last edited by Curious Too; 03 Sep 2011 at 18:27.
Reply With Quote
  #65  
Old 03 Sep 2011, 21:02
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Curious Too View Post
I have an ad that I want to show to one particular social group. This is the code I tried but it didn't work:

if condition="$groups[groupid] == X
if condition="$group[groupid] == X
if condition="$grps[groupid] == X

Are there any conditionals for social groups?
$group[groupid] is what is used throughout the groups.php script. If that isn't working it probably isn't available in the template you are trying to use it on- where are you trying these conditionals?

The only other possibility would be to try

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

so

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #66  
Old 03 Sep 2011, 21:14
Curious Too Curious Too is offline
 
Join Date: Jun 2006
I'm trying to use it in the ad location template ad_navbar_below. This didn't work either:

<if condition="$vbulletin->GPC[groupid] == x">
Reply With Quote
  #67  
Old 03 Sep 2011, 23:11
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Yeah I looked through the code, this just isn't going to be possible with a template conditional. For who knows what reason the people who programmed social groups did not make them behave like forums and threads which would have been logical.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #68  
Old 04 Sep 2011, 00:25
Curious Too Curious Too is offline
 
Join Date: Jun 2006
Thank you for trying to help.
Reply With Quote
  #69  
Old 13 Jan 2012, 07:41
|Jordan|'s Avatar
|Jordan| |Jordan| is offline
 
Join Date: Nov 2004
I'm trying to make a conditional that will display in all forums except 8 forums,

<if condition="$show['newthreadlink'] && $forum['forumid'] != 6,7,8,9,22,23,24,25">
Is this syntax right?
Reply With Quote
  #70  
Old 13 Jan 2012, 08:13
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Originally Posted by |Jordan| View Post
I'm trying to make a conditional that will display in all forums except 8 forums,



Is this syntax right?
Close. It should be....

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #71  
Old 13 Jan 2012, 21:22
|Jordan|'s Avatar
|Jordan| |Jordan| is offline
 
Join Date: Nov 2004
Thanks for the fix, but it doesnt work I changed the code to make testing have less variables

<if condition="$show['newthreadlink'] && $forum['forumid'] == 8"><a href="complaints-suggestions.php" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a></if>
I applied it to forumdisplay and the new thread button still displays with the default newthread url even in the forum i dont want it to display in.
Reply With Quote
  #72  
Old 14 Jan 2012, 03:47
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Try this: (sometimes && doesn't doesn't play well in templates)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #73  
Old 14 Jan 2012, 05:36
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Cool

Originally Posted by HMBeaty View Post
Try this: (sometimes && doesn't doesn't play well in templates)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
OR


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replacing $forum with $thread but I believe either should work fine it's vB4 that does not get along with $forum being used within showthread and other if I'm remembering correctly so why we use thread in that situation.
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #74  
Old 14 Jan 2012, 06:02
|Jordan|'s Avatar
|Jordan| |Jordan| is offline
 
Join Date: Nov 2004
Originally Posted by HMBeaty View Post
Try this: (sometimes && doesn't doesn't play well in templates)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
That didnt work either

@TheLastSuperman, this is for VB3.
Reply With Quote
  #75  
Old 14 Jan 2012, 11:00
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
If you search the template you are putting the custom code in, look at what variable names are already being used.

In showthread $forum is never used... Nor is $thread, the actual one used is $threadinfo.

In forumdisplay it's $foruminfo....

So for the forumdisplay template this would be the code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:54.

Layout Options | Width: Wide Color: