Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   Last forum post (http://www.bvlist.com/showthread.php?t=5241)

Edgein 25th August 2010 10:56

Add in index where you want

PHP Code:

///////////////////////////////////////////////// LAST X FORUM POSTS

    
print("<table id=torrenttable border=1 cellspacing=0 cellpadding=5><tr>".
  
"<td class=tabletitle align=left>Topic Title</td>".
  
"<td class=tabletitle align=left>Posts</td>".
  
"<td class=tabletitle align=left>Views</td>".
  
"<td class=tabletitle align=left>Author</td>".
  
"<td class=tabletitle align=left>Last Post</td>".
  
"</tr>");

  
$res mysql_query("SELECT posts.id AS pid, posts.topicid, posts.userid AS userpost, posts.added, topics.id AS tid, topics.userid AS usertopic, topics.subject, topics.forumid, topics.lastpost, topics.views, forums.name, forums.minclassread, forums.postcount, users.username, topicposter.username AS tusername
  FROM posts, topics, forums, users, users AS topicposter
  WHERE posts.topicid = topics.id AND topics.forumid = forums.id AND posts.userid = users.id AND topics.userid = topicposter.id AND minclassread <=" 
$CURUSER["class"] . "
  ORDER  BY posts.added DESC 
  LIMIT 5"
);

  while (
$postsx mysql_fetch_assoc($res))
  {
  
  print(
"<tr><td><a href=\"forums.php?action=viewtopic&topicid={$postsx["tid"]}&page=p{$postsx["pid"]}#{$postsx["pid"]}\"><b>{$postsx["subject"]}</b></a>in <a href=\"forums.php?action=viewforum&forumid={$postsx["forumid"]}\">{$postsx["name"]}</a></td>".
  
"<td align='right'>{$postsx["postcount"]}</td>".
  
"<td align='right'>{$postsx["views"]}</td>".
  
"<td><a href=userdetails.php?id={$postsx["usertopic"]}><b>{$postsx["tusername"]}</b></a></td>".
  
"<td>{$postsx["added"]}by <a href=userdetails.php?id={$postsx["userpost"]}><b>{$postsx["username"]}</b></a></td></tr>");
  
  }
print(
"</table>");
///////////////////////////////////////////////// END LAST X FORUM POSTS 


nicukent 6th November 2011 14:56

Reply your post
 
Incomplete columns,look:

Here is ok:


HTML Code:

"<td class=tabletitle align=left>Topic Title</td>".
  "<td class=tabletitle align=left>Posts</td>".
  "<td class=tabletitle align=left>Views</td>".
  "<td class=tabletitle align=left>Author</td>".
  "<td class=tabletitle align=left>Last Post</td>".


but here is not ok:

PHP Code:

print("<tr><td><a href=\"forums.php?action=viewtopic&topicid={$postsx["tid"]}&page=p{$postsx["pid"]}#{$postsx["pid"]}\"><b>{$postsx["subject"]}</b></a>in <a href=\"forums.php?action=viewforum&forumid={$postsx["forumid"]}\">{$postsx["name"]}</a></td>".
  
"<td align='right'>{$postsx["postcount"]}</td>".
  
"<td align='right'>{$postsx["views"]}</td>".
  
"<td><a href=userdetails.php?id={$postsx["usertopic"]}><b>{$postsx["tusername"]}</b></a></td>".
  
"<td>{$postsx["added"]}by <a href=userdetails.php?id={$postsx["userpost"]}><b>{$postsx["username"]}</b></a></td></tr>"); 

Last post mising.......

:muscle::muscle::muscle:


All times are GMT +2. The time now is 21:32.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.