2005-06-05, 07:15 PM
2005-06-05, 07:31 PM
Oohhhh...You're bringing me to the limit. Check your Emails.
2005-06-05, 07:36 PM
thanks a lot,
but still 4 errors (don't know whether are different from the previous).
but still 4 errors (don't know whether are different from the previous).
2005-06-05, 07:54 PM
2005-06-05, 08:01 PM
understood, thank you.
2005-06-05, 08:16 PM
Have you tried the way of k776? I tried it and it works.
Just create 4 files for example Uscite_Recenti.php, Old_Works.php,...
Put the following code into the new files:
In the second line you have to enter the fid of the forum. You see them in the URL.
Example: Old works -> http://www.unprogged.com/forumdisplay.php?fid=38
Upload them into the folder of your forum and put them into the iframes.
Just create 4 files for example Uscite_Recenti.php, Old_Works.php,...
Put the following code into the new files:
<?php
require("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>";
}
?>
In the second line you have to enter the fid of the forum. You see them in the URL.
Example: Old works -> http://www.unprogged.com/forumdisplay.php?fid=38
Upload them into the folder of your forum and put them into the iframes.
2005-06-05, 08:53 PM
I tried to apply it to "uscite recenti" but got a fatal error (you can see it @ www.unprogged.com/portal.php). Here's what I inserted in the external php file I've created:
The error is the following:
Fatal error: Call to a member function on a non-object in /web/htdocs/www.unprogged.com/home/lasttopics/topics_usciterecenti.php on line 5
<?php
require("http://www.unprogged.com/global.php");
$fid = "37"; // 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 "<style type=\"text/css\">
<!--
.style3 {
color: #CCCCCC;
font-size: 9px;
font-family: Verdana;
font-weight: bold;
}
-->
</style>
<body STYLE=\"background-color:transparent\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><div align=\"left\">
<li style=\"color:#999999\" type=\"square\"><a href=\"http://www.unprogged.com/showthread.php?tid=$tid\" target=\"_parent\" class=\"style3\">$subject</a>
</li>
</div></td>
</tr>
</table></body>";
}
?>
The error is the following:
Fatal error: Call to a member function on a non-object in /web/htdocs/www.unprogged.com/home/lasttopics/topics_usciterecenti.php on line 5
2005-06-05, 09:09 PM
doh, how silly of me. Turn fid=$fid into fid='$fid' and replace http://www.unprogged.com/ with ./ in the require bit. Try that.
2005-06-05, 09:35 PM
that works!! thank you!!
btw, the slash between the ' and the s of "Pepper's Ghost" remains...
solved on my own! however, thank you!
hi, is it possible to show the date other than the subject?
thank you very much
btw, the slash between the ' and the s of "Pepper's Ghost" remains...
solved on my own! however, thank you!
hi, is it possible to show the date other than the subject?
thank you very much
2005-06-07, 05:51 AM
Other than or as well as? If you want to show both the time and subject, try this: (I'm using myBB's default time formatting so hopefully it should work and I rearanged it a bit and adding <html> and <head> tage etc so it should work better on browsers):
<?php
require("./global.php");
$fid = "37"; // 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'];
$lastpostdate = mydate($settings['dateformat'], $item['dateline']);
$lastposttime = mydate($settings['timeformat'], $item['dateline']);
$time = $lastpostdate." ".$lastposttime;
?>
<html>
<head>
<title></title>
<style type="text/css">
<!--
.style3 {
color: #CCCCCC;
font-size: 9px;
font-family: Verdana;
font-weight: bold;
}
-->
</style>
</head>
<body style="background-color:transparent">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td><div align="left">
<li style="color:#999999" type="square"><a href="http://www.unprogged.com/showthread.php?tid=$tid" target="_parent" class="style3">$subject</a> ($time)</li>
</div></td>
</tr></table>
</body>
</html>
<?php
}
?>