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
Ultimos temas en portal con imagenes ¿como conseguirlo?
Páginas (2):    1 2
DARKNESSDH_mybb_import8424   28 Mar, 2011, 4:54 pm
#11
pasa la plantilla como la pusiste has de ver metido mal el codigo
Sonichaos   28 Mar, 2011, 5:22 pm
#12
Tengo que poner codigos por todos lados a la plantilla portal segun dice en ese post tengo que reemplazarla entera por este codigo:

Código:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
{$ps_header_portal}
<script type="text/javascript">

jQuery.noConflict();

jQuery(document).ready(function() {

    jQuery(".pestañas_portal_contenido").hide();

    jQuery("ul.pestañas_portal li:first").addClass("activa").show();

    jQuery(".pestañas_portal_contenido:first").show();

    jQuery("ul.pestañas_portal li").click(function() {

        jQuery("ul.pestañas_portal li").removeClass("activa");

        jQuery(this).addClass("activa");

        jQuery(".pestañas_portal_contenido").hide();

        var activeTab = jQuery(this).find("a").attr("href");

        jQuery(activeTab).fadeIn();

        return false;

    });

});

</script>

<table width="100%" cellspacing="0" cellpadding="4" border="0" align="center">

<tr>
<td valign="top">
<ul class="pestañas_portal" align="center">
<li class="activa"><a href="#pestaña1">Últimos Post</a></li>
<li class=""><a href="#pestaña2">Últimos Comentarios</a></li>
<li class=""><a href="#pestaña3">Top posteadores</a></li>
<li class=""><a href="#pestaña4">Afiliados</a></li>
<li class=""><a href="#pestaña5">Nuevo Post</a></li>
</ul>
<div class="pestañas_portal_contenedor">
<div style="display: block;" id="pestaña1" class="pestañas_portal_contenido">
<?php
if (!defined("IN_PORTAL")) {
    die("<div style=\"border:1px solid #CC0000; padding:3px; margin:0; font-family:Tahoma; width:250px; font-size:12px;\"><strong>Error:</strong> This file cannot be viewed directly!</div>");
}

// Get forums user cannot view
$unviewable = get_unviewable_forums();
if($unviewable)
{
    $unviewwhere = " AND fid NOT IN ($unviewable)";
}

