The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If condition question
Hi,
Is there any way to check inside postbit_legacy whether the thread is posted in a private forum? In SHOWTHREAD I'm using <if condition="$bookmarksites"> and I'm looking for something similar. |
#2
|
||||
|
||||
If you are wanting to check for a particular private forum, you could just check the forumid:
HTML Code:
<if condition="$foruminfo['forumid'] == 'x'"> stuff </if> HTML Code:
<if condition="in_array($foruminfo['forumid'], array(x,y,z))"> stuff </if> |
#3
|
|||
|
|||
Ok, but that doesn't check whether the forum is viewable to the public like $bookmarksites does. So no condition is possible but this manual work-around?
|
#4
|
||||
|
||||
I think you will have to look into what is done with the 'options' column in the query for the forum. I'm sure that splits up into permissions and your answer most likely lies in there. I don't have a short answer for you because I've never looked into what you are trying to do.
|
#5
|
|||
|
|||
I'm pretty much trying to add a tiny bookmarks button per post but only for posts which are accessible to the public. hence the reference to <if condition="$bookmarksites">
|
#6
|
||||
|
||||
I don't think there is going to be an easy way for you to do this. What you need to do is determine the forum permission for a guest for that forum. You can look in the showthread.php page for the variable bf_ugp_forumpermissions that is used and perhaps you can find out how to get what you want from tracing that variable. (You also will have to figure out which permissions you are looking at - canview? canviewothers? canviewthreads?)
|
#7
|
||||
|
||||
If you only want to show the social bookmarking submit button to guests, use this conditional:
<if condition="$show['guest']"> <!-- social bookmarking code goes here --> </if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|