[REGMOD]Fehler beim Einbau

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
Djclean
Mitglied
Beiträge: 13
Registriert: 18.01.2006 13:56
Wohnort: Gelsenkirchen/NRW
Kontaktdaten:

[REGMOD]Fehler beim Einbau

Beitrag 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 :P

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.
Benutzeravatar
Djclean
Mitglied
Beiträge: 13
Registriert: 18.01.2006 13:56
Wohnort: Gelsenkirchen/NRW
Kontaktdaten:

Beitrag von Djclean »

Kommt schon Jungs, kann denn keiner helfen :-? ??
Benutzeravatar
Dr.Death
Moderator
Moderator
Beiträge: 17476
Registriert: 23.04.2003 08:22
Wohnort: Xanten
Kontaktdaten:

Beitrag 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
Benutzeravatar
Djclean
Mitglied
Beiträge: 13
Registriert: 18.01.2006 13:56
Wohnort: Gelsenkirchen/NRW
Kontaktdaten:

Beitrag 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 :-?
Benutzeravatar
Dr.Death
Moderator
Moderator
Beiträge: 17476
Registriert: 23.04.2003 08:22
Wohnort: Xanten
Kontaktdaten:

Beitrag 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.
Benutzeravatar
Djclean
Mitglied
Beiträge: 13
Registriert: 18.01.2006 13:56
Wohnort: Gelsenkirchen/NRW
Kontaktdaten:

Beitrag von Djclean »

testjoomla.te.funpic.de/Public/posting_body.rar
testjoomla.te.funpic.de/Public/posting_body.rar

Sind hier!
Antworten

Zurück zu „phpBB 2.0: Mod Support“