Current time: 05-24-2012, 11:28 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Latest Threads On We Website
03-14-2012, 01:32 AM (This post was last modified: 03-14-2012 01:54 AM by cwindham.)
Post: #1
Latest Threads On We Website
I think this is the right place but I am looking for codes to implement on my website from my forums. The one I am looking for now is a "Latest Threads" code so I can display it on the main page of my website, not my forums index.

Thanks
Ok I was able to find a code to implement this but I need some help on limiting the chracters of the title of the thread. Here is the code

<?php
define("IN_MYBB", 1);
require_once("./global.php"); // Change this if needed
$tlimit = 5; // How many titles you want

$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads ORDER BY `tid` DESC LIMIT $tlimit");
while($fetch = $db->fetch_array($query)){
echo '<a href="./showthread.php?tid='.$fetch['tid'].'">'.$fetch['subject'].'</a><br />' . "\n";
}
?>
Find all posts by this user
Quote this message in a reply
03-14-2012, 02:01 AM
Post: #2
RE: Latest Threads On We Website
You should be able to use the substr method on the title.

[Image: logo.png]
(04-05-2012 07:42 AM)Tomm M Wrote:  As for the second, can you explain in a bit more detail? I have no idea what 'Haddvha' is.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-14-2012, 02:13 AM (This post was last modified: 03-14-2012 07:38 AM by cwindham.)
Post: #3
RE: Latest Threads On We Website
Unfortunately I do not know php, maybe you can assist on code? Just one more thing, what would the code be for "posted by: member"?

Thanks
I was able to go thru some other code and I got my posted by. But its pulling from all the forums. Is there a code to specify which forums to pull from?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication