![]() |
<if condition="$show['member']"> not working in custom template?
Ok, I made a custom template, used this conditional in it (normally used in navbar):
<if condition="$show['member']"> But it's not working there, howcome? |
That conditional is used with an <else /> in navbar as default for showing the navbar login information (pm and such) or login information for guests.
Just original vbulletin code: Code:
<if condition="$show['member']"> But I want to use this whole piece of code in a custom template, with a variable for it in the forumhome template. |
Try $vbulletin->userinfo['userid'] != 0 instead.
|
That is not possible since I need to use an <else /> after it to show something different for guests...
I would like to know why the conditional $show['member'] doesnt work in a custom template, any help is appreciated. |
Why is it not possible to use <else /> with Dismounted's suggestion?
Code:
<if condition="$vbulletin->userinfo['userid'] != 0"> member code <else /> guest code </if> |
You are right, it does work. However still like to know why the original didn't??
BTW is user ID better than using usergroup != 1 ? And another problem: <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase> is also not working in this template, is there a way to make these work in custom templates? |
Quote:
Quote:
Code:
<phrase 1="$lastvisitdate" 2="$lastvisittime">$vbphrase[last_visited_x_at_y]</phrase> |
Nope, not vbadvanced. I just would like to use navbar code in a new template (rightcolumn). Anyone know of a topic i can read here about this issue? thanks
|
Code:
<phrase 1="$lastvisitdate" 2="$lastvisittime">$vbphrase[last_visited_x_at_y]</phrase> PHP Code:
|
Quote:
No offense to her or anything... but you should really just install vBadvanced 3.0. Column integration is now integrated and *automated* in 3.0 and there are no more file edits -- you just tell vBa which forum pages to show the column on. There is already a Welcome/Log-in box in vBa by default that you can position wherever you want, not to mention Mini Calendar, Recent Threads, News, News Archive modules, etc. And if you continue to try adding a lot of code that depends on variables to that "rightcolumn" template you're inevitably going to run into the same problem again and have to add more variables to the plugin or PHP file that the column hack uses. |
No I did the right column myself. it's a pretty simple mod, I really don't want a big mod like vba, just need the right column with login, nothing more.
Quote:
|
How are you displaying this template?
|
Quote:
Code:
eval('$rightcolumn = "' . fetch_template('rightcolumn') . '";'); |
Add the PHP code I gave you above it.
|
Yes I tried that , it has no effect.
But I think it has to do with the navbar phrases, they are not working in rightcolumn and contain the '{1}' that show the time etc. If you understand what I mean. |
Can you just put $vbphrase[last_visited_x_at_y] in the template? What comes out?
|
This is what I get:
Your Last Visit: %1$s at %2$s |
It should work then....But somehow it's not working.
|
Hm.. if you want to, I can give access to my testing board. Maybe you can find what's wrong. If not, no prob :)
|
Let me know plz:)
|
All times are GMT. The time now is 02:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|