Announcement

Collapse
No announcement yet.

guests viewing "view forum leaders" area

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    If only the Vbulletin guys would add this into the admin cp...

    Doug

    Comment


    • #17
      Originally posted by Jake Bunce View Post
      Use just one statement:

      Code:
      <if condition="in_array($bbuserinfo[usergroupid], array(6,7,12,13))">
      Jake,

      I am using VB 3.5.4 and received an error just like UTE304, What would the code be for VB 3.5.4 ? If it's the same code, then any idea what I need to do to fix this error?

      The following error occurred when attempting to evaluate this template:

      Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/username/domainname.com/includes/adminfunctions_template.php(3537) : eval()'d code on line 21

      This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
      Thanks

      Doug

      ***UPDATE***
      I removed the <if condition="$moderatorbits"> below the <if condition="in_array($bbuserinfo[usergroupid], array(6,7,12,13))"> and I did not get the error, BUT it is not hiding this for guests. Also if i try adding the </if> at the end of that command then the moderators column shows up with no one there. Remove the </if> and it disapears.

      At this point I am assuming that this code is written for 3.0.x boards. What would the code be for 3.5?
      Last edited by Removed-1078464; Mon 19th Jun '06, 11:15am.

      Comment


      • #18
        Make sure you are not forgetting the ending </if> at the bottom.

        Comment


        • #19
          Jake,

          Just to make sure where would the "if" go or how would it exactly look like?

          Like this below?

          <if condition="in_array($bbuserinfo[usergroupid], array(6,7,12,13))"></if>

          Thanks

          Doug

          Comment


          • #20
            Refer to my other post. Notice the </if> at the bottom:

            Originally posted by Jake Bunce View Post
            You can make groups not viewable on that page by disabling this option for each group:

            Admin CP -> Usergroups -> Usergroup Manager -> Edit Usergroup -> Viewable on Show Groups

            Otherwise there is no permission to deny access to view that page, but you can accomplish the same thing through template conditionals. Go to your:

            Admin CP -> Styles & Templates -> Style Manager -> -> Show Groups Templates -> SHOWGROUPS

            Add the red code:

            Code:
            $stylevar[htmldoctype]
            <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
            <head>
            <title>$vboptions[bbtitle] - $vbphrase[show_groups]</title>
            $headinclude
            </head>
            <body>
            $header
            $navbar
            
            <if condition="$bbuserinfo['userid']">
            
            <if condition="$moderatorbits">
            <!-- moderators -->
            <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
            <tr>
            	<td class="tcat" colspan="4">$vbphrase[moderators]</td>
            </tr>
            <tr>
            	<td class="thead">&nbsp;</td>
            	<td class="thead" width="50%">$vbphrase[username]<if condition="$show['locationfield']"> / $vbphrase[location_perm]</if></td>
            	<td class="thead" width="50%">$vbphrase[forums]</td>
            	<td class="thead">$vbphrase[contact]</td>
            </tr>
            $moderatorbits
            </table>
            <br />
            <!-- end moderators -->
            </if>
            
            $usergroups
            
            </if>
            
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
            	<td width="100%">&nbsp;</td>
            	<td>$forumjump</td>
            </tr>
            </table>
            
            $footer
            </body>
            </html>
            This will hide the content of the Forum Leaders page from guests.

            Comment


            • #21
              Jake,

              That worked this time, I was just putting the </if> in the wrong location. Thank you!

              After testing this it still doesnt do what im looking for though...

              How can I get it to hide the link from the main page altogether from specific user groups? If they are a group that is not allowed to see the user groups then I dont even want them to see the link on the main page.

              Doug

              P.S. Is there a way to hide the "show all forums read" for members not logged in since they dont have permission to view the threads as a guest on my board? Options, ideas, suggestions?
              Last edited by Removed-1078464; Sat 8th Jul '06, 12:10pm.

              Comment


              • #22
                Use the same condition, but that link is in this template:

                Admin CP -> Styles & Templates -> Style Manager -> -> Forum Home Templates -> FORUMHOME

                Code:
                $forumbits
                <tbody>
                	<tr>
                		<td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
                			<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
                			<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
                			<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if>
                		</strong></div></td>
                	</tr>
                </tbody>
                </table>
                <!-- /main -->

                Comment


                • #23
                  Jake,

                  I think you might have misunderstood what I am looking for.

                  I only want the "Mark Forums Read" link to be able to be seen by specific user groups, If they are to be restricted I dont want the link "Mark All Forums Read" to show up at all on the main page.

                  On the "View Forum Leaders" I want that link as well to not appear unless the user group is allowed to see it.

                  How do I go about doing this, Im confused on how to do this now.

                  Doug
                  Last edited by Removed-1078464; Sat 1st Jul '06, 1:50pm.

                  Comment


                  • #24
                    Both of those links are in the code I posted. You can surround each of them with their own conditionals... the same conditionals you used to check group status in the SHOWGROUPS template.

                    For example:

                    Admin CP -> Styles & Templates -> Style Manager -> -> Forum Home Templates -> FORUMHOME

                    Add the red code to only show the "mark forums read" link for primary usergroupids 6, 7, 12, and 13:

                    Code:
                    $forumbits
                    <tbody>
                    	<tr>
                    		<td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
                    			<if condition="in_array($bbuserinfo[usergroupid], array(6,7,12,13))"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></if>
                    			<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
                    			<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if>
                    		</strong></div></td>
                    	</tr>
                    </tbody>
                    </table>
                    <!-- /main -->

                    Comment


                    • #25
                      Jake,

                      I have it all working the way I want it to but I have one last question for you on this.

                      PHP Code:
                      <if condition="in_array($bbuserinfo[usergroupid], array(2,5,6,7,9))">< 
                      The code you gave me wants me to enter in the user group numbers for those that I want to allow to see the links, but to make it easier for me what would the code be for entering in the user group numbers that I dont want to see the links?

                      Thanks

                      Doug

                      Comment


                      • #26
                        Add the ! to reverse the logic:

                        Code:
                        <if condition="!in_array($bbuserinfo[usergroupid], array(2,5,6,7,9))">

                        Comment


                        • #27
                          I'll give it a try Jake, Thank you so much for your help.

                          Doug

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...
                          X