kleiner fehler im "profile guestbook mod" mod

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
timo111
Mitglied
Beiträge: 220
Registriert: 03.02.2004 21:03

kleiner fehler im "profile guestbook mod" mod

Beitrag von timo111 »

hey
hab im "profile guestbook mod" einen kleinen fehler gefunden. wenn man einen einträg löschen will kommt vorher die abfrage "willst du diesen eintrag wirklich löschen: JA oder NEIN". wählt man hier nein bekommt man einen fehler:

Code: Alles auswählen

Fatal error: Call to undefined function: redirect() in forum/includes/usercp_viewprofile.php on line 74
die entsprechende zeile:

Code: Alles auswählen

if ($cancel)
{
	redirect(append_sid("profile.$phpEx?mode=viewprofile&u=" . $id ."&start=".$start."#gb", true));
	exit;
}
mit JA kann man den eintrag problemlos löschen.
jemand ne idee?
Benutzeravatar
netzmeister
Ehemaliges Teammitglied
Beiträge: 1146
Registriert: 02.05.2003 20:59
Wohnort: Freiburg
Kontaktdaten:

Beitrag von netzmeister »

Hallo,
wo gibt es diesen Mod ? Müsste mir mal den Code anschauen.

Gruß netzmeister
Gruß netzmeister
Die "Suche" ist euer Freund
timo111
Mitglied
Beiträge: 220
Registriert: 03.02.2004 21:03

Beitrag von timo111 »

//edit: http://www.phpbb.com/phpBB/viewtopic.php?t=79775

sorry, kann nichtmehr sagen woher ich es hab. der kopf des mods:

Code: Alles auswählen

######################################################## 
## Mod Title:   profile guestbook mod
## Mod Version: 0.91 beta
## Included mod by neo18tilidie
## Inspired by a comment script by todd
## but has nothing to do with it anymore
##
## History: 
## 0.91 entry count added - typo fixed
## 0.90 Initial release
## 
## Description:  This mod will add a guestbook to each userprofile
## 
## Installation Level:  medium
## Installation Time:  10-15 Minutes 
## Files To Edit:       7
###################################################################
###################################################################
das ist der teil der in die usercp_viewprofile.php eingebaut wird:

Code: Alles auswählen

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/usercp_viewprofile.php

# 
#-----[ NEAR TOP FIND ]------------------------------------------ 
# 

$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// gestbook hack
$id = $u;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
if ($cancel)
{
       redirect(append_sid("profile.$phpEx?mode=viewprofile&u=" . $id ."&start=".$start."#gb", true));
	exit;
}
if ( isset($HTTP_GET_VARS['action']) || isset($HTTP_POST_VARS['action']) )
{
	$action = ( isset($HTTP_GET_VARS['action']) ) ? $HTTP_GET_VARS['action'] : $HTTP_POST_VARS['action'];
	if($action == 'admin')
	{
		
		include($phpbb_root_path . 'gb_display.'.$phpEx);

		exit;
	}
	elseif($action == "post")
	{
		include($phpbb_root_path . 'gb_post.'.$phpEx);
		exit;
	}
}

// gestbook hack end

# 
#-----[ FIND ]------------------------------------------ 
# 

include($phpbb_root_path . 'includes/page_header.'.$phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

include($phpbb_root_path . 'gb_display.'.$phpEx);
zeile 74 davon:

Code: Alles auswählen

redirect(append_sid("profile.$phpEx?mode=viewprofile&u=" . $id ."&start=".$start."#gb", true));
Benutzeravatar
netzmeister
Ehemaliges Teammitglied
Beiträge: 1146
Registriert: 02.05.2003 20:59
Wohnort: Freiburg
Kontaktdaten:

Beitrag von netzmeister »

Hallo,
füge mal folgende Zeilen in die usercp_viewprofile.php
oben nach

Code: Alles auswählen

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
	exit;
}
ein.

Code: Alles auswählen

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
Gruß netzmeister
Gruß netzmeister
Die "Suche" ist euer Freund
timo111
Mitglied
Beiträge: 220
Registriert: 03.02.2004 21:03

Beitrag von timo111 »

dann kommt folgende fehlermeldung beim aufruf des profils:

Code: Alles auswählen

Fatal error: Cannot redeclare class template in /forum/includes/template.php on line 30
die zeile 30 in der template.php ist leer bzw. dieser bereich:

Code: Alles auswählen

/***************************************************************************

 *

 *   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.

 *

 ***************************************************************************/



/**
es geht übrigends ums 2.0.4! falls das einen unterschied macht
timo111
Mitglied
Beiträge: 220
Registriert: 03.02.2004 21:03

Beitrag von timo111 »

mir ist gerade aufgefallen das ich ein sehr ähnliches problem schonmal hatte:

http://www.phpbb.de/viewtopic.php?t=51939

an was liegt das?
Benutzeravatar
netzmeister
Ehemaliges Teammitglied
Beiträge: 1146
Registriert: 02.05.2003 20:59
Wohnort: Freiburg
Kontaktdaten:

Beitrag von netzmeister »

Hallo,
änder mal Zeile 74 wie folgt:

Code: Alles auswählen

header("Location: " . append_sid("profile.$phpEx?mode=viewprofile&u=" . $id ."&start=".$start."#gb", true));
Gruß netzmeister
Gruß netzmeister
Die "Suche" ist euer Freund
timo111
Mitglied
Beiträge: 220
Registriert: 03.02.2004 21:03

Beitrag von timo111 »

geht!
tausend dank netzmeister
Antworten

Zurück zu „phpBB 2.0: Mod Support“