Show only Writers, Editors and Admin in Multiple Authors!

Post your suggestions for the script here.

Show only Writers, Editors and Admin in Multiple Authors!

Postby DarkSlim » Tue Nov 10, 2009 4:48 pm

If you are using the Multiple Authors plugin, which lets the admin (or if changed - the editors too),
pick the author of the post, and like me, you have many registered users, the list of usernames that
you get is pretty long, not so comfortable to find your writers or editors in there.

That is why I came up with this little fix that makes it show only writers, editor and admins in the
multiple authors box! :)

Just open: plugins/multiple-authors.php

Find:
Code: Select all
   if($mod == "addnews"){
            $buffer .= '<option value="'.$row['username'].'" '.($row['username'] == $member['username'] ? 'selected' : '').'>'.$row

['username'].'</option>';
         }
         else{
            
            $buffer .= '<option value="'.$row['username'].'" '.($row['username'] == $row2['author'] ? 'selected' : '').'>'.$row

['username'].'</option>';
                                                         
   }


Replace with:
Code: Select all
    if ($row['level'] != 4){
         if($mod == "addnews"){
            $buffer .= '<option value="'.$row['username'].'" '.($row['username'] == $member['username'] ? 'selected' : '').'>'.$row

['username'].'</option>';
         }
         else{
            
            $buffer .= '<option value="'.$row['username'].'" '.($row['username'] == $row2['author'] ? 'selected' : '').'>'.$row

['username'].'</option>';
                                                         
         }
   }


That's it, hope it helps someone. :)
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Return to Suggestions



Who is online

Users browsing this forum: No registered users and 0 guests

cron