20.06.2018, 05:19
Hallo, ich kenne aus phpbb3, dass man eine Mod der letzten Beiträge, auf irgendeiner Seite platzieren kann.
Gibt es sowas fertig auch hier bei MyBB?
VG Maik
Gibt es sowas fertig auch hier bei MyBB?
VG Maik
(20.06.2018, 07:30)lenox schrieb: [ -> ]Es gibt mehrere Möglichkeiten overview und last post plugin z.B. einfach die Suche nutzen
SELECT tid, subject, username, lastpost, lastposter, lastposteruid
FROM mybb_threads
ORDER BY lastpost DESC
LIMIT 5
<?php
// Sets the number of topics to display
$topicnumber = 3;
// Change this to your MyBB path (no trailing slash "/")
$urlPath = "http://forum.boulderrausch.de";
// Database configuration (where your MyBB config.php file is located)
include 'templates/config-mybb.php';
// Database connection and error messages
$table_threads = $table_prefix. "threads";
$table_forums = $table_prefix. "forums";
$table_posts = $table_prefix. "posts";
$table_users = $table_prefix. "users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");
date_default_timezone_set('Europe/London');
// Main database query
$query = "SELECT tid,subject,username,lastpost,lastposter,lastposteruid
FROM $table_threads t, $table_forums f, $table_posts p, $table_users u
WHERE t.threads_id = p.threads_id AND
f.forum_id = t.forum_id AND
/**********************
***********************
EXCLUDE THESE FORUM IDs (if you have private forums)
***********************
**********************/
t.forum_id != 17 AND
t.forum_id != 19 AND
t.forum_id != 20 AND
/**********************
***********************
END EXCLUSIONS
***********************
**********************/
/* Back to the query... */
t.threads_status <> 2 AND
p.post_id = t.threads_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $threadnumber";
$result = mysql_query($query) or die("Query failed");
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
// HTML parsingf
echo "<h2><a href=\"$urlPath/viewtopic.php?f=$row[forum_id]&t=$row[thread_id]&p=$row[post_id]#p$row[post_id]\" target=\"_blank\" class='thread_new'>" .
$row["thread_title"] . "</a></h2><p><a href=\"$urlPath/memberlist.php?mode=viewprofile&u=$row[user_id]\" target=\"_blank\">" .
$row["username"] . "</a> " .
date('M j, Y, g:i ', $row["post_time"]) . "</p>";
}
mysql_free_result($result);
mysql_close($link);
?>
(22.06.2018, 22:24)MrBrechreiz schrieb: [ -> ]https://www.mybb.de/erweiterungen/18x/pl...last-post/
https://www.mybb.de/erweiterungen/18x/pl...n-sidebar/