$threadlimit = 12;
$query = $db->query("
    SELECT t.*, t.subject AS threadsubject, u.username, u.usergroup, u.displaygroup, i.*, i.name AS iconname,
    t.dateline AS threaddate, t.lastpost AS threadlastpost
    FROM ".TABLE_PREFIX."threads t
    LEFT JOIN ".TABLE_PREFIX."icons i ON (i.iid=t.icon)
    LEFT JOIN ".TABLE_PREFIX."users u ON (t.lastposter=u.username)
    WHERE t.visible = '1'
    $unviewwhere
    GROUP BY t.tid
    ORDER BY threaddate DESC
    LIMIT 0, $threadlimit
");

while($threads = $db->fetch_array($query))
{

    if($threads['icon'] > 0)
    {
        $icon = "<img src=\"{$threads['path']}\" alt=\"{$threads['iconname']}\" />";
    }
    else
    {
        $icon = "&nbsp;";
    }

    if(strlen($threads['threadsubject']) > "60")
    {
        $threadsthreadsubject = my_substr($threads['threadsubject'],0,60)."...";
    }
    else
    {
        $threadsthreadsubject = $threads['threadsubject'];
    }

    if(strlen($threads['forumname']) > "20")
    {
        $threadsforumname = my_substr($threads['forumname'],0,20)."...";
    }
    else
    {
        $threadsforumname = $threads['forumname'];
    }

    $threadlink = get_thread_link($threads['tid']);
    $forumlink = get_forum_link($threads['fid']);
    $replies = my_number_format($threads['replies']);
    $views = my_number_format($threads['views']);
    $lastpostdate = my_date($mybb->settings['dateformat'], $threads['threadlastpost']);
    $lastposttime = my_date($mybb->settings['timeformat'], $threads['threadlastpost']);
    $lastposter = format_name($threads['username'], $threads['usergroup'], $threads['displaygroup']);
    $lastposter = build_profile_link($lastposter, $threads['lastposteruid']);

    $last_thread .= "<tr>
        <td class=\"trow2\" align=\"center\" width=\"1\"><a href=\"http://blixcore.com/forumdisplay.php?fid={$threads['fid']}\"><img src=\"images//ficons/icon_{$threads['fid']}.png\" width=\"35\" height=\"35\" alt=\"\"  title=\"$threads[forumname]\" /></a></td>
        <td class=\"trow2\"><a href=\"$threadlink\" title=\"$threads[threadsubject]\">$threadsthreadsubject</a><br />
        <span class=\"smalltext\">
        $lastpostdate $lastposttime, Posteado por <em>$lastposter</em><br />
        <div class=\"float_right\">$lastpostdate $lastposttime <a href=\"$threadlink&action=lastpost\"><img src=\"images/tema/lastpost.png\" style=\"vertical-align: middle;\" /></a> </div>
            </span>
            </td>
        <td class=\"tcat\" width=\"100\">
<span class=\"smalltext\"><strong>&raquo; </strong>
        Respuestas: $replies <br />
        <strong>&raquo; </strong>Visitas: $views
        </td>
</tr>";

}
if(!$last_thread){ $last_thread = "<tr><td class=\"trow1\" colspan=\"5\">{$lang->no_thread}</td></tr>"; }
echo "
<table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"tborder\" style=\"-moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px;\">
        <tbody><tr>
            <td class=\"thead\" colspan=\"3\"><strong>Últimos Post</strong></td>
        </tr>
        </tbody>
{$last_thread}
</table>";
?>
</div>
<div style="display: block;" id="pestaña2" class="pestañas_portal_contenido">
<?php
if (!defined("IN_PORTAL")) {
    die("<div style=\"border:1px solid #CC0000; padding:3px; margin:0; font-family:Tahoma; width:250px; font-size:12px;\"><strong>Error:</strong> This file cannot be viewed directly!</div>");
}

// Get forums user cannot view
$unviewable = get_unviewable_forums();
if($unviewable)
{
    $unviewwhere = " AND fid NOT IN ($unviewable)";
}

$altbg = alt_trow();
$threadlist = '';
$showlimit = 15;
$query = $db->query("
    SELECT p.*, u.username
    FROM ".TABLE_PREFIX."posts p
    LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
    WHERE p.visible='1' $unviewwhere
    ORDER BY p.dateline DESC
    LIMIT 0, ".$showlimit
);
while($thread = $db->fetch_array($query))
{
    $lastpostdate = my_date($mybb->settings['dateformat'], $thread['dateline']);
    $lastposttime = my_date($mybb->settings['timeformat'], $thread['dateline']);
    // Don't link to guest's profiles (they have no profile).
    if($thread['uid'] == 0)
    {
        $lastposterlink = $thread['username'];
    }
    else
    {
        $lastposterlink = build_profile_link($thread['username'], $thread['uid']);
    }
    if(my_strlen($thread['subject']) > 20)
    {
        $thread['subject'] = my_substr($thread['subject'], 0, 20) . "...";
    }
    $thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
    $thread['threadlink'] = get_post_link($thread['pid'],$thread['tid']);
$forumlink = get_forum_link($threads['fid']);
    $threadlist .= "
<tr>
        <td class=\"trow2\"><strong><a href=\"".$mybb->settings['bburl']."/".$thread['threadlink']."#pid".$thread['pid']."\">$thread[subject]</a></strong><br />
        <span class=\"smalltext\">
$lang->posted_by <em>$lastposterlink</em> -$lastpostdate $lastposttime
            </span>
            </td>
</tr>";
    $altbg = alt_trow();
}
if($threadlist)
{
    // Show the table only if there are threads
    $latestposts = "<table border=\"0\" cellspacing=\"".$theme['borderwidth']."\" cellpadding=\"".$theme['tablespace']."\" class=\"tborder\">
        <tbody><tr>
            <td class=\"thead\"><div class=\"expcolimage\"></div><strong>Ultimos comentarios</strong></td>
        </tr>
</tbody>
        {$threadlist}        
    </table>";
}
else
{
    $latestposts = "<table border=\"0\" cellspacing=\"".$theme['borderwidth']."\" cellpadding=\"".$theme['tablespace']."\" class=\"tborder\">
        <tbody><tr>
            <td class=\"thead\"><div class=\"expcolimage\"></div><strong>Ultimos comentarios</strong></td>
        </tr></tbody>
        <tbody style=\"{$expdisplay}\" id=\"block_{$result_blocks['id']}_e\">
        <tr>
        <td class=\"$altbg\">No Post</td>
        </tr>
        </tbody>
    </table>";
}

echo "$latestposts";
?>
</div>
<div style="display: block;" id="pestaña3" class="pestañas_portal_contenido">
<?php
$tpaltbg = alt_trow();
$query = $db->query("SELECT uid, username, postnum, avatar, avatardimensions, usergroup, displaygroup FROM ".TABLE_PREFIX."users ORDER by postnum DESC LIMIT 0, 10");
while($user = $db->fetch_array($query))
{
    $username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
    $profilelink = get_profile_link($user['uid']);
    if($user['postnum'] <= "1"){ $postnum = my_number_format($user['postnum'])." ".$lang->have_post; }else{ $postnum = my_number_format($user['postnum'])." ".$lang->have_posts; }
    
    if($user['avatar']){ $user['avatar'] = htmlspecialchars_uni($user['avatar']); }else{ $user['avatar'] = $mybb->settings['bburl']."/portal/images/user.png"; $user['avatardimensions'] = "40|40"; }
    $avatar_dimensions = explode("|", $user['avatardimensions']);
    
    if($avatar_dimensions[0] && $avatar_dimensions[1])
    {
        list($max_width, $max_height) = explode("x", my_strtolower("40x40"));
        if($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height)
        {
            require_once MYBB_ROOT."inc/functions_image.php";
            $scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width, $max_height);
            $block_avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
        }
        else
        {
            $block_avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";    
        }
    }
    
    $topposters .= "<tr><td class=\"tcat\" width=\"50\" align=\"center\"><img src=\"".$user['avatar']."\" alt=\"\" width=\"70\" height=\"70\" border=\"0\"></td><td class=\"trow1\"><a href=\"{$mybb->settings['bburl']}/{$profilelink}\"><strong>{$username}</strong></a><br></td><td class=\"trow1\" align=\"center\">{$postnum}</td></tr>";
$tpaltbg = alt_trow();
}

echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"tborder\" style=\"-moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-left-radius: 0px;\">
        <tr>
            <td class=\"thead\" colspan=\"3\"><strong>Top participativos</strong></td>
        </tr>
        <tr>
            <td class=\"tcat smalltext\" width=\"70\" align=\"center\"><strong>Avatar</strong></td>
            <td class=\"tcat smalltext\"><strong>Nombre de usuario</strong></td>
            <td class=\"tcat smalltext\" align=\"center\"><strong>Mensajes</strong></td>
        </tr>
        {$topposters}
    </table>";
?>
</div>
<div style="display: block;" id="pestaña4" class="pestañas_portal_contenido">
<table border="0" cellspacing="0" cellpadding="4" class="tborder" width="100%">

    <tr>
<td colspan='2' class="thead" colspan=""><center><strong>Los hermanos de Shitup (vip)</strong></center></td>
    <tr><td class='trow2'><center><a href="http://www.blixcore.com.ar/" title="Blixcore HB"_blank">BlixCore</a></center>  </td><td class='trow2'>Blixcore Foro de lo mejor...</td></tr>

</table>

<br />
<table border="0" cellspacing="0" cellpadding="4" class="tborder" width="100%">


    <tr>
        <td colspan='2' class="thead" colspan=""><strong>Afiliarse</strong></td></tr>
<tr><td class="trow2">¿Como ser Afiliado?</td>    
<td class="trow2">
Este es nuestro espacio de afiliados. Para afiliarte debes solicitarlo en la zona de afiliados en el foro, para aparecer en zona vip, deveras poner un banner shitup de 300x80 en tu foro, o puedes poner el de 88x31 para aparecer en la parte de abajo de zona afiliados:
    </td>
</tr>    
<tr>
<td class='trow1' width="20%"><center>Banner (88x31)</center><br/>
<center><a href="http://www.shitup.net/" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="http://www.shitup.net/images/shit.png"></a></center></td>
<td class='trow1' width="60%">
<textarea cols='50' rows='5' readonly='readonly'><a href="http://www.shitup.net/" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="http://www.shitup.net/images/shit.png"></a>

</textarea>
</td>
</tr>
<tr>
<td class='trow1' width="20%"><center>Banner (300x80)</center><br/>
<center><a href="http://www.shitup.net/" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="http://www.shitup.net/images/shit300.png"></a></center>
</td>
<td class='trow1' width="60%">
<textarea cols='50' rows='5' readonly='readonly'><a href="http://www.shitup.net/" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="http://www.shitup.net/images/shit300.png"></a>

</textarea>
</td>
</tr>
  
</table>
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Afiliados </td>
</tr>
<tr>
<td class="trow1" align="center">

<div align="center">
<strong>


</td>
</tr>
</table>
</div>
<div style="display: block;" id="pestaña5" class="pestañas_portal_contenido">
<?php
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'nuevo.php');
require_once "./global.php";
add_breadcrumb("Redactar Nuevo Tema");
$consulta = $db->query("SELECT * FROM ".TABLE_PREFIX."forums WHERE active='1' AND open='1' ORDER BY pid, disporder");
while ($foruml = $db->fetch_array($consulta))
{
    if($foruml[type]=="f")
    {        
    $foruml[name]="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$foruml[name]}";
    $permissioncache[$foruml[fid]] = forum_permissions($fid=$foruml[fid]);
        if($permissioncache[$foruml[fid]][canview]=="0") {}
        else
        {
        $forumlist.="<option value=\"{$foruml[fid]}\"> {$foruml[name]}</option>";    
        }
    }
}
if($mybb->user['uid'])
{
    eval("\$savedraftbutton = \"".$templates->get("post_savedraftbutton", 1, 0)."\";");
}
$subscriptionmethod="<tr>
<td class=\"trow2\" valign=\"top\"><b>Suscripción a Tema:</b><br /><span class=\"smalltext\">
Especifique que tipo de notificación si quieres suscribirte a este tema. (Sólo usuarios registrados)<br />
    <label><input type=\"radio\" name=\"postoptions[subscriptionmethod]\" checked=\"checked\" value=\"\" style=\"vertical-align: middle;\" /> No suscribir a este tema</label><br />
    <label><input type=\"radio\" name=\"postoptions[subscriptionmethod]\" value=\"none\" style=\"vertical-align: middle;\" /> Suscribir sin recibir ninguna notificación por correo electrónico de nuevas respuestas</label><br />
    <label><input type=\"radio\" name=\"postoptions[subscriptionmethod]\" value=\"instant\" style=\"vertical-align: middle;\" /> Suscríbase y reciba notificación por correo electrónico de respuestas nuevas</label></span><br />
</td>
</tr>";
if($mybb->usergroup[canmodcp]=="1")
{
$modoptions = "<tr>
<td class=\"trow2\" valign=\"top\"><strong>Opciones del Moderador:</strong><br />
<span class=\"smalltext\">
<label><input type=\"checkbox\" class=\"checkbox\" name=\"modoptions[closethread]\" value=\"1\" />&nbsp;<b>Cerrar Tema:</b> evita futuros mensajes en este tema.</label><br />
<label><input type=\"checkbox\" class=\"checkbox\" name=\"modoptions[stickthread]\" value=\"1\" />&nbsp;<b>Tema Importante:</b> Ubica este tema al principio de la lista de temas (a la vista de todos).</label>
</span></td>
</tr>";
}
if($mybb->settings['bbcodeinserter'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
    $codebuttons = build_mycode_inserter();
}
$npost = "
<table border=\"0\" cellspacing=\"{$theme['borderwidth']}\" cellpadding=\"{$theme['tablespace']}\" class=\"tborder\">
<tr>
<td class=\"thead\"><strong>Agregar Nuevo Post</strong></td>
</tr>
<tr>
<td class=\"trow2\" width=\"100%\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">
<td align=\"left\" width=\"60%\">
<table border=\"0\" cellspacing=\"{$theme['borderwidth']}\" cellpadding=\"{$theme['tablespace']}\" width=\"100%\">
<tr>
<form action=\"newthread.php\" method=\"post\" enctype=\"multipart/form-data\" name=\"input\">
<input type=\"hidden\" name=\"my_post_key\" value=\"{$mybb->post_code}\" />
<td class=\"trow2\">
<span style=\"font-size:18px;font-weight: bold;\">Titulo:</span><br />
<input type=\"text\" class=\"textbox\" name=\"subject\" size=\"85\" maxlength=\"85\" value=\"\" tabindex=\"1\" /></td>
</tr>
<td class=\"trow2\">
<span style=\"font-size:18px;font-weight: bold;\">Contenido:</span><br />
<textarea name=\"message\" id=\"message\" rows=\"20\" cols=\"70\" tabindex=\"2\"></textarea>
{$codebuttons}
</td>
</tr>
</table>
</td>
<td align=\"rigth\" valign=\"top\" width=\"40%\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><span style=\"font-size:18px;font-weight: bold;\">Escoger Categoria:</span><br />
<select name=\"fid\" size=\"28\" style=\"width: 230px;\">
{$forumlist}
</select></td>
</tr>
</table>
</td>
</table>
</td>
</tr>
<tr>
<td class=\"trow1\" valign=\"top\"><strong>Opciones de Envío:</strong><br/><span class=\"smalltext\">
<label><input type=\"checkbox\" class=\"checkbox\" name=\"postoptions[signature]\" checked=\"checked\" value=\"1\" tabindex=\"7\"/> <b>Firma:</b> incluye tu firma. (Solo usuarios registrados)</label>
{$disablesmilies}</span></td>
</tr>
{$subscriptionmethod}
{$modoptions}
</table>
<br />
<div style=\"text-align:center\"><input type=\"submit\" class=\"button\" name=\"submit\" value=\"Publicar Tema\" tabindex=\"4\" accesskey=\"s\" />  <input type=\"submit\" class=\"button\" name=\"previewpost\" value=\"Vista Previa del Tema\" tabindex=\"5\" />{$savedraftbutton}</div>
<input type=\"hidden\" name=\"action\" value=\"do_newthread\" />
</form><br />";
if($mybb->user[usergroup]=="1")
{
echo "<table class=\"tborder\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\">
<tbody><tr>
<td class=\"thead\"><strong>Error</strong></td>
</tr>
<tr>
<td class=\"trow1\" align=\"center\">
Solo Usuarios registrados Pueden Postear <a href=\"{$mybb->settings[bburl]}/member.php?action=register\">Registrate</a>
</td>
</tr>
</tbody></table>";
}
else {
echo $npost;
}
?>
</div>
</td>
<td valign="top" width="230">
{$welcome}
{$pms}
{$search}
{$stats}
{$whosonline}
</td>
</tr>
</table>
{$ps_footer_portal}
{$footer}
</body>
</html>

En Global.css tengo que agregar esto:
Código:
ul.pestañas_portal {
    margin: 0;
    padding: 0;
    float: left;
    list-style: none;
    height: 31px;
    width: 100%;
}

ul.pestañas_portal li {
    font-size: 10px;
    font-weight: bold;
    float: left;
    margin: 0 5px 0 0;
    padding: 0;
    height: 30px;
    line-height: 30px;
    border: 1px solid #ccc;
    border-bottom: none;
background: #cfcfcf ;
    overflow: hidden;
    position: relative;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-topright: 10px;
    -webkit-border-top-left-radius: 10px;
    -webkit-border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

ul.pestañas_portal li a {
    text-decoration: none;
    color: #000;
    display: block;
    font-size: 1.2em;
    padding: 0 10px;
    outline: none;
}

ul.pestañas_portal li a:hover {
    background: #efefef;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-topright: 10px;
    -webkit-border-top-left-radius: 10px;
    -webkit-border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

html ul.pestañas_portal li.activa, html ul.pestañas_portal li.activa a:hover {
    background: #fff;
    border: 1px solid #ccc;
border-bottom: 0px;
}

.pestañas_portal_contenedor {
    border-top: none;
    clear: both;
    float: left;
    width: 100%;
}

.pestañas_portal_contenido {
    padding: 0px;
    font-size: 1.2em;
}

Y en el header include tengo que poner esto:

Código:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

Esos son los tres pasos que dice que debo seguir luego de activar el plugin php en plantillas. Y es lo que hice y sale asi como en el screen. u_u[/quote]
DARKNESSDH_mybb_import8424   28 Mar, 2011, 6:16 pm
#13
si activaste bien el plugin???
Sonichaos   28 Mar, 2011, 6:24 pm
#14
Bueno pues te cuento, el plugin que da ahi el que hizo ese post no funciona lo subes y no aparece para activarlo. Asi que descargue ese mismo plugin pero desde otro lado y si lo estoy activando bien parece :S

[Imagen: activadou_u.png]
Páginas (2):    1 2
  
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.