MyBB Community Forums

Full Version: MYPS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do I move the points display to somewhere else in the user_postbit.
Where is the template to change this? I thought it would either be in postbit or postbit_author_user but it's not in either.
Help please!
It adds the "Points" to {$post['userdetails']} ( == postbit_author_user ), you will need to create a new var in the plugin file that contains the necessary info.
What's a 'var'??
and how do I do what you just said...?
var : variable ; like $post['userdetails']

Open ./inc/plugins/myps.php

Find [ function myps_display($post) ]

Replace the whole function with this
function myps_display($post)
{
  	global $mybb, $db, $lang, $plugins;

	$plugins->run_hooks("myps_display_start");

	$language = $mybb->settings['bblanguage'];
	$lang->load("myps");
	$lang->set_language($mybb->settings['bblanguage']);

	if ($mybb->settings['myps_status'] != "off" && $post['uid'] != 0)
	{
		$result = $db->query("SELECT * FROM `".TABLE_PREFIX."users` WHERE uid='".$post['uid']."'");
		$show = $db->fetch_array($result);
		$myps = round($show['myps'],$mybb->settings['myps_decimal']);

		$post['user_myps'] = "<span class=\"smalltext\">{$mybb->settings['myps_name']} : <a href=\"myps.php?action=donate&amp;username={$post['username']}\">{$myps}</a></b>";

  		if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin')
		{
			$post['user_myps'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&amp;username={$post['username']} \">{$lang->myps_edit}</a>)";
    		}

  		if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods')) 
		{
			$post['user_myps'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&amp;username={$post['username']} \">{$lang->myps_edit}</a>)";
    		}

  		if((is_moderator($fid) == "yes") && ($mybb->settings['myps_allowmod'] == 'mypspermall'))
		{
			$post['user_myps'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&amp;username={$post['username']} \">{$lang->myps_edit}</a>)";
    		}
  	}

	$plugins->run_hooks("myps_display_end");
}

Then you can use {$post['user_myps']} in your postbit template for showing the points where you want.
LeX- you're a strawberry genius!
amywinehouseforum.co.uk Wrote:LeX- you're a strawberry genius!

LeX- man if I was gay I would kiss you man then give you a home made cake.

Toungue
I have another problem with MYPS.
When viewing my stats page it tells me the richest members right? Wrong! I am the richest member and it isn't showing my name. There are also about 50 members richer than the richest member displayed on the stats page!! I tried recounting the MYPS in 'options' but it's made no difference.

Also, how can this mod be used? Like, can I make it so members have to pay a certain amount to change their username for example. And is there a page for MYPS. I tried visiting [my forum url]/myps.php but there's nothing there. Can anyone help???
That's a known bug (richest myps members)...at least I reported it to Labrocca on his site and he's looking into it.

Don't exactly know what you mean by a page for MYPS, but it does have its own document in Help.
Also for the myps page go to the your forums faq theres a myps info page there
OK thanks guys.
What about receiving points if someone enters you as a referer? And having to pay 1oo points, for example, to change your username. These would be handy features.
Pages: 1 2