Announcement

Collapse
No announcement yet.

Moderator permissions when viewing Search results (Find all Thread Started by)

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

  • Silviu
    replied
    Well, we're making some progress:

    In the search_threadbit template, if you use this code:

    <vb:if condition="$show['disabled']">disabled="disabled"</vb:if>

    like so

    PHP Code:
    <vb:if condition="$show['inlinemod']">
            <!-- 
    fourth block -->
            <
    label class="threadimod">            
    <
    input type="checkbox" id="thread_imod_checkbox_{vb:raw thread.realthreadid}" name="imodcheck[{vb:raw thread.realthreadid}]" <vb:if condition="$show['disabled']">disabled="disabled"</vb:if>/>    
            </
    label>
    </
    vb:if> 
    The checkbox will be shown as disabled (so it can't be clicked).

    Problem is, when you use the Inline Moderation to Select All threads, the disabled checkbox is selected as well.

    The alternative is to hide the checkbox altogether, like so:

    PHP Code:
    <vb:if condition="$show['inlinemod']">
            <!-- 
    fourth block -->
            <
    label class="threadimod">
    <
    vb:if condition="!$show['disabled']">            
    <
    input type="checkbox" id="thread_imod_checkbox_{vb:raw thread.realthreadid}" name="imodcheck[{vb:raw thread.realthreadid}]" /></vb:if>    
            </
    label>
    </
    vb:if> 
    But then, Select All only applies to the checkboxes above the first disabled one. So still only half-way solved

    Leave a comment:


  • Ramsesx
    replied
    Good find, could you add this into the jira tracker?

    Leave a comment:


  • Silviu
    replied
    Well, we have found the problem, but we don't know how to actually fix it:

    In vB 3.x, the inline mod conditional in the search_results_postbit template looked like this:

    Code:
    <if condition="$show['inlinemod']">
                <input type="checkbox" name="plist[$post[postid]]" id="plist_$post[postid]" style="float:$stylevar[right]; vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="1" [B]
    <if condition="$show['disabled']">disabled="disabled"</if>[/B] />
            </if>
    In vB 4.x though, it looks like this (in threadbit):

    Code:
    <label class="threadimod">
                <input type="checkbox" id="thread_imod_checkbox_{vb:raw thread.realthreadid}" name="imodcheck[{vb:raw thread.realthreadid}]" />
            </label>
            </vb:if>
    As you can see, the "disabled" conditional for the checkbox (which is what we need):

    <if condition="$show['disabled']">disabled="disabled"</if>

    is gone from the vB 4 search templates (both postbit and threadbit), so in order for the search to work as it did before, we need to put it back, but, probably, with another conditional.

    Something along the lines of:

    <if condition="user cannot moderate this particular forum">disabled="disabled"</if>

    Can anyone help in this regard?
    Last edited by Silviu; Wed 4 May '11, 2:16am.

    Leave a comment:


  • Moderator permissions when viewing Search results (Find all Thread Started by)

    Hello everyone,

    Last week we made the big leap from vB 3.8.6 to vB 4.1.3, and although the transition went pretty smoothly, some very useful features seem to be missing in action.

    For instance, in vB 3.x, when a moderator would search for all the threads started by a user, in the result list he could only manipulate the threads created in areas where he had moderation permissions

    Click image for larger version

Name:	Old permissions.jpg
Views:	1
Size:	95.1 KB
ID:	3720458

    Since the upgrade, however, all the threads can be selected, even though the moderation permissions haven't changed

    Click image for larger version

Name:	vb4 Permissions.jpg
Views:	1
Size:	84.7 KB
ID:	3720457

    So for instance, if mod A wants to close all the threads opened by user B in his section (GSM in this case), he has to manually (and carefully) sift through the results to pick the relevant threads, instead of just using Select All -> Close Threads, like he did until now.

    Otherwise, if he selects by accident a thread that's in a different area (Hardware, for example), and tries to close everything down, the forum will naturally spit out an error that he doesn't have required permissions.

    Is there any way to disable the checkboxes if the moderator doesn't have permissions in that forum section, like they were in vBulletin 3.x?

Related Topics

Collapse

Working...
X