Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/mybb-es.com/html/inc/plugins/avatarep.php on line 1102

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/mybb-es.com/html/inc/class_language.php on line 201
Hp,mp,exp Plugin
~EroKenji   22 Nov, 2009, 8:19 pm
#1
Url: http://animerlz.byethost16.com/
-Version del Foro: MyBB 1.4.9
-Actualizacion: Ninguna
-Informacion del problema:
Se visualiza de forma erronea?
[Imagen: dibujozf.png]
Quisiera que se visualizara normal.
Como en la siguiente imagen:
[Imagen: dibujojev.png]

Estos son los datos del plugin:
Código PHP:
<?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']}<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"1\" style=\"font-size:12px\">
<tr>
<td class=\"trow8\"><span class=\"smalltext\">Nivel:
{$showlevel}</span><br />
<span class=\"smalltext\"><b>Puntos:</b>
{$hp} / {$maxhp}</span>
<table width=\"60\" class=\"rpg1\" cellspacing=\"0\">
<tr>
<td class=\"rpg2\" nowrap=\"nowrap\ align=\"center\"><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\"><b>Siguiente Nivel:</b>
{$mp} / {$maxmp}</span>
<table width=\"60\" class=\"rpg1\" cellspacing=\"0\">
<tr>
<td class=\"smalltext\" nowrap=\"nowrap\ align=\"center\"><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\"><b>Actividad:</b>
{$ep}% </span>
<table width=\"60\" class=\"rpg1\" cellspacing=\"0\">
<tr>
<td class=\"rpg2\" nowrap=\"nowrap\ align=\"center\"><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> </td>
</tr>

</table>"
;
}
?>

Y estos son los datos que se supone que debo pegar y pege en Globa.css -> Edicion Avanzada:
Código PHP:
<?php 
.rpg1 {
border: 1px solid #FF7F00;
text-align: left;
}

.
rpg2 {
background: url(images/rpg/bhb.gif) 0px 0px;
}

.
rpg3 {
border: 1px solid #0000FF;
text-align: left;
}

.
rpg4 {
background: url(images/rpg/bxb.gif) 0px 0px;
}

.
rpg5 {
border: 1px solid #238E23;
text-align: left;
}

.
rpg6 {
background: url(images/rpg/bmb.gif) 0px 0px;
}

Espero ayuda rapida D=
Himura   23 Nov, 2009, 3:15 pm
#2
No te funcioma bien porque ese css no es para ese plugin
para usar ese css el plugin deve estar asi
Código:
<?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;
      $daysreg = (time() - $post['regdate']) / (24*3600);
    $postsperday = $post['postnum'] / $daysreg;
    $postsperday = round($postsperday, 2);
    if($postsperday > $post['postnum'])
    {
        $postsperday = $post['postnum'];
    }
    $rpglvl = str_replace(array(' ', ',', '.'), '', $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;
    $pm = $showlevel;

    $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']}<span class=\"smalltext\">Nivel: {$showlevel}</span><br />
<span class=\"smalltext\">Puntos: {$hp}</span>
    <table width=\"160\" class=\"rpg1\"  cellspacing=\"0\">
        <tr>
            <td class=\"rpg2\" nowrap=\"nowrap\"><img alt=\"{$post['username']}'s HP\" src=\"images/rpg/bhg.gif\" width=\"{$pm}%\" height=\"9\" /><img alt=\"{$post['username']}'s HP\" src=\"images/rpg/bhb.gif\" width=\"1\" height=\"9\" /></td>
        </tr>
    </table>
<span class=\"smalltext\">Siguiente Nivel</span>
    <table width=\"160\" class=\"rpg3\" cellspacing=\"0\">
        <tr>
            <td class=\"rpg4\" nowrap=\"nowrap\"><img alt=\"{$post['username']}'s EXP\" src=\"images/rpg/bxg.gif\" width=\"{$ep}%\" height=\"9\" /><img alt=\"{$post['username']}'s EXP\" src=\"images/rpg/bxb.gif\" width=\"1\" height=\"9\" /></td>
        </tr>
    </table>
<span class=\"smalltext\">Actividad: {$mp}% </span>
    <table width=\"160\" class=\"rpg5\" cellspacing=\"0\">
        <tr>
            <td class=\"rpg6\" nowrap=\"nowrap\"><img alt=\"{$post['username']}'s MP\" src=\"images/rpg/bmg.gif\" width=\"{$mp}%\" height=\"9\" /><img alt=\"{$post['username']}'s MP\" src=\"images/rpg/bmb.gif\" width=\"1\" height=\"9\" /></td>
        </tr>
    </table>";
}
?>
~EroKenji   23 Nov, 2009, 4:02 pm
#3
Orale, muchisimas gracias prad!!
Ya se ve cool T_T
xD
Aeroxis   24 Nov, 2009, 9:34 am
#4
Solucionado, cerrado!
  
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.