vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=231525

RL714 26 Jan 2010 21:51

Quote:

Originally Posted by huuquynh (Post 1964520)
I want to use condition with the custom field. For example, I use custom field number 6 for private information, and I want the member can view it but hide it for everyone.

Is there any example?

you can use this line to show only register user
Quote:

<vb:if condition="$show['member']">Show this to members only</vb:if>

huuquynh 27 Jan 2010 17:11

Quote:

Originally Posted by RL714 (Post 1967429)
you can use this line to show only register user

sorry for my bad english. I mean the private information is showed for him only, the other members can not see it.

the condition you give is for every member... it can not be used in this case.

RL714 29 Jan 2010 23:50

Quote:

Originally Posted by huuquynh (Post 1968107)
sorry for my bad english. I mean the private information is showed for him only, the other members can not see it.

the condition you give is for every member... it can not be used in this case.

this the one you're looking for huuquynh, replace the user id

Quote:

<vb:if condition="$bbuserinfo['userid'] == 318713">Show this only to the member with the user id of 318713</vb:if>

huuquynh 30 Jan 2010 15:36

Hi RL714,

I think your code is right. But this is not simple likes that, because it is not for only a member or owner site. I mean the number 318713 is the dynamic number, it is exactly userid in custom field table. So if condition is: $bbuserinfo['userid'] is exactly his userid, so he can see the value. But if the other member can not see.

For example: you can see your custom field number 6, but I can not see it. And vice versa, I can see my custom field number 6, but you can not see mine.

sadiq6210 30 Jan 2010 19:17

Thanks :)

Veer 30 Jan 2010 23:56

Thank you for the article.

Please guide me in converting this to vb4:

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

and this one too please:

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


egyptsons 02 Feb 2010 00:24

Thanks for your article

I want to add advertisement after the first post in some special forums
so I edit the "ad_showthread_firstpost" Template and add this


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

But nothing change in the special forums and the ads not appear

also if I used this

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

it's appear in all forums not only the special (1,2,3)

Can you advice me plz ?

Best regards

fly 02 Feb 2010 21:29

Hoping someone can help...

I'm trying to convert this template conditional (in threadbit, I'm guessing it matters)...


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

Using the guide here, I know it should look like this, but it doesn't work:


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

Could it be that the $ignore variable isn't available in that template? I've seen mention of that in other articles here, I think.

isurua 03 Feb 2010 04:52

Anyone know a way of getting this to work?


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

{vb:raw title} returns The Latest exactly as I would expect when put into the style but for some reason it may not be working inside a conditional statement. =\

fly 03 Feb 2010 10:21

Quote:

Originally Posted by isurua (Post 1973651)
Anyone know a way of getting this to work?


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

{vb:raw title} returns The Latest exactly as I would expect when put into the style but for some reason it may not be working inside a conditional statement. =\

Quote:

Originally Posted by from first post
First off remember you can not use {vb:raw var} in template conditionals.

that

egyptsons 04 Feb 2010 01:44

this is not work too with me :(

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

anyone can advice ??

isurua 04 Feb 2010 03:20

Quote:

Originally Posted by flypaper (Post 1973788)
that

Yes well aren't I the ignorant one? Hahah

Do you know if there is any work around?

btotw 06 Feb 2010 21:59

I have an idea.

I want to give someone control of their own thread. I figure that a good way to do that would be to duplicate the supermoderator group, calling it "threadModerator", then only display the "show admintools" dropdown IF the current user is both a threadAdmin AND is author of the current thread.

In other words, if the threadmoderator group is "100," How can I then say

If currently_logged_in_user is threadmoderator and
If currently_logged_in_user = thread_starter then
show admintools

I figure its something close to:

<vb:if condition="is_member_of($bbuserinfo, 100)">
<vb:if condition="is_author_of($thread)">
show admintools
</vb:if>
</vb:if>

It has to be something close to this...though I dont know how to query the system to find out the author of a thread...nor do I know how to reference the "show admintools" function...but I figure I've reasoned this out and given enough effort that one of you...who are MUCH better programmers than I...is willing to help me (and anyone that wants to use the code, giving myself and the person who cleans this up the credit).

How bout it people? Can someone help with this...?

mabersoft 09 Feb 2010 21:24

What would the code be to only show on forumhome?

matthieugoua 10 Feb 2010 14:58

Quote:

Originally Posted by egyptsons (Post 1974321)
this is not work too with me :(

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

anyone can advice ??

not work for me


All times are GMT. The time now is 15:20.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.