Seite 1 von 1

Probleme nach Self auth-MOD

Verfasst: 20.07.2006 21:22
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.

Re: Probleme nach Self auth-MOD

Verfasst: 22.07.2006 10:25
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

Verfasst: 22.07.2006 10:26
von SoLo1905
mach es bei dem ersten wenn fehler kommt weg machen dann 2ten...^^