Página 1 de 2

Problema Con Mod "rate_topics_v204"

Publicado: 08 Feb 2006, 10:46
por odin921
Bueno, pues le he instalado y revisado, cuando voy a entrar al acp y pincho en la opcion del mod me sale esto:

Error General
Error getting forum data.

DEBUG MODE

SQL Error : 1146 Table 'alicon_vendetta.RATINGS_TABLE' doesn't exist

SELECT topic_id FROM RATINGS_TABLE

Line : 173
File : admin_rate.php
[/quoteicy]


el admin_rate.php es:

Código: Seleccionar todo

<?php
		/***************************************************************************
								admin_rate.php
		                             -------------------
		    begin                : Sat Feb 25, 2002
		    copyright            : (C) 2002 Nivisec.com
		    email                : nivisec@hotmail.com
		
		    		$Id: admin_rate.php,v 1.3 2003/05/16 03:13:30 nivisec Exp $
		
		 ***************************************************************************/
		
		/***************************************************************************
		 *                                         				                                
		 *   This program is free software; you can redistribute it and/or modify  	
		 *   it under the terms of the GNU General Public License as published by  
		 *   the Free Software Foundation; either version 2 of the License, or	    	
		 *   (at your option) any later version.
		 *
		 ***************************************************************************/

define('IN_PHPBB', true);
if($setmodules==1)
{
	$filename = basename(__FILE__);
	$module['Topic Rating']['Configuration'] = $filename . "?mode=config";
	$module['Topic Rating']['Authorization_Settings'] = $filename . "?mode=auth";
	return;
}

$phpbb_root_path = "../";
require($phpbb_root_path . 'extension.inc');
require((file_exists('pagestart.inc')) ? 'pagestart.inc' : 'pagestart.' . $phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_rate.' . $phpEx);
require($phpbb_root_path . 'includes/functions_rate.php');

if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
	$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
	$mode = "";
}

if( isset($HTTP_POST_VARS['admin_message']) || isset($HTTP_GET_VARS['admin_message']) )
{
	$admin_message = ( isset($HTTP_POST_VARS['admin_message']) ) ? $HTTP_POST_VARS['admin_message'] : $HTTP_GET_VARS['admin_message'];
}
else
{
	$admin_message = "";
}

