Announcement

Collapse
No announcement yet.

guests viewing "view forum leaders" area

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

  • guests viewing "view forum leaders" area

    how can we prevent guests / users not logged in from viewing our entire memberlist through the usergroups via the "view forum leaders" link (along side the mark forums read button)

    currently you have to be registered and logged in to view our memberlist and usergroups, but this "view forum leaders" button link is some kinda loophole for the clued up guest/non registered user.

  • #2
    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


    • #3
      wouldnt this also hide the view forum leaders page from all members also ?

      Comment


      • #4
        Originally posted by UTE304
        wouldnt this also hide the view forum leaders page from all members also ?
        Nope. Members will still be able to view the page.

        Comment


        • #5
          thanks jake !

          i'll give it a go

          Comment


          • #6
            the first option via usergroup manager never worked.....all members are still viewable via the view forum leaders button as a guest

            the second option in styles and templates threw back this error message....

            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 D:\websites\proutes.com\forum\includes\adminfunctions_template.php4(3037) : eval()'d code on line 10

            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.
            based on the above error message, i did not want to go any further, and thought i'd return here to ask more

            so, still no result thus far
            Last edited by UTE304; Mon 12th Jul '04, 5:35pm.

            Comment


            • #7
              second option worked perfect for me..no errors..

              thanks jake

              Comment


              • #8
                Originally posted by UTE304
                the first option via usergroup manager never worked.....all members are still viewable via the view forum leaders button as a guest
                That permission controlls whether or not members of a group will be listed on the Forum Leaders page, not whether they will be able to view that page.

                Originally posted by UTE304
                the second option in styles and templates threw back this error message....
                Make sure you aren't forgetting the final </if> in the code.

                Comment


                • #9
                  cheers...worked well

                  didnt see that extra part you had in red

                  very appreciated !

                  The team at proUTES.com

                  Comment


                  • #10
                    i wanted to do something similar, but wanted to control who accesses this page by the usergroup they belong to. i couldn't figure out how to add multiple usergroups in one statement (i'm not a programmer ), but i did seem to get it to work by stacking if conditions on top of each other. but is there a way i could've done this in one conditional statement? i tried various combinations using "or" but couldn't get it to work.

                    my changes in red:

                    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[usergroupid] == 6">
                    <if condition="$bbuserinfo[usergroupid] == 7">
                    <if condition="$bbuserinfo[usergroupid] == 12">
                    <if condition="$bbuserinfo[usergroupid] == 13">
                    
                    <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>
                    </if>
                    </if>
                    </if>
                     
                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                    	<td width="100%">&nbsp;</td>
                    	<td>$forumjump</td>
                    </tr>
                    </table>
                     
                    $footer
                    </body>
                    </html>

                    Comment


                    • #11
                      Use just one statement:

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

                      Comment


                      • #12
                        oh, an array. i've heard of those. i never would have figured that out. thanks, jake. it works like a charm!

                        Comment


                        • #13
                          I know this is an old post, but I think it's relevant. How would I do something like

                          <if condition="!in_array.....</if>
                          so I could do something like, if it's NOT in this group, blah blah blah, etc. How would something like that work?

                          Comment


                          • #14
                            Just add an exclamation point before in_array(), exactly as you have done in your post.

                            Comment


                            • #15
                              Excellent!!! The Code of:

                              <if condition="$bbsuserinfo['userid']">
                              </if>

                              Worked great thank you!!!

                              Maybe in the future this should be an option, as is a sort of security hole. I wont get into it publicly as to why but it is.

                              Comment

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