Seite 1 von 1
[REGMOD]Fehler beim Einbau
Verfasst: 06.02.2006 18:14
von Djclean
Hallo zusammen.
Ich habe den REGMOD eingebaut, und bekomme folgende Fehlermeldung, wenn ich auf das Forum zugreifen will.
Parse error: parse error, unexpected T_ELSE in /usr/export/www/vhosts/funnetwork/hosting/testjoomla/components/com_forum/viewforum.php on line 518
Ich werd die File gleich noch uploaden, iss eh ne Testinstall, evtl hilfts ja
EDIT: Hier mal genaueres:
Ich benutze phpbb1.2.4.RC3.2 als Komponente von Joomla_1.0.7-Stable-Full_Package
Einbauen wollte ich regmod_104
http://testjoomla.te.funpic.de <- Das ist die Testseite
http://testjoomla.te.funpic.de/Public/viewforum.rar <- Hier die Datei, die als Fehlerhaft angesagt wird.
Ich kann in die Forenübersicht und in den Adminpanel. Wenn ich aber eines der Foren anklicke kommt der genannte Error.
Verfasst: 07.02.2006 07:33
von Djclean
Kommt schon Jungs, kann denn keiner helfen

??
Verfasst: 07.02.2006 07:58
von Dr.Death
Bumping innerhalb von 24 Stunden wird hier nicht gern gesehen.
Aber was solls....
Du hast einen Fehler beim Einbau des MODs gemacht.
Der Einbau des Reg mods in der viewforum.php sollte so aussehen:
Suche:
Code: Alles auswählen
if( $topic_type == POST_ANNOUNCE )
{ // RegMod-Begin
else if( $topic_type == POST_REGISTER )
{
$reg_thread = true;
if( $userdata['user_id'] )
{
$sql = "SELECT registration_status FROM ".REGISTRATION_TABLE." WHERE topic_id = $topic_id AND registration_user_id = ".$userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
if( $regrow = $db->sql_fetchrow($result) )
{
$status = $regrow['registration_status'];
if( $status == REG_DO )
{
$topic_type = '<img src="'.$images['reg_do'].'" width="7" height="7" alt="'.$lang['Reg_Do']. '" title="' .$lang['reg_do']. '" />' . ' ';
}
else if( $status == REG_MAYBE )
{
$topic_type = '<img src="'.$images['reg_maybe'].'" width="7" height="7" alt="'.$lang['Reg_Maybe']. '" title="' .$lang['reg_maybe']. '" />' . ' ';
}
else if( $status == REG_DONT )
{
$topic_type = '<img src="'.$images['reg_dont'].'" width="7" height="7" alt="'.$lang['Reg_Dont']. '" title="' .$lang['reg_dont']. '" />' . ' ';
}
else
{
$topic_type = '<img src="'.$images['reg_empty'].'" width="7" height="7" alt="'.$lang['Reg_Empty']. '" title="' .$lang['reg_empty']. '" />' . ' ';
}
}
else
{
$topic_type = '<img src="'.$images['reg_empty'].'" width="7" height="7" alt="'.$lang['Reg_Empty']. '" title="' .$lang['reg_empty']. '" />' . ' ';
}
$db->sql_freeresult($result);
}
else
{
$topic_type = $lang['Topic_RegLogin'] . ' ';
}
$sql = "SELECT u.username, u.user_id, r.registration_time, r.registration_confirm_time, r.registration_status FROM ".REGISTRATION_TABLE." r, ".USERS_TABLE." u WHERE r.topic_id=$topic_id AND r.registration_user_id = u.user_id ORDER BY registration_status, registration_time";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain registration data for this topic", '', __LINE__, __FILE__, $sql);
}
$reg_info = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$numregs = count($reg_info);
$do_count = 0;
$maybe_count = 0;
$dont_count = 0;
for( $u = 0; $u < $numregs; $u ++ )
{
if( $reg_info[$u]['registration_status'] == REG_DO )
{
$do_count ++;
}
else if( $reg_info[$u]['registration_status'] == REG_MAYBE )
{
$maybe_count ++;
}
else if( $reg_info[$u]['registration_status'] == REG_DONT )
{
$dont_count ++;
}
}
}
// RegMod-End
$topic_type = $lang['Topic_Announcement'] . ' ';
}
Ersetzte mit:
Code: Alles auswählen
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
// RegMod-Begin
else if( $topic_type == POST_REGISTER )
{
$reg_thread = true;
if( $userdata['user_id'] )
{
$sql = "SELECT registration_status FROM ".REGISTRATION_TABLE." WHERE topic_id = $topic_id AND registration_user_id = ".$userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
if( $regrow = $db->sql_fetchrow($result) )
{
$status = $regrow['registration_status'];
if( $status == REG_DO )
{
$topic_type = '<img src="'.$images['reg_do'].'" width="7" height="7" alt="'.$lang['Reg_Do']. '" title="' .$lang['reg_do']. '" />' . ' ';
}
else if( $status == REG_MAYBE )
{
$topic_type = '<img src="'.$images['reg_maybe'].'" width="7" height="7" alt="'.$lang['Reg_Maybe']. '" title="' .$lang['reg_maybe']. '" />' . ' ';
}
else if( $status == REG_DONT )
{
$topic_type = '<img src="'.$images['reg_dont'].'" width="7" height="7" alt="'.$lang['Reg_Dont']. '" title="' .$lang['reg_dont']. '" />' . ' ';
}
else
{
$topic_type = '<img src="'.$images['reg_empty'].'" width="7" height="7" alt="'.$lang['Reg_Empty']. '" title="' .$lang['reg_empty']. '" />' . ' ';
}
}
else
{
$topic_type = '<img src="'.$images['reg_empty'].'" width="7" height="7" alt="'.$lang['Reg_Empty']. '" title="' .$lang['reg_empty']. '" />' . ' ';
}
$db->sql_freeresult($result);
}
else
{
$topic_type = $lang['Topic_RegLogin'] . ' ';
}
$sql = "SELECT u.username, u.user_id, r.registration_time, r.registration_confirm_time, r.registration_status FROM ".REGISTRATION_TABLE." r, ".USERS_TABLE." u WHERE r.topic_id=$topic_id AND r.registration_user_id = u.user_id ORDER BY registration_status, registration_time";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain registration data for this topic", '', __LINE__, __FILE__, $sql);
}
$reg_info = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$numregs = count($reg_info);
$do_count = 0;
$maybe_count = 0;
$dont_count = 0;
for( $u = 0; $u < $numregs; $u ++ )
{
if( $reg_info[$u]['registration_status'] == REG_DO )
{
$do_count ++;
}
else if( $reg_info[$u]['registration_status'] == REG_MAYBE )
{
$maybe_count ++;
}
else if( $reg_info[$u]['registration_status'] == REG_DONT )
{
$dont_count ++;
}
}
}
// RegMod-End
Verfasst: 07.02.2006 08:11
von Djclean
Danke für die Hilfe.
Das gute: Das Forum stürzt nicht mehr ab.
Das schlechte: Vom regmod ist nix zu sehen, ausser der option "reg" in der rechteverwaltung der foren im acp
dort habe ich natürlich testweise alles auf "all" gesetzt, aber ich kann trotzdem keine regs posten

Verfasst: 07.02.2006 08:21
von Dr.Death
Dann würde ich vorschlagen:
Mache alle Deine REGMOD Änderungen rückgängig und baue es erneut ein.
Anscheinend sind viele, weitere Fehler drin.
Es könnte auch an der posting.php und/oder posting_body.tpl liegen.
verlinke mal die beiden genannten Dateien.
Verfasst: 07.02.2006 09:11
von Djclean
testjoomla.te.funpic.de/Public/posting_body.rar
testjoomla.te.funpic.de/Public/posting_body.rar
Sind hier!