MyBB Community Forums

Full Version: How do i move the location of these details?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello i'm pretty new to Mybb and i must say i do enjoy it Sleepy but i have one simple question to ask of you guys. Do you know how i can re-locate some user details.

I went into ACP > Templates & Themes > Templates > Mystyle > Post_bit.

And i believe i am in the right area because im not using the classic look which im guessing would be post_bit_classic.

But anyways i went into post_bit and i figured out how to move them from side to side but i want them to move like this image below but i cannot sepperate the details because they all go by this command:

{$post['user_details']}

But anyways here is what i want to do:

Here is how it currently is:
[Image: 73gw2o.jpg]

I want to make it like this: ( i photoshopped it i didnt code it like this of course.. lol )

[Image: anla2x.jpg]
The template you need is postbit_author_user, and to get it how you want it, I'd use a table, with 2 columns.
(2009-06-14, 06:27 PM)MattRogowski Wrote: [ -> ]The template you need is postbit_author_user, and to get it how you want it, I'd use a table, with 2 columns.

Okay so how would i do that i know HTML, and a little bit of PHP but i want to make sure its done right can you help me?:

{$lang->postbit_posts} {$post['postnum']}<br />
{$lang->postbit_joined} {$post['userregdate']}
{$post['replink']}{$post['warninglevel']}
What about the code for the other stuff that shows there?? Is that all there is??
Nope that is my problem i dont know the EXP / HP / MP name. I have the plugin still and here is the only php file for the plugin if you could maybe find it in here:

<?php
/*
 *
 ** HP / MP / EXP Mod
 *
 */

// Add The Hooks For the functions 
$plugins->add_hook("postbit", "hpmpexp_postbit");

// Plugin Info
function hpmpexp_info()
{
	return array(
		"name"			=> "HP / MP / EXP Statistics",
		"description"	=> "Adds a RPG Stats Counter to the postbit.",
		"website"		=> "http://ryan.mybb-templates.com/",
		"author"		=> "Ryan Ashbrook",
		"authorsite"	=> "http://ryan.mybb-templates.com/",
		"version"		=> "1.0.0",
	);
}

// Activate The Plugin
function hpmpexp_activate()
{
}

// Deactivate The Plugin
function hpmpexp_deactivate()
{
}

function hpmpexp_postbit($post)
{
  	global $mybb, $db;
  	$post['postnum'] = str_replace($mybb->settings['thousandssep'], '', $post['postnum']);
  	$daysreg = (time() - $post['regdate']) / (24*3600);
	$postsperday = $post['postnum'] / $daysreg;
	$postsperday = round($postsperday, 2);
	if($postsperday > $post['postnum'])
	{
		$postsperday = $post['postnum'];
	}
	$rpglvl = $post['postnum'];
	$level = pow (log10 ($rpglvl), 3);
	$ep = floor (100 * ($level - floor ($level)));
	$showlevel = floor ($level + 1);
	$hpmulti = round ($postsperday / 6, 1);
	if ($hpmulti > 1.5)
	{
		$hpmulti = 1.5;
	}
	if ($hpmulti < 1)
	{
		$hpmulti = 1;
	}

	$maxhp = $level * 25 * $hpmulti;
	$hp = $postsperday / 1;
	if ($hp >= 1)
	{
		$hp = $maxhp;
	}
	else
	{
		$hp = floor ($hp * $maxhp);
	}
	$hp = floor ($hp);
	$maxhp = floor ($maxhp);
	if ($maxhp <= 0)
	{
		$zhp = 1;
	}
	else
	{
		$zhp = $maxhp;
	}
	$hpf = floor (100 * ($hp / $zhp)) - 1;

	$maxmp = ($daysreg * $level) / 5;
	$mp = $rpglvl / 3;
	if ($mp >= $maxmp)
	{
		$mp = $maxmp;
	}
	$maxmp = floor ($maxmp);
	$mp = floor ($mp);
	if ($maxmp <= 0)
	{
		$zmp = 1;
	}
	else
	{
		$zmp = $maxmp;
	}
	$mpf = floor (100 * ($mp / $zmp)) - 1;

	$showlevel = my_number_format($showlevel);
	$maxhp = my_number_format($maxhp);
	$hp = my_number_format($hp);
	$maxmp = my_number_format($maxmp);
	$mp = my_number_format($mp);

	$post['user_details'] = "{$post['user_details']}<br /><br /><span class=\"smalltext\">Level: {$showlevel}</span><br />
<span class=\"smalltext\">HP: {$hp} / {$maxhp}</span>
	<table width=\"60\" class=\"rpg1\"  cellspacing=\"0\" align=\"center\">
		<tr> 
			<td class=\"rpg2\" nowrap=\"nowrap\"><img alt=\"{$post['username']}'s HP\" src=\"images/rpg/bhg.gif\" width=\"{$hpf}%\" height=\"8\" /><img alt=\"{$post['username']}'s HP\" src=\"images/rpg/bhb.gif\" width=\"1\" height=\"8\" /></td>
		</tr>
	</table>
<span class=\"smalltext\">MP: {$mp} / {$maxmp}</span>
	<table width=\"60\" class=\"rpg1\" cellspacing=\"0\" align=\"center\">
		<tr> 
			<td class=\"smalltext\" nowrap=\"nowrap\"><img alt=\"{$post['username']}'s MP\" src=\"images/rpg/bmg.gif\" width=\"{$mpf}%\" height=\"8\" /><img alt=\"{$post['username']}'s MP\" src=\"images/rpg/bmb.gif\" width=\"1\" height=\"8\" /></td>
		</tr>
	</table>
<span class=\"smalltext\">EXP: {$ep}% </span> 
	<table width=\"60\" class=\"rpg1\" cellspacing=\"0\" align=\"center\">
		<tr> 
			<td class=\"rpg2\" nowrap=\"nowrap\"><img alt=\"{$post['username']}'s EXP\" src=\"images/rpg/bxg.gif\" width=\"{$ep}%\" height=\"8\" /><img alt=\"{$post['username']}'s EXP\" src=\"images/rpg/bxb.gif\" width=\"1\" height=\"8\" /></td>
		</tr>
	</table>";
}
?>