ezPortal Approve Posts ?
Verfasst: 17.12.2002 20:39
Hallo
Kann mir mal bitte einer auf die Sprünge helfen was o.g. Zusatz zum ez portal bewirkt bzw. macht ?? Hier der Code dazu (ist nicht so gross...)
Kann mir mal bitte einer auf die Sprünge helfen was o.g. Zusatz zum ez portal bewirkt bzw. macht ?? Hier der Code dazu (ist nicht so gross...)
Code: Alles auswählen
#################################################################
## Title: How to make ezPortal compatible with Approve Posts MOD v2.0.1 RC2
## Author: Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
## Description: Approve Posts MOD is a mod by [ AceMan < php@elitemaps.com > (Mike Dawidowicz) http://www.elitemaps.com ]
##
## Files To Edit: 1
## fetchposts.php
##
## Included Files: N/A
##
#################################################################
#
#-----[ OPEN ]-------------------------------------------------------
#
fetchposts.php
#
#-----[ FIND ]----------------------------------------
#
$sql = 'SELECT
t.topic_id,
t.topic_time,
t.topic_title,
pt.post_text,
u.username,
u.user_id,
t.topic_replies,
pt.bbcode_uid,
t.forum_id,
t.topic_poster,
t.topic_first_post_id,
t.topic_status,
pt.post_id,
p.post_id,
p.enable_smilies
FROM
' . TOPICS_TABLE . ' AS t,
' . USERS_TABLE . ' AS u,
' . POSTS_TEXT_TABLE . ' AS pt,
' . POSTS_TABLE . ' AS p
WHERE
t.forum_id IN (' . $forum_sql . ') AND
t.topic_time <= ' . time() . ' AND
t.topic_poster = u.user_id AND
t.topic_first_post_id = pt.post_id AND
t.topic_first_post_id = p.post_id AND
t.topic_status <> 2
ORDER BY
t.topic_time DESC';
#
#-----[ REPLACE WITH ]--------------------------------
#
$sql = 'SELECT
t.topic_id,
t.topic_time,
t.topic_title,
pt.post_text,
u.username,
u.user_id,
t.topic_replies,
pt.bbcode_uid,
t.forum_id,
t.topic_poster,
t.topic_first_post_id,
t.topic_status,
pt.post_id,
p.post_id,
p.enable_smilies,
a.post_id
FROM
' . TOPICS_TABLE . ' AS t,
' . USERS_TABLE . ' AS u,
' . POSTS_TEXT_TABLE . ' AS pt,
' . POSTS_TABLE . ' AS p,
' . APPROVE_POSTS . ' AS a
WHERE
t.forum_id IN (' . $forum_sql . ') AND
t.topic_time <= ' . time() . ' AND
t.topic_poster = u.user_id AND
t.topic_first_post_id = pt.post_id AND
t.topic_first_post_id = p.post_id AND
t.topic_status <> 2 AND
t.topic_first_post_id <> a.post_id
ORDER BY
t.topic_time DESC';
#
#-----[ FIND ]--------------------------------------------
#
$sql = 'SELECT
t.*,
vd.*
FROM
' . TOPICS_TABLE . ' AS t,
' . VOTE_DESC_TABLE . ' AS vd
WHERE
t.forum_id IN (' . $forum_sql . ') AND
t.topic_status <> 1 AND
t.topic_status <> 2 AND
t.topic_vote = 1 AND
t.topic_id = vd.topic_id
ORDER BY
t.topic_time DESC
LIMIT
0,1';
#
#-----[ REPLACE WITH ]-----------------------------------
#
$sql = 'SELECT
t.*,
vd.*
FROM
' . TOPICS_TABLE . ' AS t,
' . VOTE_DESC_TABLE . ' AS vd,
' . APPROVE_POSTS . ' AS a
WHERE
t.forum_id IN (' . $forum_sql . ') AND
t.topic_status <> 1 AND
t.topic_status <> 2 AND
t.topic_vote = 1 AND
t.topic_id = vd.topic_id AND
t.topic_first_post_id <> a.post_id
ORDER BY
t.topic_time DESC
LIMIT
0,1';
#
#-----[ SAVE/UPLOAD ALL FILES ]------------------------------------------
#
# EoF