Lavalair Lost Post
Started on the old forum in March 2008 · view the original in the archive · old links redirect here
Can somebody help me? I need Last Post code for Home Page of forum. Like "last post in theme: ***** by user: ****" for Categories, I need general last post (for all forums,themes,clubs).
try it
$pinfo = mysql_fetch_array(mysql_query("SELECT uid, tid FROM ibwf_posts ORDER BY dtpost DESC LIMIT 0, 1"));
$nick = getnick_uid($pinfo[0]);
$tpclnk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$pinfo[1]&go=last\">$tlnm</a>";
$vulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$pinfo[0]\">$nick</a>";
echo "Last post: $tpclnk
Posted by: $vulnk
";
Ive seen this post somewhere here already.... Pls search the forum before creating a new topic ok?
External image (may be gone) WapCHAT Forum Currenltly changing over to xhtml External image (may be gone) My Dowloads Site External image (may be gone)
Ive seen this post somewhere here already.... Pls search the forum before creating a new topic ok?
External image (may be gone) WapCHAT Forum Currenltly changing over to xhtml External image (may be gone) My Dowloads Site External image (may be gone)
Ive seen this post somewhere here already.... Pls search the forum before creating a new topic ok?
And please hit the fast/add reply button just once
And please hit the fast/add reply button just once
ROFL
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
index lastpost included
include("lastpost.php");
$pic = mysql_fetch_array(mysql_query("SELECT uid, file FROM ibwf_gallery ORDER BY RAND() LIMIT 1"));
$user = getnick_uid($pic[0]);
echo "<p align=\"center\">";
echo "<small><a href=\"index.php?action=viewuser&who=$sql2[0]&sid=$sid\">$unick</a></small><br/>";
$lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY
lastpost DESC LIMIT 0,1"));
$nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts"));
if($nops[0]==0)
{
$pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics"));
$tluid = $pinfo[0];
}else{
$pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts ORDER BY dtpost
DESC LIMIT 0, 1"));
$tluid = $pinfo[0];
}
$tlnm = htmlspecialchars($lpt[1]);
$tlnick = getnick_uid($tluid);
$tpclnk = "<a
href=\"index.php?action=viewtpc&sid=$sid&tid=$lpt[0]&go=last\">$tlnm</a>";
$vulnk = "<a
href=\"index.php?action=viewuser&sid=$sid&who=$tluid\">$tlnick</a>";
hey i have this in my index.php in action=main
<?
$lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY lastpost DESC LIMIT 0,1"));
$nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts"));
if($nops[0]==0)
{
$pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics"));
$tluid = $pinfo[0];
}else{
$pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts ORDER BY dtpost DESC LIMIT 0, 1"));
$tluid = $pinfo[0];
}
$tlnm = htmlspecialchars($lpt[1]);
$format_link = ucwords(strtolower($tlnm));
$tpclnk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$lpt[0]&go=last\">$format_link</a>";
echo "Latest Post Is<br/> $tpclnk<br/><br/>";
?>
name this lastpost.php if you havent already got it and upload to your web folder try this it works on my friends site 🙂