Not Solved 'last 5 topics'
#11
Not Solved
that's what i figured yeah Smile
Reply
#12
Not Solved
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.
Reply
#13
Not Solved
Yes, there is...Just choose the forums you want to be shown when you create your syndication-url. Wink

Greets,
Michael
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Reply
#14
Not Solved
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>";
}
?>
Reply
#15
Not Solved
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
Reply
#16
Not Solved
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
Reply
#17
Not Solved
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...
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Reply
#18
Not Solved
I explained myself pretty bad. I updated my previous post so that now it is understandable.
Reply
#19
Not Solved
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.
Reply
#20
Not Solved
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") ?>
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)