Connect with Facebook
Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Hacks & Questions


Please Register to get full access to the forums.
Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2008, 10:48 AM   #1
vBulletin Owner
 
Sonnie's Avatar
 
Join Date: Aug 2006
Location: L.A. (Lower Alabama)
Posts: 11
Sonnie will become famous soon enough
Figuring out these conditions...

Here's what we got:

<if condition="$post[userid] != $bbuserinfo[userid] AND THIS_SCRIPT!='private'"><if condition="$show['pmlink'] AND $show[member]"><tr class="alt2"><td align="left"><div class="smallfont"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" target="_blank" rel="nofollow"><img src="images/pm_small.png" alt="pm_small.png" title="<phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase>" border="0" /></a><if condition="is_member_of($bbuserinfo, 5, 6, 7)">&nbsp;<a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]&amp;postid=$post[postid]" target="_blank" rel="nofollow"><img src="$stylevar[imgdir_button]/quote_pm.gif" title="<phrase 1="$post[username]">$vbphrase[quote_private_message_to_x]</phrase>" border="0" /></a></if>&nbsp;<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if></div>
</td></tr></if></if>


We have a PM Post Owner link, Quote Post in PM link and Report Post link in the code above.

We only want usergroups 5, 6, and 7 to see the Quote Post in PM link. Only registered users should see the other two links provide they have permissions.

We also have it setup so that any New Member with less than 5 posts cannot send PM's or report posts. At 5 posts they are promoted to a new usergroup with proper permissions. I actually do not remember how we prevent them from reporting post before 5 posts.

The problem we are having is that only the Administrators can see the PM Post Owner link, Quote Post in PM link and Report Post link on New Members with less than 5 posts. Moderators should also be able to see those links. I am thinking it has something to do with those conditional statements. Those conditions are not in the original code and we do not have the issue there.

Can anyone sort this out... tell me which conditions I really need?

Thanks!
__________________
Home Theater Shack
Sonnie is offline   Reply With Quote
Old 11-17-2008, 11:06 AM   #2
Supporters
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,700
Blog Entries: 1
ArnyVee is a jewel in the roughArnyVee is a jewel in the rough
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Figuring out these conditions...

Might want to check out this link. Really makes it simple to see what to use and when.

vBulletin Template Conditionals List
__________________
Walt Disney Boards -- Walt Disney Buddies -- Glam Rock Talk -- Gervais Book <-- My newest site for Ricky Gervais Fans :D
ArnyVee is offline   Reply With Quote
Old 11-17-2008, 11:31 AM   #3
vBulletin Owner
 
Sonnie's Avatar
 
Join Date: Aug 2006
Location: L.A. (Lower Alabama)
Posts: 11
Sonnie will become famous soon enough
Re: Figuring out these conditions...

Unfortunately that did not help me understand but one of the above.
__________________
Home Theater Shack
Sonnie is offline   Reply With Quote
Old 11-18-2008, 07:38 PM   #4
vBulletin Owner
 
Sonnie's Avatar
 
Join Date: Aug 2006
Location: L.A. (Lower Alabama)
Posts: 11
Sonnie will become famous soon enough
Re: Figuring out these conditions...

When the following condition is removed:

<if condition="$show['pmlink']">

...from around this code:

<a href="http://forum.vbulletinsetup.com/f18/private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" target="_blank" rel="nofollow"><img src="images/pm_small.png" alt="pm_small.png" title="<phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase>" border="0" /></a>

<a href="http://forum.vbulletinsetup.com/f18/private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]&amp;postid=$post[postid]" target="_blank" rel="nofollow"><img src="http://forum.vbulletinsetup.com/f18/$stylevar[imgdir_button]/quote_pm.gif" title="<phrase 1="$post[username]">$vbphrase[quote_private_message_to_x]</phrase>" border="0" /></a>


...the links are shown, but clicking on the link by moderators simply state that the user does not receive private messages, which is really no different that not seeing the buttons to begin with.


There obviously must be some code somewhere that enables an Administrator to send private messages whether the user is allowed to send or receive private messages or not. It would make sense that the same code could be set that way for Moderators.
__________________
Home Theater Shack
Sonnie is offline   Reply With Quote
Reply

Tags
conditions, figuring

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vBulletin if-conditions in non-vbulletin-pages larina vBulletin Services 3 07-09-2008 06:03 AM


All times are GMT -6. The time now is 11:31 PM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions
vBulletin Skins, Styles, Templates, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory