|
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"; } ?> |
|||
|
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.
![]() (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. |
|||
|
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? |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help




![[Image: logo.png]](http://gamervoid.com/images/dark/ice/logo.png)
