Mod link on footer for Moderators?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Oblivion Knight
    Senior Member
    • Oct 2002
    • 267
    • 3.8.x

    Mod link on footer for Moderators?

    I was rather puzzled when I found out that Moderators couldn't see the "Mod" link on the footer to the modcp, so when I went browsing in the code, I found these 2 lines..

    Code:
    // This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
    // $show['modcplink'] = iif(can_moderate(), true, false);
    My question is that although this adds an extra query on many pages, was it commented out because it's a rather big query to be run, or did you just want to make vB3 as efficient as possible with the query count?

    Would be safe to uncomment that line?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Yes, it is safe to uncomment.

    As the comments say, that line was commented because it added a query, that's all.

    Comment

    • Oblivion Knight
      Senior Member
      • Oct 2002
      • 267
      • 3.8.x

      #3
      Originally posted by Jake Bunce
      Yes, it is safe to uncomment.

      As the comments say, that line was commented because it added a query, that's all.
      Thanks for answering Jake..
      I assume the extra query shouldn't effect server load too much judging from your reply?

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Yeah, it shouldn't be noticable.

        Comment

        • Martyjp
          Senior Member
          • Jun 2001
          • 274

          #5
          may be me being stupid but I found uncommenting that line hasnt made any difference as mods still cant see the link *puzzled*

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            Oh, you also need to comment the line below it. So you end up with this:

            Code:
            // This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
             $show['modcplink'] = iif(can_moderate(), true, false);
            // $show['modcplink'] = iif ($permissions['adminpermissions'] & CANCONTROLPANEL OR $permissions['adminpermissions'] & ISMODERATOR, true, false);

            Comment

            • Martyjp
              Senior Member
              • Jun 2001
              • 274

              #7
              Cheers worked perfectly, you wouldnt believe how many complaints I got about that

              Comment

              • tarzanna
                New Member
                • Jan 2005
                • 5
                • 3.0.5

                #8
                This is probably such a dumb question....but what file is it that I make the above changes too? I've looked through several...but I must just be missing it....

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #9
                  global.php in your main forum directory.

                  Comment

                  • tarzanna
                    New Member
                    • Jan 2005
                    • 5
                    • 3.0.5

                    #10
                    Perfect! Thank you....

                    Comment

                    • FrankR678
                      Member
                      • Jun 2002
                      • 73

                      #11
                      which file would this code be in?

                      Comment

                      • Jake Bunce
                        Senior Member
                        • Dec 2000
                        • 46598
                        • 3.6.x

                        #12
                        global.php in your main forum directory.

                        Comment

                        • Hektor
                          Member
                          • Sep 2004
                          • 75
                          • 3.0.3

                          #13
                          Supermods can see it but mods can't. I must be missing something here.

                          Comment

                          • Jake Bunce
                            Senior Member
                            • Dec 2000
                            • 46598
                            • 3.6.x

                            #14
                            Are your regular mods added as mods in your:

                            Admin CP -> Forums & Moderators -> Forum Manager -> Add Moderator (in the menus on the right)

                            ?

                            That is what makes some one a regular moderator. They are not a moderator if they are just in the Moderator usergroup.

                            Comment

                            • ntburchf
                              New Member
                              • Jul 2005
                              • 5
                              • 3.0.7

                              #15
                              Originally posted by Jake Bunce
                              Are your regular mods added as mods in your:

                              Admin CP -> Forums & Moderators -> Forum Manager -> Add Moderator (in the menus on the right)
                              ?
                              That is what makes some one a regular moderator. They are not a moderator if they are just in the Moderator usergroup.
                              Does not work for me vb 3.07
                              Just switched from phpbb to this.

                              Uncommented the global.php
                              made test user a mod in forums

                              Link does not show up-
                              Now, if I create a test group and make test group supermod, put test user in it, then the link will show up.

                              I may not want all my users that I want to be mods - supermods-
                              I just want them to have the link to the modcp when they have the rights to mod a forum--

                              What am I missing here?

                              update--
                              had to
                              replace in the footer
                              Code:
                               <if condition="$show['modcplink']"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if>
                              with this
                              Code:
                               <if condition="can_moderate()"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if>
                              Last edited by ntburchf; Fri 8 Jul '05, 11:54pm.

                              Comment

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