Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #16  
Old 23 Nov 2009, 05:23
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Originally Posted by bobster65 View Post
you can still use the HTML comment, but it will display when someone "views source" where as using the <vb:comment>, that comment will be stripped and not processed by the HTTP server, hence not being visible when someone views source.. make sense?
Makes sense -- off hand, anyone know if <vb:comment> show up in the html source code when vb is in debug mode?
Reply With Quote
  #17  
Old 28 Nov 2009, 15:01
vietfancy's Avatar
vietfancy vietfancy is offline
 
Join Date: Mar 2005
have anybody try to use

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

It's not working for me.
Reply With Quote
  #18  
Old 28 Nov 2009, 15:10
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
It isn't $is_member_of, it's simply is_member_of (no $ in front).
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #19  
Old 06 Dec 2009, 06:44
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Real name: Andrew
Potential 'gotcha'

Something to be aware of with the conditional tag.

Whereas in vb3.x, fetch_template was typically eval()'d in the scope of the function that created the template output, in vb4, the template is eval()'d inside another function. Since the conditional test refers to standard php variables rather than the vb registered template variables, this can create a situation where the variable you are testing is not in scope, so the test will always fail.

For example:

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

where mytemplate contains:

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

will only output "val: 1"

You can get round this by explicitly referring to the registered variable in the vb:if condition as follows:


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

which will output "val: 1 say again 1", which is what the equivalent vb3.x template would have achieved.
Reply With Quote
  #20  
Old 06 Dec 2009, 15:20
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Thanks for posting that, Andrew. I haven't run into that problem yet, but I know I will and I'll be pulling my hair out and then I'll remember this post of yours and the world will be right again.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #21  
Old 20 Dec 2009, 06:24
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
"each" tag makes me so happy! thanks
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
  #22  
Old 30 Dec 2009, 12:17
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Forum Blocks & Widget template variables help

i am trying to use the following template variables in forum blocks and widgets but dont work can anyone help please

the code only seems to work in templates and not forum blocks or widgets and need help




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

__________________
http://www.multihunters.co.uk - all your coding needs
Reply With Quote
  #23  
Old 03 Jan 2010, 17:23
Vaupell's Avatar
Vaupell Vaupell is offline
 
Join Date: Apr 2008
Real name: Martin
is it possible to put a vb:raw condition in ?

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

<vb:if condition="{vb:raw value}==1"> do stuff.
__________________
My website Evisystems
- - - Stuff - - -
follow the white rabbit, feed! your head
Reply With Quote
  #24  
Old 03 Jan 2010, 20:30
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You don't use the {vb:stuff} in conditions. You would still use $value in the condition.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #25  
Old 21 Jan 2010, 21:03
wolfyman's Avatar
wolfyman wolfyman is offline
 
Join Date: Apr 2005
Real name: James
Originally Posted by vietfancy View Post
have anybody try to use

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

It's not working for me.
Originally Posted by Lynne View Post
It isn't $is_member_of, it's simply is_member_of (no $ in front).
<vb:if condition="!is_member_of($bbuserinfo,6)">

Gives me:

* unclosed_tag
__________________
see sig.
Reply With Quote
  #26  
Old 25 Jan 2010, 11:34
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Real name: Blue
So to if condition for a specific user.

Would we use:

<vb:if condition="$show['admin']">

or:

<vb:if condition="$bbuserinfo['userid'] == 1">
__________________

My Hacks [ click ] | Steve ~ Administrator for British Expats AustraliaBound.org/forum | Test our forum - user; don pass; pass123
Sports Tipping Mod - coming February 2010 ~ Show your Interest !
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 13:21.

Layout Options | Width: Wide Color: