(28 Aug, 2011, 10:43 am)Sama34 escribió: Por favor pasa tu headerinclude y tu portal, plantillas por supuesto.
al agregar la libreria al headerinclude, talvez, se ordenen los modulos o bloques en el portal, pero sigue sin salir las pestañas, y se añadio un error, al top de la pagina:
Parse error: syntax error, unexpected '<' in /portal.php(632) : eval()'d code(442) : eval()'d code on line 109
my code:
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 align="center">
<li><a href="#pestaña1">Últimos Post</a></li>
<li><a href="#pestaña2">Últimos Comentarios</a></li>
<li><a href="#pestaña3">Top posteadores</a></li>
<li><a href="#pestaña4">Afiliados</a></li>
<li><a href="#pestaña5">Nuevo Post</a></li>
</ul>
<div>
<div style="display: block;" id="pestaña1">
<?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 = " ";
}
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=\"[url=http://Quepag.tk/forumdisplay.php?fid=]http://quepag.tk/forumdisplay.php?fid=[/url]{$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>» </strong>
Respuestas: $replies <br />
<strong>» </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">
<?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">
<?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">
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr>
<td colspan='2' colspan=""><center><strong>Los hermanos de Shitup (vip)</strong></center></td>
<tr><td class='trow2'><center><a href="[url=http://www.quepag.tk/]http://www.quepag.tk/[/url]" title="Quepag HB"_blank">Quepag</a></center> </td><td class='trow2'>Quepag - Muestrame tu web</td></tr>
</table>
<br />
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr>
<td colspan='2' colspan=""><strong>Afiliarse</strong></td></tr>
<tr><td>¿Como ser Afiliado?</td>
<td>
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="[url=http://www.Quepag.tk/]http://www.Quepag.tk/[/url]" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="[url=http://www.shitup.net/images/shit.png]http://www.shitup.net/images/shit.png[/url]"></a></center></td>
<td class='trow1' width="60%">
<textarea cols='50' rows='5' readonly='readonly'><a href="[url=http://www.Quepag.tk/]http://www.Quepag.tk/[/url]" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="[url=http://www.shitup.net/images/shit.png]http://www.shitup.net/images/shit.png[/url]"></a>
</textarea>
</td>
</tr>
<tr>
<td class='trow1' width="20%"><center>Banner (300x80)</center><br/>
<center><a href="[url=http://www.shitup.net/]http://www.shitup.net/[/url]" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="[url=http://www.shitup.net/images/shit300.png]http://www.shitup.net/images/shit300.png[/url]"></a></center>
</td>
<td class='trow1' width="60%">
<textarea cols='50' rows='5' readonly='readonly'><a href="[url=http://www.shitup.net/]http://www.shitup.net/[/url]" title="ShitUp ↑゚ Foro sin reglas!" target="_blank"><img src="[url=http://www.shitup.net/images/shit300.png]http://www.shitup.net/images/shit300.png[/url]"></a>
</textarea>
</td>
</tr>
</table>
<table border="0" cellspacing="1" cellpadding="4">
<tr>
<td><strong>Afiliados </td>
</tr>
<tr>
<td align="center">
<div align="center">
<strong>
</td>
</tr>
</table>
</div>
<div style="display: block;" id="pestaña5">
<?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]=" {$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\" /> <b>Cerrar Tema:</b> evita futuros mensajes en este tema.</label><br />
<label><input type=\"checkbox\" class=\"checkbox\" name=\"modoptions[stickthread]\" value=\"1\" /> <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>";
}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
}
else {
echo $npost;
}
?>
</div>
</td>
<td valign="top" width="230">
{$welcome}
{$pms}
{$search}
{$stats}
{$whosonline}
</td>
</tr>
</table>
{$ps_footer_portal}
{$footer}
</body>
</html>