Seite 1 von 1

ezPortal Approve Posts ?

Verfasst: 17.12.2002 20:39
von Guido
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...)

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

Verfasst: 17.12.2002 23:40
von atcforum
Ich kenn den Mod noch nicht, aaaber....
ich denke dass jeder Beitrag den ein User im entsprechenden "Ankündigungs-Forum" postet, zuerst von einem Mod/Admin abgesegnet werden muss, bevor er von anderen Visitors auf der Startseite des Portals gesehen werden kann. Sozusagen als Sicherheit...

(Sorry habs nicht besser erklären können)

Verfasst: 17.12.2002 23:56
von Guido
Hallo actforum

Danke für Deinen Hinweis und er war auch verständlih ;-). Sowas ähnliches hatte ich mir fast schon gedacht, aber da das Forum woraus die Ankündigungen erscheinen sowieso nur für den Admin ist erübrigt sich das wohl...Sollte jemand noch mehr dazu wissen lasst es mich/uns bitte wissen....!

Verfasst: 18.12.2002 00:05
von atcforum
Guido hat geschrieben:Hallo actforum

Danke für Deinen Hinweis und er war auch verständlih ;-). Sowas ähnliches hatte ich mir fast schon gedacht, aber da das Forum woraus die Ankündigungen erscheinen sowieso nur für den Admin ist erübrigt sich das wohl...Sollte jemand noch mehr dazu wissen lasst es mich/uns bitte wissen....!
1. aTCforum :wink:
2. Und ich habe schon angefangen an mir zu zweifeln. Tsststss... :)
3. Jo, Admin-Rechte für das Forum ist -mit Abstand- die sicherste Lösung... 8)

Grüße

Verfasst: 18.12.2002 00:36
von Guido
Ups sorry wegen des Namens, da war wohl der Wunsch der Vater des Gedanken :D (wenn c=k)