Lavalair Lost Post

Started on the old forum in March 2008 · view the original in the archive · old links redirect here

7 replies · 825 views · started 18 years ago · 1 min read

6 participants
adeii Newbie · 8 posts #1

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).

rukiya Lead · 569 posts #2

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
";
metulj Super moderator Principal · 1,726 posts #6

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ノ刀ノイリ!

hyperlad Junior · 23 posts #7

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

hyperlad Junior · 23 posts #8
<?
     $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 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close