MyBB Community Forums

Full Version: Mybb Issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have come across a few errors and issues with Mybb, i will list as much as I can remember and some of these I want to be edited or fixed. So to make it easier I will label them.

Issue - Promotion System

After being promoted from Member to Junior member on my forums the promotion system comes across an error, I want to know if there is an update or if there is a fix for this. Meaning it will Promote them to Junior Member (50) Posts, but when they go to get promoted to Senior Member (200) Posts, it wont work we have to do this manually.

Editing - Board Statistics

Below this it shows four things. Two of them I want to be removed. I want members to be only able to see the Amount of Posts, Threads and Members, But I want admins to see the Newest User That has joined the forums, How Can I do this.


If these can be fixed please tell me how or if not then just explain why, If you know how to edit what is listed then post the edited Templates, etc, So I know what to replace. Thank you.

Sincerely
Abandon

Don't know about the promotional system..

Your other question needs corefile edits.

in index.php

find

// Build the forum statistics to show on the index page.
if($mybb->settings['showindexstats'] != 0)
{
	// First, load the stats cache.
	$stats = $cache->read("stats");

	// Check who's the newest member.
	if(!$stats['lastusername'])
	{
		$newestmember = "no-one";
	}
	else
	{
		$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
	}

	// Format the stats language.
	$lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));
	$lang->stats_numusers = $lang->sprintf($lang->stats_numusers, my_number_format($stats['numusers']));
	$lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);

	// Find out what the highest users online count is.
	$mostonline = $cache->read("mostonline");
	if($onlinecount > $mostonline['numusers'])
	{
		$time = TIME_NOW;
		$mostonline['numusers'] = $onlinecount;
		$mostonline['time'] = $time;
		$cache->update("mostonline", $mostonline);
	}
	$recordcount = $mostonline['numusers'];
	$recorddate = my_date($mybb->settings['dateformat'], $mostonline['time']);
	$recordtime = my_date($mybb->settings['timeformat'], $mostonline['time']);

	// Then format that language string.
	$lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);

	eval("\$forumstats = \"".$templates->get("index_stats")."\";");
}

Change into

// Build the forum statistics to show on the index page.
if($mybb->settings['showindexstats'] != 0)
{
	// First, load the stats cache.
	$stats = $cache->read("stats");
if($mybb->user['usergroup'] == 4)
{
	// Check who's the newest member.
	if(!$stats['lastusername'])
	{
		$newestmember = "no-one";
	}
	else
	{
		$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
	}
}
	// Format the stats language.
	$lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));
	$lang->stats_numusers = $lang->sprintf($lang->stats_numusers, my_number_format($stats['numusers']));
	if($mybb->user['usergroup'] == 4)
{
	$lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);
	}
else 
{ 
$lang->stats_newestuser = "";
}
	// Find out what the highest users online count is.
	$mostonline = $cache->read("mostonline");
	if($onlinecount > $mostonline['numusers'])
	{
		$time = TIME_NOW;
		$mostonline['numusers'] = $onlinecount;
		$mostonline['time'] = $time;
		$cache->update("mostonline", $mostonline);
	}
	$recordcount = $mostonline['numusers'];
	$recorddate = my_date($mybb->settings['dateformat'], $mostonline['time']);
	$recordtime = my_date($mybb->settings['timeformat'], $mostonline['time']);

	// Then format that language string.
	$lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);

	eval("\$forumstats = \"".$templates->get("index_stats")."\";");
}

Untested, should work.


ETA: in the above code i assume the admin group is group 4. If your admin group is a different group, change accordingly.
You could also do this with a template change using the PHP in Templates plugin.

Activate the plugin and in 'index_stats', search:
{$lang->stats_newestuser}<br />
to
<if $mybb->user['usergroup'] == 4 then>
{$lang->stats_newestuser}<br />
</if>

Disturbed's solution is of course fine but a template change is a bit easier to manage when upgrading your board.

[EDIT]
For the promotion, did you select the correct "Original User Group" groups for the Junior -> Senior member?
Yes I did, but for some reason it wont work.com
Can you print screen the settings you're using for the group promotion?
Issue fixed, The Task was not running Smile