[3.2] Beiträge auf Homepage

Du suchst eine bestimmte Extension, weißt aber nicht genau wo bzw. ob sie überhaupt existiert? Du kannst hier die von dir gewünschte/gesuchte Extension beschreiben ...
Falls ein Extension-Autor eine der Anfragen hier aufnimmt, um eine neue Extension zu entwickeln, geht's in Extensions in Entwicklung weiter.
Antworten
Sammler22
Mitglied
Beiträge: 59
Registriert: 17.02.2018 12:43

[3.2] Beiträge auf Homepage

Beitrag von Sammler22 »

Hallo kennt jemand die Extension, das man neue Beiträge auf der Homepage darstellen kann, genau wie hier?

https://www.portal.my-tastenworld.ch/

Suche das dringlich für 3.2! Danke.
Benutzeravatar
Mahony
Ehemaliges Teammitglied
Beiträge: 12178
Registriert: 17.11.2005 22:33
Wohnort: Ostfildern Kemnat
Kontaktdaten:

Re: [3.2] Beiträge auf Homepage

Beitrag von Mahony »

Hallo Sammler22
Das ist keine Extension auf der Seite. Es handelt sich dabei um eine HTML-Seite wo in einem Iframe die letzten Beiträge, mittels eines PHP-Scriptes, aus bestimmten Foren ausgelesen werden.

Hier mal das PHP-Script

Code: Alles auswählen

<?php
    // How Many Topics you want to display?
    $topicnumber = 12;
    // Change this to your phpBB path
    $urlPath = "https://www.mein-forum.de";
 
    // Database Configuration (Where your phpBB config.php file is located)
    include 'config.php';
	
    header('Content-Type: text/html;charset=utf-8');
    $table_topics = $table_prefix. "topics";
    $table_forums = $table_prefix. "forums";
    $table_posts = $table_prefix. "posts";
    $table_users = $table_prefix. "users";
    $link = mysqli_connect("$dbhost", "$dbuser", "$dbpasswd", "$dbname") or die("Could not connect");
    //mysql_select_db("$dbname") or die("Could not select database");
 
    $query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
    FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
    WHERE t.topic_id = p.topic_id AND
    f.forum_id = t.forum_id AND
    t.forum_id != 4 AND
    t.topic_status <> 2 AND
    p.post_id = t.topic_last_post_id AND
    p.poster_id = u.user_id
    ORDER BY p.post_id DESC LIMIT $topicnumber";
    $result = mysqli_query($link, $query) or die("Query failed");									
 
    print "<table cellpadding='3' cellSpacing='2' width='695'>";
    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
 
    echo  utf8_encode("<tr valign='top'><td><font face=\"Maven+Pro, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#283857\"><style=\"text-decoration:none\"><b><a href=\"$urlPath/viewtopic.php?f=$row[forum_id]&t=$row[topic_id]&p=$row[post_id]#p$row[post_id]\" TARGET=\"_blank\">" .
    $row["topic_title"] .
    "</a></td></font></b><td><font face=\"Maven+Pro, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#283857\"> User: <a href=\"$urlPath/memberlist.php?mode=viewprofile&u=$row[user_id]\" TARGET=\"_blank\">" .
    $row["username"] .
    "</td><td><font face=\"Maven+Pro, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#283857\">" .
    date('d.m.Y, H:i', $row["post_time"]) .
    "</td></tr></font>");
    }
    print "</table>";
    mysqli_free_result($result);
    mysqli_close($link);
    ?>
https://www.mein-forum.de und t.forum_id != 4 musst du natürlich entsprechend anpassen.

Grüße: Mahony
Taekwondo in Berlin
Wer fragt, ist ein Narr für fünf Minuten, wer nicht fragt, ist ein Narr für immer.
Benutzeravatar
derd
Mitglied
Beiträge: 1176
Registriert: 19.04.2004 19:30
Wohnort: Aue
Kontaktdaten:

Re: [3.2] Beiträge auf Homepage

Beitrag von derd »

Hallo, super vielen Dank genau danach habe ich gesucht. Funktioniert super.
Antworten

Zurück zu „Extension Suche/Anfrage“