MyBB Community Forums

Full Version: 'last 5 topics'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
that's what i figured yeah Smile
hi, is there a way to make a mod similar to this description: "last 5 topic from a specific group of forums located under the same category" or "last 5 topic from a specific forum"?

Thank you.
Yes, there is...Just choose the forums you want to be shown when you create your syndication-url. Wink

Greets,
Michael
Their Michael's way, or use this:
<?php
require("./forum/global.php");
$fid = "1"; // The id of the forum to pull posts from goes here

$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE fid=$fid ORDER BY `tid` DESC LIMIT 0,5");
while ($item = $db->fetch_array($query)) {
if (strlen($item['subject']) > 24) { $subject = substr($item['subject'], 0, 20)."...."; } else { $subject = $item['subject']; }
$tid = $item['tid'];
echo "<a href=\"http://www.unprogged.com/showthread.php?tid=$tid\" target=\"_blank\">$subject</a><br>";
}
?>
But then global.php can't reach other files cause the file that requires it is in another directory Confused i got this error:

Warning: main(./inc/timers.php): failed to open stream: No such file or directory in /home/nintend1/public_html/forum/global.php on line 14

Warning: main(./inc/timers.php): failed to open stream: No such file or directory in /home/nintend1/public_html/forum/global.php on line 14

Warning: main(./inc/timers.php): failed to open stream: No such file or directory in /home/nintend1/public_html/forum/global.php on line 14

Fatal error: main(): Failed opening required './inc/timers.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nintend1/public_html/forum/global.php on line 14
hi Michael, I've done what you said. I used the last command you gave in the previous page of this thread to include the file here:

www.unprogged.com/portal.php

but the list doesn't show itself...

what can I do?


p.s. I inserted this feed url in the "topics.php" page: http://www.unprogged.com/rss.php?fid=38&limit=5

and I have a Linux domain.

Thank you
Where did you insert the code? It must be included in a php-file, I think it does not work when you insert it in the templates...
I explained myself pretty bad. I updated my previous post so that now it is understandable.
Handy code snip there with many many uses, thanks. I've just modded it slightly to put the last ten posts on the main (non forum) pages of our site.

Ta.
When you open the topics.php in you browser, does it work?

Where did you insert the code
<?php include ("http://www.yourdomain.tld/../lasttopics/topics.php") ?>
Pages: 1 2 3 4 5 6