2012-08-23, 05:57 AM
2012-08-23, 06:22 AM
You can set this option for each forum.
Admin CP/Forums and Post/Edit Forum Settings
Then under Moderation Options, check moderate new post.
Admin CP/Forums and Post/Edit Forum Settings
Then under Moderation Options, check moderate new post.
2012-08-23, 07:21 AM
Tell them to use the modcp and select the Moderation Queue from the sidebar.
2012-08-23, 01:27 PM
Right. That's how I have it set, and that's how we're checking for pending posts, but it would be nice to have a notice like for PMs.
2012-08-23, 08:33 PM
(2012-08-23, 01:27 PM)fylliska Wrote: [ -> ]Right. That's how I have it set, and that's how we're checking for pending posts, but it would be nice to have a notice like for PMs.
I actually tried this, but you want only threads, post, or attachments? Also, all forums? It will increase one query by page too, probably more depending on what you exactly want (threads, post, attachments).
2012-08-23, 09:14 PM
I ran a query from the cache to do it on my own site, but it is hardcoded (simple find replace)
<?php
/**
* Author: LeeFish
* Copyright: ? 2011 LeeFish
* Website: http://www.leefish.nl
**/
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
// Plugin hook
$plugins->add_hook("global_end", "unapprovedthreads_global");
// Plugin info
function unapprovedthreads_info()
{
return array(
"name" => "Unapproved Threads",
"description" => "Add a link in the welcomeblock.",
"website" => "http://www.leefish.nl",
"author" => "LeeFish",
"authorsite" => "http://www.leefish.nl",
"version" => "1.1",
"compatibility" => "1*"
);
}
// Run plugin
function unapprovedthreads_global()
{
global $db, $mybb, $cache, $header;
if($mybb->user['usergroup']==4)
{
// Load stats cache
$stats = $cache->read("stats");
$unapproved_threads = ($stats['numunapprovedthreads']);
$unapproved_posts = ($stats['numunapprovedposts']);
if($stats['numunapprovedthreads'] == 0)
{
$unapproved_threads = 0;
}
if($stats['numunapprovedposts'] == 0)
{
$unapproved_posts = 0;
}
else
{
$find = 'ACP</span>';
$replace = " <a href=\"".$mybb->settings['bburl']."/modcp.php\">To Review <span class=\"sigbutton\">$unapproved_threads/$unapproved_posts</span></a>";
$header = str_replace($find, $find.$replace, $header);
}
}
}
?>
2012-08-23, 10:08 PM
But what if the current online user can't moderate those threads/posts (In your code it only applies to admins, so they can always moderate)?
I would rather to go with the nicest way to approach it even it is runs one query.
I would rather to go with the nicest way to approach it even it is runs one query.
2012-08-23, 10:26 PM
Well, I have it as admin - I don't have any moderators, so I have not tested it. In theory - it should work.
It would not work for forum specific moderators (or it might give a false positive).
Did a test - for a moderator of all forums - it showed up. Just needed to change usergroup to 6 and look for MCP. Have not tested on forum specific mods.
For candy (which is what this is - the mods should check the MCP) then I prefer to keep it as simple as possible and avoid queries, I like to save my queries for real things.
It would not work for forum specific moderators (or it might give a false positive).
Did a test - for a moderator of all forums - it showed up. Just needed to change usergroup to 6 and look for MCP. Have not tested on forum specific mods.
For candy (which is what this is - the mods should check the MCP) then I prefer to keep it as simple as possible and avoid queries, I like to save my queries for real things.
2013-01-09, 04:24 AM
(2012-08-23, 09:14 PM)Leefish Wrote: [ -> ]I ran a query from the cache to do it on my own site, but it is hardcoded (simple find replace)I'm trying to accomplish this. Has there been another method discovered or perhaps a plugin that I just can't find?
<?php /** * Author: LeeFish * Copyright: ? 2011 LeeFish * Website: http://www.leefish.nl **/ // Disallow direct access to this file for security reasons if(!defined("IN_MYBB")) { die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined."); } // Plugin hook $plugins->add_hook("global_end", "unapprovedthreads_global"); // Plugin info function unapprovedthreads_info() { return array( "name" => "Unapproved Threads", "description" => "Add a link in the welcomeblock.", "website" => "http://www.leefish.nl", "author" => "LeeFish", "authorsite" => "http://www.leefish.nl", "version" => "1.1", "compatibility" => "1*" ); } // Run plugin function unapprovedthreads_global() { global $db, $mybb, $cache, $header; if($mybb->user['usergroup']==4) { // Load stats cache $stats = $cache->read("stats"); $unapproved_threads = ($stats['numunapprovedthreads']); $unapproved_posts = ($stats['numunapprovedposts']); if($stats['numunapprovedthreads'] == 0) { $unapproved_threads = 0; } if($stats['numunapprovedposts'] == 0) { $unapproved_posts = 0; } else { $find = 'ACP</span>'; $replace = " <a href=\"".$mybb->settings['bburl']."/modcp.php\">To Review <span class=\"sigbutton\">$unapproved_threads/$unapproved_posts</span></a>"; $header = str_replace($find, $find.$replace, $header); } } } ?>
If not, then where did you insert this code exactly to get it working? Not sure what you mean about the cache. Is that a specific file?