Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 25th August 2010, 10:56
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Default
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><br />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"]}<br />by <a href=userdetails.php?id={$postsx["userpost"]}><b>{$postsx["username"]}</b></a></td></tr>");
  
  }
print(
"</table>");
///////////////////////////////////////////////// END LAST X FORUM POSTS 
Reply With Quote
The Following 5 Users Say Thank You to Edgein For This Useful Post:
Fynnon (27th September 2010), MRxp (24th May 2013), nicukent (6th November 2011), Security (25th August 2011), Tibys08 (29th May 2011)
  #2  
Old 6th November 2011, 14:56
nicukent nicukent is offline
Senior Member
 
Join Date: Sep 2009
P2P
Posts: 40
Default 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><br />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"]}<br />by <a href=userdetails.php?id={$postsx["userpost"]}><b>{$postsx["username"]}</b></a></td></tr>"); 
Last post mising.......


Last edited by joeroberts; 6th November 2011 at 15:14. Reason: Please use code tags
Reply With Quote
Reply

Tags
forum , post

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 14:55. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.