<?php
function template_main()
{
global $context, $settings, $db_prefix, $options, $txt, $scripturl, $sourcedir, $modSettings;
if (($context['denunciaspost']) < 6){
echo '<a name="top"></a><a name="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a name="new"></a>' : '';
echo '<div>', theme_linktree(), '</div>';
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td class="middletext" valign="bottom" style="padding-bottom: 4px;"></td><td align="right" style="padding-right: 1ex;"><div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div><table cellpadding="0" cellspacing="0"><tr>', template_button_strip($normal_buttons, 'bottom'), '</tr></table></td></tr></table>';
foreach($sites as $site => $url) {
$entry = 'share_' . $site;
if(!empty($modSettings[$entry]) && $modSettings[$entry]) {
$social_icons .= sprintf('<a href="' . $url . '" target="_blank"><img src="' . $settings['images_url'] . '/share/' . $site . '.gif" align="bottom" title="' . $txt['share_default_tooltip'] . '" alt="' . $txt['share_default_tooltip'] . '" /></a>', urlencode($page_url), $txt[$entry], $txt[$entry]);
}
}
if($social_icons == "")
$social_icons = '<img src="' . $settings['images_url'] . '/topic/' . $context['class'] . '.gif" align="bottom" alt="" />';
// Build list of social icons
$social_icons = '';
$sites = array(
'facebook' => 'http://www.facebook.com/share.php?u=%s',
'delicious' => 'http://del.icio.us/post?url=%s',
'digg' => 'http://digg.com/submit?phase=2&url=%s',
'reddit' => 'http://reddit.com/submit?url=%s',
'stumbleupon' => 'http://www.stumbleupon.com/submit?url=%s',
'twitter' => 'http://twitter.com/home?status=%s',
);
if(!empty($modSettings['queryless_urls']) && $modSettings['queryless_urls'])
$page_url = $scripturl . '/topic,' . $context['current_topic'] . '.0.html';
else
$page_url = $scripturl . '?topic=' . $context['current_topic'] . '.0';
foreach($sites as $site => $url) {
$entry = 'share_' . $site;
if(!empty($modSettings[$entry]) && $modSettings[$entry]) {
$social_icons .= sprintf('<a href="' . $url . '" target="_blank"><img src="' . $settings['images_url'] . '/share/' . $site . '.gif" align="bottom" title="' . $txt['share_default_tooltip'] . '" alt="' . $txt['share_default_tooltip'] . '" /></a>', urlencode($page_url), $txt[$entry], $txt[$entry]);
}
}
if($social_icons == "")
$social_icons = '<img src="' . $settings['images_url'] . '/topic/' . $context['class'] . '.gif" align="bottom" alt="" />';
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tborder2">';
while ($message = $context['get_message']())
{
echo '<tr><td style="padding: 1px 1px 0 1px;">';
if ($message['id'] != $context['first_message'])
echo '<a name="msg', $message['id'], '"></a>', $message['first_new'] ? '<a name="new"></a>' : '';
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="20%" align="center" valign="top"><table width="100%"cellspacing="0" ><tr><td valign="top" width="20%" rowspan="2" ><table border="0" cellspacing="1" cellpadding="3" width="100%" style="margin-right: 8px; margin-top: -6px;"><tr><td valign="top"><div class="mensajepost11" style="margin-bottom: 1px; text-align:left;">Posteado por:</div>
<div class="windowbg" ><div class="smalltext" >';
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '<div class="windowbg4"><div class="content">', $message['member']['avatar']['image'], '</div> </div><div style="text-align:left;" class="color_azul2"> <b>', $message['member']['link'], '</b></div>';
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '<div style="text-align:left;">', $message['member']['blurb'], '</div>';
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '<div style="text-align:left;">', $message['member']['title'], '</div>';
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '<div style="text-align:left;"><b>', $message['member']['group'], '</b></div>';
if (!$message['member']['is_guest'])
{
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '<div style="text-align:left;"><b>', $message['member']['post_group'], '</b></div>';
echo '<div style="text-align:left;"><b>', $message['member']['group_stars'], '</b></div>';
echo '<div style="text-align:left;">';
//foreach ($context['userdatos'] as $user)
//{echo '<img src="', $settings['default_theme_url'], '/images/pais/pais_', $user['pais'],'.gif">';}
// echo ' ', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" style="margin-top: 2px;" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? ' ' : '', '';
// Show the member's gender icon?
echo ' ', $message['member']['gender']['image'], '';
echo '</div><br> ';
foreach ($context['userdatos'] as $user)
{ echo '<div class="texto_post"><span style="color:#FA6D01;">', $user['topics'] , ' </span><br>POST</div>
<div class="texto_post"><span style="color:#32A2F8;">', $user['posts'], ' </span><br>COMENTARIOS</div>';
}
echo'<div class="texto_post"><span style="color:#536C18;">', $modSettings['shopCurrencyPrefix'], (int)$message['member']['money'], ' </span><br>PUNTOS</div>';
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<div class="texto_post"><span style="color:#9C6515;">', $message['member']['karma']['good'] - $message['member']['karma']['bad'], ' </span><br>KARMA ';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><span style="color:#009900; font-weight:bold; font-size:12px;">+</span></a><span style="font-weight:normal; font-size:10px;"> / </span>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><span style="color:#FF0000; font-weight:bold; font-size:12px;">-</span></a>';
}
echo '<br><br><div class="windowbg4"><a href="', $scripturl, '?action=profile;u=', $message['member']['id'], ';sa=showPosts"><div class="boton2-2">Catalogo</div></a></div>';
echo '</div></div></div></td></tr></table></td></tr>';
echo '<tr> </tr></table>
</td><td width="96%" align="left" valign="top"><div class="mensajepost1"><div class="mensajepostlinea"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="50%" align="left" valign="middle"><a href="', $message['href'], '"><img src="', $message['icon_url'] . '" alt="" border="0" /></a> <a href="', $message['href'], '">', $message['subject'], '</a></td><td width="50%" align="right" valign="middle">';
if ($message['can_modify'])
echo '<a id="south" title="Modificar" href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '"><img src="', $settings['theme_url'], '/images/icons/add.png" width="16" height="16"></a>';
if ($context['can_split'])
echo '<a id="south3" title="Agrupar Post" href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '"><img src="', $settings['theme_url'], '/images/icons/application_side_list.png" width="16" height="16"></a>';
if ($message['can_remove'])
echo '<a id="south4" title="Bannear user" href="', $scripturl, '?action=ban;sa=add;u=', $message['member']['id'], '"><img src="', $settings['theme_url'], '/images/icons/user_delete.png" width="16" height="16"></a>';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '<input type="checkbox" name="msgs[]" value="', $message['id'], '" class="check" ', empty($settings['use_tabs']) ? 'onclick="document.getElementById(\'quickmodSubmit\').style.display = \'\';"' : '', ' />';
echo '</td></tr></table></div>', $message['body'], '<br><br><div class="mensajepost2">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="top"><b>Compartir</b> <br> ', $social_icons, ' </td>
<td align="center" valign="top"><b>Creado <br><div style="margin-top:6px;"></div><span class="color_gris">', $message['time'], ' </span></td></tr></table></div></div>';
if (!empty($context['denunciaspost'])){
echo '<div class="barradenuncias"><b>Post denunciado. (', $context['denunciaspost'], ')</b> ';
if ($context['allow_admin'])
echo ' <a href="', $scripturl, '?action=rz;m=denuncias"><span style="color:#FEFBFA;">Eliminar denuncia</span></a>';
echo '</div>';
}
echo '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="borde_post_1"><tr><td align="left" valign="bottom">';
if($context['user']['is_logged']){
echo '<span id="favs"></span><a href="', $scripturl, '?action=printpage;topic=', $context['current_topic'], '" rel="nofollow" target="_blank" title="Imprimir">
<img src="', $settings['default_theme_url'], '/images/icons/printer.png"/> Imprimir </a>
<a style=" cursor: pointer; display: inline;" onclick="add_Favoritos('.$context['current_topic'].'); ver_fav2('.$context['current_topic'].'); return false;" id="favoritos_reloaded">
<img src="', $settings['default_theme_url'], '/images/icons/star_1.png"/> Favoritos</a>
<a href="', $scripturl, '?action=sendtopic;topic=', $context['current_topic'], '" rel="nofollow" target="_blank" title="Enviar Tema">
<img src="', $settings['default_theme_url'], '/images/icons/email.png"/> Enviar</a>
<a title="Denunciar post" href="', $scripturl, '?action=denunciar;id=' . $context['current_topic'] . '" rel="nofollow" target="_blank">
<img src="', $settings['default_theme_url'], '/images/icons/show_sticky.gif"/> Denunciar</a>
';}
else
{ echo'<div class="globo-yellow">Necesitas estar registrado</div>'; }
echo '<br><br><hr class="borde_linea_001"></td><td colspan="2" align="right" valign="bottom"><table width="230" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="bottom"><span id="punt2"><img src="', $settings['default_theme_url'], '/images/icons/puntos.png" > <b>', $context['puntos'], ' </b></span><br>
<span class="color_gris"><b>PUNTOS</b></span> </td>
<td align="right" valign="bottom"><span id="fav2"><img src="', $settings['default_theme_url'], '/images/icons/fav.png" > <b>', $context['favoritos'], ' </b></span><br>
<span class="color_gris"><b>FAVORITOS</b></span></td>
<td align="right" valign="bottom"><img src="', $settings['default_theme_url'], '/images/icons/visto.png" > <b>', $context['num_views'], ' </b><br>
<span class="color_gris"><b>VISITAS</b></span>
</td></tr></table><hr class="borde_linea_001"> </td></td></tr><tr><td height="35" align="left" valign="middle"><b>TAGS</b>';
global $topic;
if(!$context['user']['is_guest'] && allowedTo('smftags_add'))
echo ' <a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$topic, '"> <img src="', $settings['default_theme_url'], '/images/icons/icono-agregar-etiqueta.gif"></a>';
echo '<br><br>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<span class="bordetags"><a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG'] . '">' . $tag['tag'] . '</a></span> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;tagid=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
echo '</td><td height="35" align="right" valign="middle">';
if ($context['user']['is_logged']) {
echo '<span id="contenedor"><br></span><b>PUNTOS</b><br><table width="0" border="0" cellspacing="0" cellpadding="0" ><tr><td width="20" align="center" valign="middle">
<a class="tooltip" title="Dar 1 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',1); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a><a href="', $scripturl, '?action=enviar-puntos;do=sendmoney2;topic=', $context['current_topic'], ';amount=1"> </a> </td>
<td width="20" align="center" valign="middle">
<a class="tooltip" title="Dar 2 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',2); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"><a class="tooltip" title="Dar 3 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',3); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"><a class="tooltip" title="Dar 4 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',4); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"> <a class="tooltip" title="Dar 5 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',5); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"><a class="tooltip" title="Dar 6 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',6); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"><a class="tooltip" title="Dar 7 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',7); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"> <a class="tooltip" title="Dar 8 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',

<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"> <a class="tooltip" title="Dar 9 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',9); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </td>
<td width="20" align="center" valign="middle"><a class="tooltip" title="Dar 10 punto" style=" cursor: pointer; display: inline;" onclick="llamarPagina('.$context['current_topic'].',10); ver_punt2('.$context['current_topic'].'); return false;" id="contenedor">
<div class="puntos"> </div></a> </center> </td>
</tr>
</table>';
}
else
{ echo'Usuarios no registrados y lecheer no pueden calificar<br>'; }
echo '</td></tr></table><br><table border="0"><tr><td align="left" valign="middle" width="400px" class="mensajepost1"><b>POSTS RELACIONADOS</b><br><br>';
foreach ($context['posts10'] as $posts10){echo'
<div class="categoriasefecceleste">
<a href="', $scripturl, '?topic='.$posts10['id'].'" title="'.$posts10['subject'].'">'.$posts10['subject'].'</a></div>';}
echo '</td><td width="2px" align="right" valign="middle"></td><td align="right" valign="middle">
<center>
<script type="text/javascript"><!--
smowtion_size = "300x250";
smowtion_section = "771084";
//-->
</script>
<script type="text/javascript"
src="http://ads2.smowtion.com/ad.js">
</script>
</center>
</td> </tr></table><br>';
$cantcoment = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}comentarios
WHERE ID_TOPIC = $topic
", __FILE__, __LINE__);
$context['cantcoment'] = mysql_num_rows($cantcoment);
echo '<div class="color_negro2"><img src="', $settings['default_theme_url'], '/images/icons/comment.png" > ', $context['cantcoment'], ' Comentarios</div>';
echo '<div class="borde_linea_abajo"></div>';
//MENSAJES COMENTARIOS
$RegistrosAMostrar=2;
if(isset($_GET['pag'])){
$RegistrosAEmpezar=($_GET['pag']-1)*$RegistrosAMostrar;
$PagAct=$_GET['pag'];
}else{
$RegistrosAEmpezar=0;
$PagAct=1;
}
$id=$_GET['topic'];
$NroRegistros= $context['cantcoment'];
$PagAnt=$PagAct-1;
$PagSig=$PagAct+1;
$PagUlt=$NroRegistros/$RegistrosAMostrar;
$Res=$NroRegistros%$RegistrosAMostrar;
$messages_comentario = db_query("
SELECT g.ID_MEMBER, m.ID_MEMBER, m.avatar, g.ID_MSG, g.body, g.posterName, g.ID_TOPIC, g.posterTime, g.smileysEnabled
FROM {$db_prefix}comentarios as g
LEFT JOIN {$db_prefix}members AS m on ( g.ID_MEMBER = m.ID_MEMBER)
WHERE g.ID_TOPIC = $topic
LIMIT $RegistrosAEmpezar, $RegistrosAMostrar", __FILE__, __LINE__);
$context['mensaje_comentario'] = db_affected_rows();
$context['mensaje_comentario'] = array();
while($row = mysql_fetch_assoc($messages_comentario))
{
$context['mensaje_comentario'][] = $row;
}
mysql_free_result($messages_comentario);
if ($context['mensaje_comentario']) {
foreach ($context['mensaje_comentario'] as $row)
{
echo '<span id="comentario1"></span><table width="100%" border="0" cellspacing="0" cellpadding="0" ><tr><td width="13%" height="30" align="right" valign="middle" ><b><a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . ' </a></b>';
echo '</td><td width="87%" rowspan="2" align="center" valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0" ><tr >
<td height="30" align="left" valign="middle"><img src="', $settings['default_theme_url'], '/images/icons/coemn.png" width="12" height="26"></td>
<td width="50%" class="mensajepost6" height="30" align="left" valign="middle"><span class="COMENTARIOS-3" style="width: 280px;">
<div class="COMENTARIOS-3" style="width: 280px;">
Hace: ', timeformat($row['posterTime']), '</div></span></td><td width="49%" height="30" class="mensajepost7" align="right" valign="middle">';
if($context['user']['is_logged'])
echo '<a class="tooltip" title="Enviar MP a: '.$row['posterName'].' " href="' . $scripturl . '?action=pm;sa=send;u=' . $row['ID_MEMBER'] . '"><img src="', $settings['default_theme_url'], '/images/icons/email.png" align="bottom" width="16" height="16"></a>
<a class="tooltip" href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="Ver su Perfil" > <img src="', $settings['default_theme_url'], '/images/icons/user.png" align="bottom" ></a>
<a class="tooltip" title="Replica" href="', $scripturl, '?action=comentarios;quote=', $row['ID_MSG'], ';topic=', $row['ID_TOPIC'], '.', $row['ID_MEMBER'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" > <img src="', $settings['default_theme_url'], '/images/icons/comment.png" align="bottom" ></a>
';
if ($message['can_modify'])
echo ' <a class="tooltip" title="Modificar Comentario" href="', $scripturl, '?action=comentarios;msg=', $row['ID_MSG'], ';topic=', $row['ID_TOPIC'], '.', $row['ID_MEMBER'], ';sesc=', $context['session_id'], '"><img src="', $settings['default_theme_url'], '/images/icons/comment_edit.png" align="bottom" width="16" height="16"> </a>';
if ($message['can_remove'])
echo ' <a class="tooltip" title="Eliminar Comentario" href="', $scripturl, '?action=deletecomentario;topic=', $row['ID_TOPIC'], '.', $row['ID_MEMBER'], ';msg=', $row['ID_MSG'], ';sesc=', $context['session_id'], '" onClick="return confirm(\'', $txt[154], '?\');"><img src="', $settings['default_theme_url'], '/images/icons/cross.png" align="bottom" width="16" height="16"> </a>';
if ($message['can_remove'])
echo ' <a class="tooltip" title="Bannear usuario" href="', $scripturl, '?action=ban;sa=add;u=', $row['ID_MEMBER'], '"><img src="', $settings['default_theme_url'], '/images/icons/user_delete.png" align="bottom" width="16" height="16"> </a>';
echo '</td></tr><tr><td background="/images/icons/coemn2.png"> </td><td colspan="2" class="mensajepost8" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="left" valign="top">';
echo '', $row['body'] = parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), '';
echo '<span id="comentpost"></span></td>
</tr></table></td></tr></table></td></tr><tr><td align="center" valign="top"> </td></tr></table><br>';
}
//******--------determinar las páginas---------******//
if($PagAct>1) echo "<a style='cursor: pointer; cursor: hand;' href='". $scripturl ."?topic=$topic;pag=$PagAnt'>
<span class='boton' style='float:left; margin-left:112px;'><img src='", $settings['default_theme_url'], "/img/flecha2.png' > Anterior</a></span>";
if($PagAct<$PagUlt) echo "<a style='cursor: pointer; cursor: hand;' href='". $scripturl ."?topic=$topic;pag=$PagSig'>
<span class='boton' style='float:right;'>Siguiente <img src='", $settings['default_theme_url'], "/img/flecha1.png' ></a></span>";
if($PagAct>1 || $PagAct<$PagUlt) echo "<br><br><br>";
}
else { echo '<div class="noesta-am"> <b>No hay comentario.</b> ¿Quieres ser el primero en comentar?</div><br>'; }
if ($context['can_reply'])
{
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td width="15%" height="30" align="right" valign="middle"><b><a href="' . $scripturl . '?action=profile">', $context['user']['name'] , '</a></b> <img src="', $settings['default_theme_url'], '/images/icons/coem2.png"></td>
<td width="0%" rowspan="2" align="left" valign="top" class="mensajepost10">
<form action="', $scripturl, '?action=comentarios2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />';
echo'
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="72%" align="left">';
if ($context['show_bbc'])
{
echo '
<script language="JavaScript" type="text/javascript"><!--
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
// --></script>';
// The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
'bold' => array('code' => 'b', 'before' => '', 'after' => '', 'description' => $txt[253]),
'italicize' => array('code' => 'i', 'before' => '', 'after' => '', 'description' => $txt[254]),
'underline' => array('code' => 'u', 'before' => '', 'after' => '', 'description' => $txt[255]),
array(),
'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]),
'center' => array('code' => 'center', 'before' => '
'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]),
array(),
'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]),
'youtube' => array('code' => 'youtube', 'before' => '[youtube]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
array(),
);
// Here loop through the array, printing the images/rows/separators!
foreach ($context['bbc_tags'][0] as $image => $tag)
{
// Is there a "before" part for this bbc button? If not, it can't be a button!!
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;
// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onClick="replaceText(\'', $tag['before'], '\', document.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// On the other hand, if there is one we are surrounding the selection

else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onMouseOver="bbc_highlight(this, true);" onMouseOut="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" border="0" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
else
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
}
echo ' <select onChange="surroundText(\'[color=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/color]\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt['change_color'], '</option>
<option value="Black">', $txt[262], '</option>
<option value="Red">', $txt[263], '</option>
<option value="Yellow">', $txt[264], '</option>
<option value="Pink">', $txt[265], '</option>
<option value="Green">', $txt[266], '</option>
<option value="Orange">', $txt[267], '</option>
<option value="Purple">', $txt[268], '</option>
<option value="Blue">', $txt[269], '</option>
<option value="Beige">', $txt[270], '</option>
<option value="Brown">', $txt[271], '</option>
<option value="Teal">', $txt[272], '</option>
<option value="Navy">', $txt[273], '</option>
<option value="Maroon">', $txt[274], '</option>
<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo ' <select onChange="surroundText(\'[size=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/size]\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
<option value="" selected="selected">Cambiar Tamaño</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>';
}
echo'</td>
<td width="1%" rowspan="2" align="center" valign="middle"> </td>
<td width="24%" rowspan="2" align="center" valign="middle">';
// Show each row of smileys

foreach ($context['smileys']['postform'] as $smiley_row)
{
foreach ($smiley_row['smileys'] as $smiley)
echo ' <a href="javascript:void(0);" onClick="replaceText(\' ', $smiley['code'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;"><img src="', $settings['smileys_url'], '/', $smiley['filename'], '" align="bottom" alt="', $smiley['description'], '" title="', $smiley['description'], '" /></a>';
echo '<br />
';
}
echo' <br>
<br>
<input class="boton3" type="submit" name="post" value="', $txt[105], '" tabindex="', $context['tabindex']++, '" onClick="return get_hoteditor_data();submitThisOnce(this);" accesskey="s" />
<br>
<label for="check_back">
<input type="checkbox" name="goback" value="1" checked>
Regresar a este post</label>
<span id="last_comments"></span></td>
</tr>
<tr>
<td align="left"><textarea cols="75" rows="7" style="width: 100%; height: 100px;" name="message" tabindex="1"></textarea></td>
</tr>
</table>
';
if ($context['show_spellchecking'])
echo '<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';
echo '</form></td></tr><tr><td align="center" valign="top"> </td></tr></table>';
}
echo '</td> </tr></table></td></tr></table></td></tr><tr><td></td></tr></table>';
}
echo '<br>';
if ($context['show_spellchecking'])
echo '<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/spellcheck.js"></script>';
echo '
<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/xml_topic.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
quickReplyCollapsed = ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ';
smf_topic = ', $context['current_topic'], ';
smf_start = ', $context['start'], ';
smf_show_modify = ', $settings['show_modify'] ? '1' : '0', ';
// On quick modify, this is what the body will look like.
var smf_template_body_edit = \'<div id="error_box" style="padding: 4px; color: red;"></div><textarea class="editor" name="message" rows="12" style="width: 94%; margin-bottom: 10px;">%body%</textarea><br /><input type="hidden" name="sc" value="', $context['session_id'], '" /><input type="hidden" name="topic" value="', $context['current_topic'], '" /><input type="hidden" name="msg" value="%msg_id%" /><div style="text-align: center;"><input type="submit" name="post" value="', $txt[10], '" onclick="return modify_save(\\\'' . $context['session_id'] . '\\\');" accesskey="s" /> ', $context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');" /> ' : '', '<input type="submit" name="cancel" value="', $txt['modify_cancel'], '" onclick="return modify_cancel();" /></div>\';
// And this is the replacement for the subject.
var smf_template_subject_edit = \'<input type="text" name="subject" value="%subject%" size="60" style="width: 99%;" maxlength="80" />\';
// Restore the message to this after editing.
var smf_template_body_normal = \'%body%\';
var smf_template_subject_normal = \'<a href="', $scripturl, '?topic=', $context['current_topic'], '.msg%msg_id%#msg%msg_id%">%subject%</a>\';
var smf_template_top_subject = "', $txt[118], ': %subject% (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')"
if (window.XMLHttpRequest)
showModifyButtons();
// ]]></script>
<table border="0" width="100%" cellpadding="0" cellspacing="0" style="margin-bottom: 1ex;"><tr>';
if ($settings['linktree_inline'])
echo '<td valign="top">', theme_linktree(), '</td> ';
echo '<td valign="top" align="', !$context['right_to_left'] ? 'right' : 'left', '" class="nav"> </td>
</tr></table><br>';
$mod_buttons = array(
'move' => array('test' => 'can_move', 'text' => 132, 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 63, 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt[162] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']), );
if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
$mod_buttons[] = array('text' => 'quickmod_delete_selected', 'image' => 'delete_selected.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit"', 'url' => 'javascript:document.quickModForm.submit();');
if($context['thank_you_post_unlock_all'])
$mod_buttons[] = array('text' => 'thank_you_post_unlock_all', 'image' => 'thankyoulock2.gif', 'lang' => true, 'url' => $scripturl . '?action=thankyoupostunlockall;topic=' .$context['current_topic'] . '.0');
echo '<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 1ex;">
<tr>', template_button_strip($mod_buttons, 'bottom') , '</tr></table>';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
echo '<input class="boton" class="boton"type="hidden" name="sc" value="', $context['session_id'], '" />';
if (empty($settings['use_tabs']))
echo '<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
document.getElementById("quickmodSubmit").style.display = "none";
// ]]></script>';
echo '</form>';
}
else {
while ($message = $context['get_message']())
{
echo '<center>
<table width="340px" cellpadding="3" cellspacing="0" border="0">
<td width="100%" align="left" valign="middle" class="mensajepost11" >Post Denunciado:</td>
</tr></table>
<table style="margin-top: 1px;" border="0" cellspacing="1" cellpadding="3" width="340px" class="mensajepost12">
<tr><td align="center">
Post cerrado por acumulación de denuncias. <br><b>"', $message['subject'], '"</b><br><br>
<input class="boton3" style="font-size: 11px;" type="submit" title="Ir a la Página principal" value="Ir a la Página principal" onclick="location.href=\'/\'" />
<br></td></tr></table></center>';
}}
if ($context['show_spellchecking']){
echo '<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>';
echo'</div></div>';
}}
?>




