ich weiß nicht, ob ich hier richtig gelandet bin, ansonsten bitte einfach verschieben.
Ich habe folgendes Problem:
Für mein Eigenbau Clan-portal habe ich auf der Startseite eine Übersicht mit den neusten Beiträgen gemacht.
In meinem PHP Code sieht das ganze so aus:
Code: Alles auswählen
//Neusten Beiträge (Übersicht)
$sql =
'SELECT
topic_last_post_id,
topic_last_poster_id,
topic_last_poster_name,
topic_last_poster_colour,
topic_title,
topic_time,
topic_last_post_time,
forum_id,
topic_id
FROM
'.$table_prefix.'topics
WHERE
forum_id NOT LIKE 20 AND
forum_id NOT LIKE 21 AND
forum_id NOT LIKE 22 AND
forum_id NOT LIKE 23 AND
forum_id NOT LIKE 24 AND
forum_id NOT LIKE 25 AND
forum_id NOT LIKE 26 AND
forum_id NOT LIKE 37 AND
forum_id NOT LIKE 39
ORDER BY
topic_last_post_id DESC LIMIT 5';
$result = $db->sql_query($sql);
//Ausgabe, ob die Abfrage auch funktioniert. nicht wichtig für das eigentliche Script
if(!$result)
{
$fehler = ('SQL Abfrage fehlgeschlagen!: '.mysql_error());
}
else
{
$fehler = ('KEIN FEHLER!');
}
$no_content = '0';
//Bearbeiten der SQl Ergebnisse und schreiben ins Template
if ($result->num_rows) {
while ($row = $db->sql_fetchrow($result))
{
$cp_row = array();
$topicrow = array(
'TOPIC_FEHLER' => $fehler,
'TOPIC_POSTER' => $row['topic_last_poster_name'],
'TOPIC_TEXT' => $row['topic_title'],
'TOPIC_DATE' => $user->format_date($row['topic_last_post_time']),
'TOPIC_LINK' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", '&p='.$row['topic_last_post_id'].'#p'.$row['topic_last_post_id']) ,
'TOPIC_USER_LINK' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u='.$row['topic_last_poster_id']) ,
'TOPIC_USER_COLOUR' => $row['topic_last_poster_colour'],
);
if (isset($cp_row['row']) && sizeof($cp_row['row']))
{
$postrow = array_merge($topicrow, $cp_row['row']);
}
// Dump vars into template
$template->assign_block_vars('topicrow', $topicrow);
if (!empty($cp_row['blockrow']))
{
foreach ($cp_row['blockrow'] as $field_data)
{
$template->assign_block_vars('topicrow.custom_fields', $field_data);
}
}
}
}
else {
$topic_no_content = ('Kein Inhalt'); //Wenn keine neusten Beiträge vorhanden, dann ausgeben (Nur bei einem leeren Forum)
}
Ich habe dazu schon ein wenig in den function...php Dateien gesucht und auch die viewforum.php abgeklappert. Dabei ist mir die Funktion: "acl_gets" in der "auth.php" ins Auge gefallen. Kann es sein, das ich mein Ergebnis mit dieser Funktion erzielen kann? Und wenn ja, dann bräuchte ich mal jemanden, der mich ein wenig leiten kann, da ich aus dieser Funktion nicht so ganz schlau werde

PS: Ja, ich weiß das es die Board3 - Portal Mod gibt, allerdings ist diese mir "zu" umfangreich, und ich bin halt ein Bastler und mache so etwas aus Selbstlernzwecken gerne selber (bis ich nicht mehr weiterkomme).
MfG
hmm der 3.