Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 23 Nov 2016, 22:54
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Weird situation on template condition

Ok guys, Here's the deal. I'm doing a simple if condition


<vb:if condition="$channelid == $url.channelid">

....do something

Here's the problem, I can't get the two to equal each other. See the screen of the var_dump.


{vb:debugvardump $channelid} = string(2) 36
{vb:debugvardump $url.channelid} = string(2) 36

<vb:if condition="$.urlchannelid == 36"> FALSE

<vb:if condition="$channelid == 36">TRUE

So obviously, there is an issue with $url.channelid.
I tried this
{vb:set url.channelid, '36'}, still nothing. I'm at a loss here because the two values are equal.
Attached Images
File Type: png channel.png (23.4 KB, 8 views)
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #2  
Old 23 Nov 2016, 23:48
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
I'm not too up-to-date regarding the vBulletin 5 template syntax, but shouldn't the template condition be formatted this way:


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

__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 24 Nov 2016, 00:46
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Originally Posted by Dave View Post
I'm not too up-to-date regarding the vBulletin 5 template syntax, but shouldn't the template condition be formatted this way:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I tried it that way as well. This has been mind boggling.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #4  
Old 24 Nov 2016, 00:51
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Hmmm maybe it's part of an object?
Try $url->channelid in the condition.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 24 Nov 2016, 02:42
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Can you post the entire code? There might something else going on somewhere.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #6  
Old 24 Nov 2016, 03:18
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
That was most of the code. url.channelid came from an api call and the other was an existing template variable.
I got tired of messing with it, scrapped it and went another direction.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
Reply



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

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 07:43.

Layout Options | Width: Wide Color: