Probleme nach Self auth-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
Yoshi
Mitglied
Beiträge: 276
Registriert: 13.07.2004 12:59
Wohnort: NRW
Kontaktdaten:

Probleme nach Self auth-MOD

Beitrag von Yoshi »

Hi,

Ich habe heute den Self auth MOD eingebaut. Die funktionen scheinen auch prima zu gehen und die Foren kann ich auch einstellen.
Die probleme: Sobald ich im eingelogtem Zustand auf " Beiträge seit dem letzem login" oder im Profil "Zeige Beiträge von User" klicke, bekomme ich eine Weisse Seite.
Ich selbst tippe auf ein problem im Abschnitt der Install bei der bearbeitung der search.php:

#
#-----[ OPEN ]------------------------------------------------
#
search.php

#
#-----[ FIND ]------------------------------------------------
#
$where_sql = '';

#
#-----[ REPLACE WITH ]------------------------------------------------
#
$where_sql = ' AND p.topic_id=t.topic_id';
$select_sql .= (($select_sql) ? ',':'') . ' p.forum_id, t.topic_poster';

#
#-----[ FIND ]------------------------------------------------
#
# THE FIRST PRESSENT IN FILE die erste von denen
$sql = "SELECT topic_id

#
#-----[ REPLACE WITH ]------------------------------------------------
#
$sql = "SELECT p.topic_id, p.forum_id, t.topic_poster

#
#-----[ FIND ]------------------------------------------------
# 4 mal? Die stelle existiert 4 ma!
FROM " . POSTS_TABLE . "

#
#-----[ AFTER, ADD ]------------------------------------------------
#
p," . TOPICS_TABLE . " t


#
#-----[ FIND ]------------------------------------------------
#
$from_sql = POSTS_TABLE . " p";
#
#-----[ AFTER, ADD ]------------------------------------------------
#
$from_sql .= ', '. TOPICS_TABLE . ' t';

#
#-----[ FIND ]------------------------------------------------
#
# THE SECOND ONE Hier habe ich nur die 2 te stelle genommen
$sql = "SELECT p.topic_id

#
#-----[ REPLACE WITH ]------------------------------------------------
#
$sql = "SELECT p.topic_id, p.forum_id, t.topic_poster

#
#-----[ FIND ]------------------------------------------------
#
# THE FIRST ONE Hier die erste stelle genommen
$search_ids[] = $row['topic_id'];

#
#-----[ REPLACE WITH ]------------------------------------------------
#
if ( $search_forum == -1 )
{
$auth = $is_auth_ary[$row['forum_id']]['auth_read'];
} else
{
$auth = $is_auth['auth_read'];
}
if ( intval($auth) == AUTH_SELF)
{
if ( $row['topic_poster'] == $userdata['user_id'])
{
//viewing user are same as poster, display this search result
$search_ids[] = $row['topic_id'];
}
} else
{
//display this result, as this is now auth=SELF
$search_ids[] = $row['topic_id'];
}

#
#-----[ FIND ]------------------------------------------------
#
$from_sql = ( $search_author

#
#-----[ AFTER, ADD ]------------------------------------------------
#
// added for self auth
$from_sql .= (($from_sql) ? ',' : ''). TOPICS_TABLE . ' t';
$select_sql .= (($select_sql) ? ',':'') . ' p.forum_id, t.topic_poster';
$where_sql .= (($where_sql) ? ' AND ' : '') . ' p.topic_id=t.topic_id';

#
#-----[ FIND ]------------------------------------------------
#
# THE SECOND ONE Hier die 2 te stelle?
$search_ids[] = $row['post_id'];

#
#-----[ REPLACE WITH ]------------------------------------------------
#
// added for self auth
// if auth=SELF only include the topic/post if viwing user are same as posting...
if ( $search_forum == -1 )
{
$auth = $is_auth_ary[$row['forum_id']]['auth_read'];
} else
{
$auth = $is_auth['auth_read'];
}
if ( intval($auth) == AUTH_SELF)
{
if ( $row['topic_poster'] == $userdata['user_id'])
{
//viewing user are same as poster, display this search result
$search_ids[] = $row['post_id'];
}
} else
{
//display this result, as this is now auth=SELF
$search_ids[] = $row['post_id'];
}
Die besagten stellen sind Grün und rot markiert mit kommentar.
Auch meine ich das die Serverlast sehr in die Knie geht.
Gruss Yoshi
Yoshi
Mitglied
Beiträge: 276
Registriert: 13.07.2004 12:59
Wohnort: NRW
Kontaktdaten:

Re: Probleme nach Self auth-MOD

Beitrag von Yoshi »

Hi,
kann mir keiner einen Tip geben? :roll:
Gestern bevor ich es geändert habe gab es nämlich auch einen fatal error ... out of limit memory oder ähnl..

Ich habe nun also folgendes gemacht. Ich habe diese Stelle nur 1 mal editiert und zwar nur die 4.te Stelle und es läuft. Allerdings weiss ich nicht ob das nun so sauber ist... :roll:
Yoshi hat geschrieben:
#-----[ FIND ]------------------------------------------------
# 4 mal? Die stelle existiert 4 ma!
FROM " . POSTS_TABLE . "

#
#-----[ AFTER, ADD ]------------------------------------------------
#
p," . TOPICS_TABLE . " t
Zuletzt geändert von Yoshi am 22.07.2006 10:26, insgesamt 1-mal geändert.
Gruss Yoshi
SoLo1905

Beitrag von SoLo1905 »

mach es bei dem ersten wenn fehler kommt weg machen dann 2ten...^^
Antworten

Zurück zu „phpBB 2.0: Mod Support“