Resource icon

vBulletin [MOD] Add vBGallery files & posts to your moderation CMPS module

Kevin

Code Monkey
Staff member
This modification will add a link to your Moderation module for new images & posts that need to be validated. Figured sooner or later somebody was going to need it. :P

Files to modify: (1)
Templates to modify: (1)

Thanks to Brian & Shon.

In your {forums}/modules/moderate.php file look for...
Code:
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_moderation') . '";');
... and above it add:
Code:
$gallery = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "adv_gallery_images WHERE valid = 0"); 
$galleryposts = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "adv_gallery_posts WHERE visible = 0");
In your adv_portal_moderation template look for...
Code:
<div><phrase 1="$users[count]" 2="$vboptions[bburl]/$admincpdir/user.php?do=moderate">$vbphrase[x_users]</phrase></div>
... and beneath it add:
Code:
<div><a href="$vboptions[bburl]/$modcpdir/vba_gallery.php?do=validateimages" target="_blank">Gallery ($gallery[count])</a></div>
<div><a href="$vboptions[bburl]/$modcpdir/vba_gallery.php?do=validateposts" target="_blank">Gallery Posts($galleryposts[count])</a></div>
If you're using the modified template from Shon then in your template look for...
Code:
</table>
 
</td>
</tr>
</tbody>
</table>
<br />
 
<!-- End Quick Moderation Block -->
... and above it add:
Code:
<tr>
<td class="alt2" width="80%">
    <div><a href="$vboptions[bburl]/$modcpdir/vba_gallery.php?do=validateimages" target="_blank">Gallery</a></div>
</td>
<td class="thead" align="center">$gallery[count]</td>
</tr>
<tr>
<td class="alt1" width="80%">
    <div><a href="$vboptions[bburl]/$modcpdir/vba_gallery.php?do=validateposts" target="_blank">Gallery Posts</a></div>
</td>
<td class="thead" align="center">$galleryposts[count]</td>
</tr>
 

Attachments

  • gallery_moderate.PNG
    gallery_moderate.PNG
    5.2 KB · Views: 242
Back
Top