Hello friends.
Feliz Navidad.
Merry Christmas.
Me gustaría adaptar este Mod a Icy 1.3.0.53, pero no doy con la solución.
I would like to adapt this mod to Icy 1.3.0.53, but I did not the solution.
El autor de este Mod es Esnola, y esta su pagina Web www.todo-mods.com.
The author of this Mod is Esnola, and that its website www.todo-mods.com.
Aquí el enlace del tema. http://www.todo-mods.com/gracias-mod-vt1917.html
Here the link of the item. http://www.todo-mods.com/gracias-mod-vt1917.html
Lo instale y me dio este error.
I installed it and gave me this error.
Not Found
The requested URL /portal/viewtopic. was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.25 PHP/5.2.11 Server at acuaristasdevenezuela.com.ve Port 80
The requested URL /portal/viewtopic. was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.25 PHP/5.2.11 Server at acuaristasdevenezuela.com.ve Port 80
Busque en el archivo de instalación, y cambie "viewtopic." por "viewtopic.php", el error desapareció.
Check the installation file, and change "viewtopic." for "viewtopic.php", the error disappeared.
Pero apareció este otro error.
But it appeared that other error.
Fatal error: Call to undefined function create_date_news() in /home/acuarist/public_html/portal/viewtopic.php on line 1955
Aquí si no se como solucionar el problema, me parece entender que esta función create_date_news() no esta definida en la base de datos.
Here if you do not solve the problem as I seem to understand that this function create_date_news () not defined in the database.
Lo cierto, es que me gustaría adaptar esta función al Icy 1.3.0.53, espero que alguien me pueda ayudar.
The truth is that I would adapt this function to the Icy 1.3.0.53, hope someone can help me.
Aquí les dejo el código o archivo de instalación.
Here I leave the code or installation file.
Aquí una imagen de como se ve el botón gracias.
Here an image as seen through the button.
Quiero aclarar, que ademas de las gracias por Topic que viene en el Icy Phoenix, con esta modificación se podrá dar las gracias por post. Conservando el botón original de gracias.
I want to clarify that in addition to thank you for coming in Topic Icy Phoenix, this amendment may give thanks for post. Retaining the original button thanks.
Gracias por la ayuda que me puedan prestar.
Thanks for any help you can provide.
PD.Excuse my English.
########################################################
## Author: esnola (webmaster@todo-mods.com)
## Author Web: http://www.todo-mods.com
##
## Descripción en español:
Añade un botón para dar gracias al posteador del post al estilo de VBulletin.
Y muestra los resultados en cada post que haya sido agradecido.
##
##
## Installation Level: Easy (Fácil)
## Installation Time: 2 Minutes
## Ficheros a Editar:(2) viewtopic.php,
## templates/mg_themes/viewtopic_body.tpl
## * Deberás editar este archivo en todos los estilos o plantillas que tengas.
#########################################################
## Antes realizar cualquier modificación en los ficheros de tu foro realiza una copia de seguridad de los mismos.
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#########################################################
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE IF NOT EXISTS `ip_thanks_2` (
`topic_id` mediumint(8) NOT NULL,
`user_id` mediumint(8) NOT NULL,
`user_poster` mediumint(8) NOT NULL,
`post_id` mediumint(8) NOT NULL,
`thanks_time` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#
#-----[ ABRIR / OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
// End add - Birthday MOD
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
$activar_gracias = 1; // Poner en 1 para activar, Poner en 0 para desactivar.
if ($activar_gracias == 1)
{
$nom_gracias = "";
$boton_gra = ($userdata['user_id'] != ANONYMOUS) ? TRUE : FALSE;
$forma_tiem = "d F";
$sql = mysql_query("SELECT thanks_time
FROM ip_thanks_2
WHERE user_id =". $userdata['user_id']."
AND post_id =".$post_id) ;
$ya_votado = mysql_num_rows($sql);
if($ya_votado) $boton_gra = false ;
if($_REQUEST['mode'] == "thanks_2" && !$ya_votado)
{
$sql = mysql_query("SELECT thanks_time
FROM ip_thanks_2
WHERE user_id =". $userdata['user_id']."
AND post_id =".$_REQUEST['p']) ;
$ya_votado2 = mysql_num_rows($sql);
if(!$ya_votado2 && $userdata['user_id'] != $postrow[$i]['poster_id'] && $userdata['user_id'] != ANONYMOUS)
{
$sql = "INSERT INTO ip_thanks_2 (post_id, topic_id, user_poster, user_id, thanks_time)
VALUES(".$_REQUEST['p'].", ".$_REQUEST['t'].",".$_REQUEST['poster'].",".$userdata['user_id'].", ".time().")";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "No se actualiza la tabla thanks2", '', __LINE__, __FILE__, $sql);
}
}
}
$sql = "SELECT user_id, thanks_time
FROM ip_thanks_2
WHERE post_id =". $postrow[$i]['post_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "No se puede obtener datos de gracias", '', __LINE__, __FILE__, $sql);
}
$j=0;
$num_agrad = "";
$cuantos = $db->sql_numrows($result);
while($gracias = $db->sql_fetchrow($result))
{
$j++;
$agradecido = colorize_username($gracias['user_id']);
$nom_gracias .= '<span class="gensmall">' .$agradecido."(".create_date_news($forma_tiem, $gracias['thanks_time'], $board_config['board_timezone']).")</span>";
$nom_gracias .= ($cuantos > 1 && $cuantos > $j) ? ", " : "";
}
$sql = "SELECT user_poster
FROM ip_thanks_2
WHERE user_poster =". $postrow[$i]['poster_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "No se puede obtener datos de gracias", '', __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result))
{
$num_agrad = "<br />Agradecimientos recibidos: ".$db->sql_numrows($result);
}
$lectura_gracias = ($userdata['user_id'] != $postrow[$i]['poster_id'])? "Agradecimientos a " . colorize_username($postrow[$i]['poster_id']) : "Has recibido agradecimientos";
$lectura_gracias .= " por este post de:";
}
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
$template->assign_block_vars('postrow', array(
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
'U_THANKS_2' => append_sid('viewtopic.'. $phpEx .'?mode=thanks_2&f='.$forum_id .'&t='.$topic_id .'&poster='.$postrow[$i]['poster_id'].'&p='.$post_id.'#p'.$post_id),
'THANKS_IMG_2' => ($boton_gra) ? $images['thanks'] : "",
'THANKS_POSTER' => $lectura_gracias,
'LISTA_GRACIAS' => $nom_gracias,
'NO_BOTON' => ($boton_gra && $userdata['user_id'] != $postrow[$i]['poster_id'] ) ? true : false,
'VECES_AGRAD' => $num_agrad,
#
#-----[ ABRIR / OPEN ]------------------------------------------
#
templates/mg_themes/viewtopic_body.tpl
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
<!-- END switch_poster_info -->
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
{postrow.VECES_AGRAD}
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
{postrow.ALBUM_IMG}
</div>
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
<!-- IF postrow.NO_BOTON --><a href="{postrow.U_THANKS_2}"><img src="{postrow.THANKS_IMG_2}" alt="Agradecer contribución" title="Agradecer contribución" width="62" /></a><!-- ENDIF -->
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
<a href="{U_BACK_BOTTOM}"><img src="{IMG_ARD}" alt="{L_BACK_BOTTOM}" title="{L_BACK_BOTTOM}" /></a>
</div>
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
<!-- IF postrow.LISTA_GRACIAS -->
<tr><th colspan="3" align="left">{postrow.THANKS_POSTER}</th></tr>
<tr><td colspan="3" class="row-post" valign="top" align="left"><span class="gensmall">{postrow.thanks.THANKS} </span>
{postrow.LISTA_GRACIAS}
</td></tr>
<tr><td>
</td></tr>
<!-- ENDIF -->
## Author: esnola (webmaster@todo-mods.com)
## Author Web: http://www.todo-mods.com
##
## Descripción en español:
Añade un botón para dar gracias al posteador del post al estilo de VBulletin.
Y muestra los resultados en cada post que haya sido agradecido.
##
##
## Installation Level: Easy (Fácil)
## Installation Time: 2 Minutes
## Ficheros a Editar:(2) viewtopic.php,
## templates/mg_themes/viewtopic_body.tpl
## * Deberás editar este archivo en todos los estilos o plantillas que tengas.
#########################################################
## Antes realizar cualquier modificación en los ficheros de tu foro realiza una copia de seguridad de los mismos.
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#########################################################
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE IF NOT EXISTS `ip_thanks_2` (
`topic_id` mediumint(8) NOT NULL,
`user_id` mediumint(8) NOT NULL,
`user_poster` mediumint(8) NOT NULL,
`post_id` mediumint(8) NOT NULL,
`thanks_time` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#
#-----[ ABRIR / OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
// End add - Birthday MOD
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
$activar_gracias = 1; // Poner en 1 para activar, Poner en 0 para desactivar.
if ($activar_gracias == 1)
{
$nom_gracias = "";
$boton_gra = ($userdata['user_id'] != ANONYMOUS) ? TRUE : FALSE;
$forma_tiem = "d F";
$sql = mysql_query("SELECT thanks_time
FROM ip_thanks_2
WHERE user_id =". $userdata['user_id']."
AND post_id =".$post_id) ;
$ya_votado = mysql_num_rows($sql);
if($ya_votado) $boton_gra = false ;
if($_REQUEST['mode'] == "thanks_2" && !$ya_votado)
{
$sql = mysql_query("SELECT thanks_time
FROM ip_thanks_2
WHERE user_id =". $userdata['user_id']."
AND post_id =".$_REQUEST['p']) ;
$ya_votado2 = mysql_num_rows($sql);
if(!$ya_votado2 && $userdata['user_id'] != $postrow[$i]['poster_id'] && $userdata['user_id'] != ANONYMOUS)
{
$sql = "INSERT INTO ip_thanks_2 (post_id, topic_id, user_poster, user_id, thanks_time)
VALUES(".$_REQUEST['p'].", ".$_REQUEST['t'].",".$_REQUEST['poster'].",".$userdata['user_id'].", ".time().")";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "No se actualiza la tabla thanks2", '', __LINE__, __FILE__, $sql);
}
}
}
$sql = "SELECT user_id, thanks_time
FROM ip_thanks_2
WHERE post_id =". $postrow[$i]['post_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "No se puede obtener datos de gracias", '', __LINE__, __FILE__, $sql);
}
$j=0;
$num_agrad = "";
$cuantos = $db->sql_numrows($result);
while($gracias = $db->sql_fetchrow($result))
{
$j++;
$agradecido = colorize_username($gracias['user_id']);
$nom_gracias .= '<span class="gensmall">' .$agradecido."(".create_date_news($forma_tiem, $gracias['thanks_time'], $board_config['board_timezone']).")</span>";
$nom_gracias .= ($cuantos > 1 && $cuantos > $j) ? ", " : "";
}
$sql = "SELECT user_poster
FROM ip_thanks_2
WHERE user_poster =". $postrow[$i]['poster_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "No se puede obtener datos de gracias", '', __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result))
{
$num_agrad = "<br />Agradecimientos recibidos: ".$db->sql_numrows($result);
}
$lectura_gracias = ($userdata['user_id'] != $postrow[$i]['poster_id'])? "Agradecimientos a " . colorize_username($postrow[$i]['poster_id']) : "Has recibido agradecimientos";
$lectura_gracias .= " por este post de:";
}
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
$template->assign_block_vars('postrow', array(
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
'U_THANKS_2' => append_sid('viewtopic.'. $phpEx .'?mode=thanks_2&f='.$forum_id .'&t='.$topic_id .'&poster='.$postrow[$i]['poster_id'].'&p='.$post_id.'#p'.$post_id),
'THANKS_IMG_2' => ($boton_gra) ? $images['thanks'] : "",
'THANKS_POSTER' => $lectura_gracias,
'LISTA_GRACIAS' => $nom_gracias,
'NO_BOTON' => ($boton_gra && $userdata['user_id'] != $postrow[$i]['poster_id'] ) ? true : false,
'VECES_AGRAD' => $num_agrad,
#
#-----[ ABRIR / OPEN ]------------------------------------------
#
templates/mg_themes/viewtopic_body.tpl
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
<!-- END switch_poster_info -->
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
{postrow.VECES_AGRAD}
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
{postrow.ALBUM_IMG}
</div>
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
<!-- IF postrow.NO_BOTON --><a href="{postrow.U_THANKS_2}"><img src="{postrow.THANKS_IMG_2}" alt="Agradecer contribución" title="Agradecer contribución" width="62" /></a><!-- ENDIF -->
#
#-----[ BUSCAR / FIND ]------------------------------------------
#
<a href="{U_BACK_BOTTOM}"><img src="{IMG_ARD}" alt="{L_BACK_BOTTOM}" title="{L_BACK_BOTTOM}" /></a>
</div>
#
#-----[ AÑADIR DESPUES / AFTER ADD ]------------------------------------------
#
<!-- IF postrow.LISTA_GRACIAS -->
<tr><th colspan="3" align="left">{postrow.THANKS_POSTER}</th></tr>
<tr><td colspan="3" class="row-post" valign="top" align="left"><span class="gensmall">{postrow.thanks.THANKS} </span>
{postrow.LISTA_GRACIAS}
</td></tr>
<tr><td>
</td></tr>
<!-- ENDIF -->