2005-06-04, 01:46 PM
2005-06-05, 01:15 AM
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.
Thank you.
2005-06-05, 01:18 AM
Yes, there is...Just choose the forums you want to be shown when you create your syndication-url.
Greets,
Michael
Greets,
Michael
2005-06-05, 01:23 AM
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>";
}
?>
2005-06-05, 10:12 AM
But then global.php can't reach other files cause the file that requires it is in another directory 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
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
2005-06-05, 10:42 AM
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
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
2005-06-05, 12:29 PM
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...
2005-06-05, 12:42 PM
I explained myself pretty bad. I updated my previous post so that now it is understandable.
2005-06-05, 12:44 PM
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.
Ta.
2005-06-05, 12:49 PM
When you open the topics.php in you browser, does it work?
Where did you insert the code
Where did you insert the code
<?php include ("http://www.yourdomain.tld/../lasttopics/topics.php") ?>