Página 1 de 1

User Reputation System

Publicado: 14 Abr 2007, 12:43
por evans seroons
hola mi problema con este mod es el siguiente, aun que he buscado en internet y sobre todo en este foro y no es el mismo caso que me pasa a mi, paso a la explicación:

Lo tengo instalado y todo esta bien pero cuando en viewtopic pongo el codigo que me dice las instrucciones de MOD, y en dos de las lineas donde pongo el codigo el programa dreamweaver me los subraya de amarillo, como que hay algo que no esta bien, y cuando actualizo ese archivo en el servidor (estando esas lineas en amarillo) me dice que hay un error en viewtopic.php justo en la linea que me subraya de amarillo en dreamweaver...

estos son:

la linea 1180:

Código: Seleccionar todo

$reputation .=  " <a href=\""  . append_sid("reputation.$phpEx?a=add&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&c=" . substr(md5($bbcode_uid),0,8) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', "','location,width=700,height=400,top=0,scrollbars=yes'); popupWin.focus(); return false;\"><img src=\"images/reputation_add_plus.gif\" alt=\"\" border=\"0\"><img src=\"images/reputation_add_minus.gif\" alt=\"\" border=\"0\"></a>";
la linea 1192:

Código: Seleccionar todo

$reputation .= "<br /><a href=\""  . append_sid("reputation.$phpEx?a=stats&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', "','location,width=700,height=400,top=0,scrollbars=yes'); popupWin.focus(); return false;\">" . $lang['Votes'] . "</a>: " . $row_rep['count_reps'];
La parte completa del modulo esta:

Código: Seleccionar todo

// START ADD Reputation Mod v.1.0.0
	$reputation = '';
	if ($postrow[$i]['user_id'] != ANONYMOUS)
	{
		if ($rep_config['rep_disable'] == 0)
		{
			if ($postrow[$i]['user_reputation'] == 0)
			{
				$reputation = $lang['Zero_reputation'];
			} else
			{
				if ($rep_config['graphic_version'] == 0)
				{
					// Text version
					$reputation =  $lang['Reputation'] . ": ";
					if ($postrow[$i]['user_reputation'] > 0)
					{
						$reputation .= "<strong><font color=\"green\">" . round($postrow[$i]['user_reputation'],1) . "</font></strong>";
					} else {
						$reputation .= "<strong><font color=\"red\">" . round($postrow[$i]['user_reputation'],1) . "</font></strong>";
					}
					$reputation_add = '';
				} else {
					// Graphic version
					get_reputation_medals($postrow[$i]['user_reputation']);
				}
			}
			$reputation .=  " <a href=\""  . append_sid("reputation.$phpEx?a=add&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&c=" . substr(md5($bbcode_uid),0,8) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', "','location,width=700,height=400,top=0,scrollbars=yes'); popupWin.focus(); return false;\"><img src=\"images/reputation_add_plus.gif\" alt=\"\" border=\"0\"><img src=\"images/reputation_add_minus.gif\" alt=\"\" border=\"0\"></a>";
			$sql = "SELECT COUNT(user_id) AS count_reps
					FROM " . REPUTATION_TABLE . " AS r
					WHERE r.user_id = " . $postrow[$i]['user_id'] . "
					GROUP BY user_id";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, "Could not obtain reputation stats for this user", '', __LINE__, __FILE__, $sql);
			}
			$row_rep = $db->sql_fetchrow($result);
			if ($row_rep)
			{
				$reputation .= "<br /><a href=\""  . append_sid("reputation.$phpEx?a=stats&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', "','location,width=700,height=400,top=0,scrollbars=yes'); popupWin.focus(); return false;\">" . $lang['Votes'] . "</a>: " . $row_rep['count_reps'];
			}
		}
	}
	// END ADD Reputation Mod v.1.0.0
El error que me sale cuando entro a ver un tema al foro es este:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/seroons/public_html/viewtopic.php on line 1180

la web es www.reinososcuros.com

Gracias por la ayuda... :wink:

Respuesta: User Reputation System

Publicado: 14 Abr 2007, 15:30
por KasLimon
Deja las líneas como te indico para que funcione:
1180:

Código: Seleccionar todo

$reputation .=  ' <a href="' . append_sid("reputation.$phpEx?a=add&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . '&' . POST_POST_URL . "=" . $postrow[$i]['post_id'] . '&c=' . substr(md5($bbcode_uid),0,8) . '" target="_blank" onClick=\'popupWin = window.open(this.href, "' . $lang['Reputation'] . '", "", "location,width=700,height=400,top=0,scrollbars=yes"); popupWin.focus(); return false;\'><img src="images/reputation_add_plus.gif" alt="" border="0"><img src="images/reputation_add_minus.gif" alt="" border="0" /></a>';
1192:

Código: Seleccionar todo

$reputation .= '<br /><a href="'  . append_sid("reputation.$phpEx?a=stats&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . '" target="_blank" onClick=\'popupWin = window.open(this.href, "' . $lang['Reputation'] . '", "", "location,width=700,height=400,top=0,scrollbars=yes"); popupWin.focus(); return false;\'>' . $lang['Votes'] . '</a>: ' . $row_rep['count_reps'];
Así debería funcionar. Menuda chapuza de código... Ya no es la primera vez que hago un arreglillo al mod...

Salu2 ;)

Respuesta: User Reputation System

Publicado: 14 Abr 2007, 17:33
por evans seroons
Gracias. pero lo he probado y esto sigue igual... nose habra alguien que le haya funcionado??.

De que más puede ser.

Respuesta: User Reputation System

Publicado: 14 Abr 2007, 19:23
por BENDER
Proba con este:

Código: Seleccionar todo

$reputation .=  " <a href=\""  . append_sid("reputation.$phpEx?a=add&" . POST_USERS_URL . "=" . $postrow[$i]['user_id']) . "&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&c=" . substr(md5($bbcode_uid),0,8) . "\" target=\"_blank\" onClick=\"popupWin = window.open(this.href, '" . $lang['Reputation'] . "', "','location, width=700, height=400, top=0, scrollbars=yes'); popupWin.focus(); return false;\"><img src=\"images/reputation_add_plus.gif\" alt=\"\" border=\"0\"><img src=\"images/reputation_add_minus.gif\" alt=\"\" border=\"0\"></a>";
en la linea 1180

Respuesta: User Reputation System

Publicado: 23 May 2007, 21:02
por samu93
¿me podeis decir el link de descarga de ese programa?

Salu2