//
//Begin Config Mode
//
if ($mode == 'config')
{
	$configs_name = array(
	allow_ext_rating,
	rating_max,
	allow_rerate,
	check_anon_ip_when_rating,
	min_rates_number,
	index_rating_return,
	large_rating_return_limit,
	header_rating_return_limit);

	$configs_desc = array(
	$lang['Allow_Detailed_Ratings_Page'],
	$lang['Max_Rating'],
	$lang['Allow_Users_To_ReRate'],
	$lang['Check_Anon_IP'],
	$lang['Min_Rates'],
	$lang['Main_Page_Number'],
	$lang['Big_Page_Number'],
	$lang['Header_Page_Number']);

	//
	//Update config values if needed
	//
	for($i = 0; $i < count($configs_name); $i++)
	{
		if( isset($HTTP_POST_VARS[$configs_name[$i]]) || isset($HTTP_GET_VARS[$configs_name[$i]]) )
		{
			$var_value = ( isset($HTTP_POST_VARS[$configs_name[$i]]) ) ? $HTTP_POST_VARS[$configs_name[$i]] : $HTTP_GET_VARS[$configs_name[$i]];
			if ($var_value != $board_config[$configs_name[$i]])
			{
				$sql = "UPDATE " . CONFIG_TABLE . "
				SET config_value =" . $var_value . "
				WHERE config_name ='" . $configs_name[$i] . "'";
				if ( !$result = $db->sql_query($sql) )
				{
					message_die(GENERAL_ERROR, "Error updating rating config data.", "", __LINE__, __FILE__, $sql);
				}
				$admin_message .= "<br />" . $lang['Update'] . ":&nbsp;&nbsp;&nbsp;" . $configs_desc[$i];
				$board_config[$configs_name[$i]] = $var_value;
			}
		}
	}

	//$allow_disable_yes = ( $board_config['allow_disable'] != '0' ) ? 'checked="checked"' : '';
	//$allow_disable_no  = ( $board_config['allow_disable'] == '0' ) ? 'checked="checked"' : '';
	//$allow_disable = '<input type="radio" name="allow_disable" value="1" '. $allow_disable_yes . ' /> ' . $lang['Yes'] . '&nbsp;&nbsp;<input type="radio" name="allow_disable" value="0" '. $allow_disable_no . ' /> ' . $lang['No'];
	$allow_ext_rating_yes = ( $board_config['allow_ext_rating'] != '0' ) ? 'checked="checked"' : '';
	$allow_ext_rating_no  = ( $board_config['allow_ext_rating'] == '0' ) ? 'checked="checked"' : '';
	$allow_ext_rating = '<input type="radio" name="allow_ext_rating" value="1" '. $allow_ext_rating_yes . ' /> ' . $lang['Yes'] . '&nbsp;&nbsp;<input type="radio" name="allow_ext_rating" value="0" '. $allow_ext_rating_no . ' /> ' . $lang['No'];
	$allow_rerate_yes = ( $board_config['allow_rerate'] != '0' ) ? 'checked="checked"' : '';
	$allow_rerate_no  = ( $board_config['allow_rerate'] == '0' ) ? 'checked="checked"' : '';
	$allow_rerate = '<input type="radio" name="allow_rerate" value="1" '. $allow_rerate_yes . ' /> ' . $lang['Yes'] . '&nbsp;&nbsp;<input type="radio" name="allow_rerate" value="0" '. $allow_rerate_no . ' /> ' . $lang['No'];
	$max_rating = '<input type="text" size="3" maxlength="3" name="rating_max" value="'. $board_config['rating_max'] . '" />';
	$hidden_submits = '<input type="hidden" name="mode" value="config" />';
	$check_anon_ip_yes = ( $board_config['check_anon_ip_when_rating'] != '0' ) ? 'checked="checked"' : '';
	$check_anon_ip_no  = ( $board_config['check_anon_ip_when_rating'] == '0' ) ? 'checked="checked"' : '';
	$check_anon_ip = '<input type="radio" name="check_anon_ip_when_rating" value="1" '. $check_anon_ip_yes . ' /> ' . $lang['Yes'] . '&nbsp;&nbsp;<input type="radio" name="check_anon_ip_when_rating" value="0" '. $check_anon_ip_no . ' /> ' . $lang['No'];
	$main_page_number = '<input type="text" size="5" maxlength="10" name="index_rating_return" value="'. $board_config['index_rating_return'] . '" />';
	$header_page_number = '<input type="text" size="5" maxlength="10" name="header_rating_return_limit" value="'. $board_config['header_rating_return_limit'] . '" />';
	$big_page_number = '<input type="text" size="5" maxlength="10" name="large_rating_return_limit" value="'. $board_config['large_rating_return_limit'] . '" />';
	$min_rates_number = '<input type="text" size="5" maxlength="10" name="min_rates_number" value="'. $board_config['min_rates_number'] . '" />';

	$configs_sumbits = array(
	$allow_ext_rating,
	$max_rating,
	$allow_rerate,
	$check_anon_ip,
	$min_rates_number,
	$main_page_number,
	$big_page_number,
	$header_page_number);

	//Set Configs for template
	for($i = 0; $i < count($configs_sumbits); $i++)
	{
		$template->assign_block_vars("config_row", array(
		"S_CONFIG" => $configs_sumbits[$i],
		"L_CONFIG" => $configs_desc[$i])
		);
	}

	$template->set_filenames(array(
	"body" => "admin/rate_config_body.tpl")
	);
}
//
//End Config Mode
//

//
//Begin Auth Mode
//
else if ($mode == 'auth')
{
	$forum_auth_levels = array("NONE", "ALL", "REG", "PRIVATE", "MOD", "ADMIN");
	$forum_auth_const = array(-1, AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
	$forum_auth_desc = array($lang['NONE'], $lang['ALL'], $lang['REG'], $lang['PRIVATE'], $lang['MOD'], $lang['ADMIN']);

	$page_title = $lang['Forum'] . ' ' . $lang['Authorization'];

	$sql = "SELECT forum_id, forum_name, auth_rate
	FROM " . FORUMS_TABLE;
	if ( !$result = $db->sql_query($sql) )
	{
		message_die(GENERAL_ERROR, "Error getting forum data.", "", __LINE__, __FILE__, $sql);
	}
	$forum_row = $db->sql_fetchrowset($result);

	//Get a list of forums (can't use function here, need ALL for admin)
	$sql = "SELECT topic_id
	FROM " . RATINGS_TABLE;
	if ( !$result = $db->sql_query($sql) )
	{
		message_die(GENERAL_ERROR, "Error getting forum data.", "", __LINE__, __FILE__, $sql);
	}	
	$topics_row = $db->sql_fetchrowset($result);

	$hidden_submits = '<input type="hidden" name="mode" value="auth" />';

	//Purge if option selected
	if( isset($HTTP_POST_VARS['forum_purge']) || isset($HTTP_GET_VARS['forum_purge']) )
	{
		//Compare each topic to see if it exists in DB
		for($i = 0; $i < count($topics_row); $i++)
		{
			$sql = "SELECT *
			FROM " . TOPICS_TABLE . "
			WHERE topic_id = " . $topics_row[$i]['topic_id'];
			if ( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Error getting topic data.", "", __LINE__, __FILE__, $sql);
			}
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			//If a blank title was returned, we know the topic doesn't exist anymore
			if ( !isset($row['topic_title']) )
			{
				$sql = "DELETE
				FROM " . RATINGS_TABLE . "
				WHERE topic_id = " . $topics_row[$i]['topic_id'];
				if ( !$result = $db->sql_query($sql) ) {
					message_die(GENERAL_ERROR, "Error deleting rating data.", "", __LINE__, __FILE__, $sql);
				}
				$admin_message .= "<br />" . $lang['Purged'] . ":&nbsp;&nbsp;&nbsp;" . $lang['Topic'] . "&nbsp;#&nbsp;&nbsp;" . $topics_row[$i]['topic_id'];
			}
		}
		$admin_message .= "<br />" . $lang['Purge'] . ":&nbsp;&nbsp;&nbsp;" . $lang['Complete'];
	}

	//Clear all the data if option selected
	if( isset($HTTP_POST_VARS['ratings_clear']) || isset($HTTP_GET_VARS['ratings_clear']) )
	{
		if( isset($HTTP_POST_VARS['ratings_clear_confirm']) || isset($HTTP_GET_VARS['ratings_clear_confirm']) )
		{
			$clear_confirm = ( isset($HTTP_POST_VARS['ratings_clear_confirm']) ) ? $HTTP_POST_VARS['ratings_clear_confirm'] : $HTTP_GET_VARS['ratings_clear_confirm'];
			if ( strtoupper($clear_confirm) == 'YES' )
			{
				$sql = "DELETE
				FROM " . RATINGS_TABLE;
				if ( !$result = $db->sql_query($sql) )
				{
					message_die(GENERAL_ERROR, "Error deleting rating data.", "", __LINE__, __FILE__, $sql);
				}
				$admin_message .= "<br />" . $lang['Clear'] . ":&nbsp;&nbsp;&nbsp;" . $lang['Complete'];
			}
		}
	}

	for ($x = 0; $x < count($forum_row); $x++) {
		$current_auth = $forum_row[$x]['auth_rate'];

		if( isset($HTTP_POST_VARS['forum_update_id_'. $forum_row[$x]['forum_id']]) || isset($HTTP_GET_VARS['forum_update_id_'. $forum_row[$x]['forum_id']]) )
		{
			$id_value = ( isset($HTTP_POST_VARS['forum_update_id_'. $forum_row[$x]['forum_id']]) ) ? $HTTP_POST_VARS['forum_update_id_'. $forum_row[$x]['forum_id']] : $HTTP_GET_VARS['forum_update_id_'. $forum_row[$x]['forum_id']];
			$name_value = ( isset($HTTP_POST_VARS['forum_update_name_'. $forum_row[$x]['forum_id']]) ) ? $HTTP_POST_VARS['forum_update_name_'. $forum_row[$x]['forum_id']] : $HTTP_GET_VARS['forum_update_name_'. $forum_row[$x]['forum_id']];
			$update_value = ( isset($HTTP_POST_VARS['forum_update_value_'. $forum_row[$x]['forum_id']]) ) ? $HTTP_POST_VARS['forum_update_value_'. $forum_row[$x]['forum_id']] : $HTTP_GET_VARS['forum_update_value_'. $forum_row[$x]['forum_id']];
			if ($update_value != $current_auth)
			{
				$sql = "UPDATE " . FORUMS_TABLE . "
				SET auth_rate = " . $update_value . "
				WHERE forum_id = " . $id_value;
				if ( !$result = $db->sql_query($sql) )
				{
					message_die(GENERAL_ERROR, "Error updating rating auth data.", "", __LINE__, __FILE__, $sql);
				}
				$admin_message .= "<br />" . $lang['Update'] . ":&nbsp;&nbsp;&nbsp;" . $lang['Forum'] . "&nbsp;" . $name_value;
				$current_auth = $update_value;
			}
		}

		$hidden_submits .= '<input type="hidden" name="forum_update_id_'. $forum_row[$x]['forum_id'] . '" value="' . $forum_row[$x]['forum_id'] . '" /><input type="hidden" name="forum_update_name_'. $forum_row[$x]['forum_id'] . '" value="' . strip_tags($forum_row[$x]['forum_name']) . '" />';

		$select_auth_mode = '<select name="forum_update_value_' . $forum_row[$x]['forum_id'] . '">';
		for($i = 0; $i < count($forum_auth_levels); $i++)
		{
			$selected = ($current_auth == $forum_auth_const[$i]) ? " selected=\"selected\"" : "";
			$select_auth_mode .= "<option value=\"" . $forum_auth_const[$i] . "\"$selected>" . $forum_auth_levels[$i] . "</option>";
		}
		$select_auth_mode .= "</select>";

		$template->assign_block_vars("forums_row", array(
		"FORUM_NAME" => $forum_row[$x]['forum_name'],
		"S_FORUM_AUTH" => $select_auth_mode)
		);
	}

	$template->set_filenames(array(
	"body" => "admin/rate_auth_body.tpl")
	);

	//Set Description Part
	for($i = 0; $i < count($forum_auth_levels); $i++)
	{
		$template->assign_block_vars("descrow", array(
		"L_AUTH_TYPE" => $forum_auth_levels[$i],
		"L_AUTH_DESC" => $forum_auth_desc[$i])
		);
	}

	//Set Options Part
	$options_types = array($lang['Purge'], $lang['Clear']);
	$options_sumbits = array('<input type="checkbox" name="forum_purge">', '<input type="checkbox" name="ratings_clear">&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="ratings_clear_confirm" value="NO">');
	$options_desc = array($lang['Purge_Desc'], $lang['Clear_Desc']);

	for($i = 0; $i < count($options_types); $i++)
	$template->assign_block_vars("optionrow", array(
	"L_OPT_TYPE" => $options_types[$i],
	"S_OPT_PART" => $options_sumbits[$i],
	"L_OPT_DESC" => $options_desc[$i])
	);
}
//
//End Auth Mode
//
else
{
	print "No mode specified";
}

//Assign page wide vars
$template->assign_vars(array(
"ADMIN_MESSAGE" => $admin_message . "<br />" . create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
"CLASS_1" => $theme['td_class1'],
"CLASS_2" => $theme['td_class2'],

"S_MODE_ACTION" => append_sid("$filename"),
"S_HIDDEN_FIELDS" => $hidden_submits,
"S_MASS_UPDATE" => $mass_auth_mode,

"L_SUBMIT" => $lang['Update'],
"L_RESET" => $lang['Reset'],
"L_MASS_UPDATE" => $lang['Purge'],
"L_STATUS" => $lang['Status'],

"L_AUTH_DESCRIPTION" => $lang['Auth_Description'],
"L_PERMISSIONS" => $lang['Permissions'],
"L_FORUM" => $lang['Forum'],
"L_OPTIONS" => $lang['Options'],
"L_PAGE_NAME" => $page_title)
);

$template->pparse("body");
include('page_footer_admin.'.$phpEx);

?>


gracias



PD: parece un error de SQL, no??? pero no se porque da, ya que no habia que meter codigo en sql ni tablas, solo ejecutar el install.php, que le he ejecutado, y me a dado todo 'OK'

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 08 Feb 2006, 17:42
por mitch
supongo ejecutaste install/nivisec_install.php no ??

tambien habras subido todos los archivos modificados (constants.php - page_header.php - functions.php etc etc).

que prefijo usas en tus tablas?

procura haber ejecutado ese nivisec_install (subido en la carpeta install)
y asegurarte de haber subido contants.php (los problemas de tablas que he tenido fueron por no subir ese archivo).

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 08 Feb 2006, 18:24
por Nazcar
El problema lo tienes en el include/constants.php no esta definida RAT​INGS_TABLE repasate la instalacion en ese punto






Un saludo

Re: Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 17:20
por odin921
supongo ejecutaste install/nivisec_install.php no ?? Si

tambien habras subido todos los archivos modificados (constants.php - page_header.php - functions.php etc etc). Si

que prefijo usas en tus tablas? No entiendo la pregunta... :oops:

procura haber ejecutado ese nivisec_install (subido en la carpeta install) Si, le he ejecutado...
y asegurarte de haber subido contants.php (los problemas de tablas que he tenido fueron por no subir ese archivo). Mmm..ese archivo creo que estaba en la carpeta install y me decia de borrar la carpeta completa...al acabar la instalacií?³nEl problema lo tienes en el include/constants.php no esta definida RAT​INGS_TABLE repasate la instalacion en ese punto

lo que he dicho antes el archivo constants.php creo que estaba en la carpeta de install que me obligaba a borrarla nada mas ejecutar install.php...




Un saludo

Gracias :wink:

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 17:28
por Nazcar
Va ha ser que no constants.php tiene que estar dentro de include es donde estan todas las definiciones de las constantes usadas en phpbb y el problema que tienes es que esa definicion no la tiene por eso no sabe que tabla buscar.repito mirate ese fichero en concreto.

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 17:30
por odin921
lo unico que hago entonces es sacar el archivo constants.í?­PHP de la carpeta install.php y meterle en /include, no??


gracias

Re: Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 17:38
por Nazcar
lo unico que hago entonces es sacar el archivo constants.í?­PHP de la carpeta install.php y meterle en /include, no??


gracias Ni se te ocurra phpbb ya tienen un constants.php dentro de includes,si haces eso estaras sobrescribiendo el fichero y si tienes mas mods dejaran de funcionar,en la instalacion de ese mod fijo que pone que edites ese fichero y aí?±adas almenos una linea.Dime de donde bajaste ese mod.

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 17:53
por odin921
Nazcar, el archivo le baje de aqui:

http://www.nivisec.com/downloads/phpbb/ ... s_v204.zip

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 17:58
por Nazcar
Bueno odin921 una vez abierto el zip y mirado el install.txt que contenia aparece en las primeras lineas

Código: Seleccionar todo

# 
#-----[ OPEN ]------------------------------------------ 
# 
constants.php

# 
#-----[ FIND ]------------------------------------------ 
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
#
define('RATINGS_TABLE', $table_prefix.'rate_results');
sin comentarios

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 18:03
por odin921
gracias por la ayuda, y siento haber molestado....reconozco que se me habia pasado esa linea, perdí?³n.

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 18:05
por Nazcar
Na si eso pasa en las mejores casas.Lo Unico que otra vez si dos personas te estan diciendo lo mismo hazles caso no te pongas cabezon.





Un saludo

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 18:32
por odin921
ya si soy cabezon, si, es verdad, jejeje, pero esque no entendí?­a bien el problema ya que creí?­a que ese archivo le tocaba la instalacion automí?¡tica del mod al ejecutar el install.php...vamos que me habia montado yo solo un lio muy grande por una cosa asi de chorra, y me lo deciais pero no lo pillaba, por eso no podia seguir las instrucciones que me dabais...pero bueno, ya va perfecto. muchas gracias

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 18:47
por odin921
perdonad por seguir con este problema....pero esque voy a votar un tema, hasta ahi bien, emito el voto y no pasa nada....en teorí?­a es el mod que teneis en este foro, pero yo la verdad no he subido ninguna imagen con estrellitas cí?³mo aqui ni nada por el estilo....vamos que no se donde aparecen los votos :s

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 09 Feb 2006, 19:28
por ThE KuKa
Odin, abre desde tu navegador...
http://www.tusitio/tuforo/rate.php

Hay estan las valoraciones...
En las instrucciones (hay que leer todos los TXT) poe:
[quote]make mini icon for header[/quoteicy]
Que seria mas o menos...
"Crear un mini icono para el encabezado" eso quiere decir que debes crear ese icono, e insertarlo en el encabezado del foro
/tuforo/templates/tuplantilla/overall_header.tpl

Para editar encabezados y pies de pagina, hay una guia en el foro de guias.

S@lu2

PD En este MOD no hay imagenes, el MOD de este foro es una fusion entre este (Rate Topics MOD) y el Rating MOD

Respuesta: Problema Con Mod "rate_topics_v204"

Publicado: 10 Feb 2006, 12:08
por odin921
Odin, abre desde tu navegador...
http://www.tusitio/tuforo/rate.php
pues algo estarí?¡ mal, porque no se ve nada,.... :s

Imagen

PD En este MOD no hay imagenes, el MOD de este foro es una fusion entre este (Rate Topics MOD) y el Rating MOD
y ese mod se puede descargar??? la fusion de ambos...



gracias