|
|
![]() |
|
|
Top | #1 |
|
OSNN Veteran Addict
Joined: June 2002
Location: Amstelveen, The Netherlands
Posts: 2,846
Reputation: 120
Power: 151 |
im a complete php newbie, so please be very clear. Hope you guys can help me. |
|
|
|
|
|
Top | #2 |
|
The Last High
Joined: December 2001
Location: London
Posts: 18,510
Blog Entries: 51
Reputation: 3652
Power: 349 |
Make a new file or function with the foillowing content:
Code:
$recentforumget = 5; // Number of posts to get
$recentforumlength = 30; // Length of title to display before cutting off
$forumexclude = ""; // Add forum id's to exclude from get (eg private ones) sepetate by a comma
$getposts = query("SELECT tid,title,forum_id FROM ".$ibf_prefix."topics WHERE (state <> 'link')".iif($forumexclude," AND (forum_id NOT IN ($forumexclude))")." ORDER BY last_post DESC LIMIT $recentforumget");
while ($post = fetch_array($getposts)) {
$post[short_title] = iif(strlen($post[title]) > $recentforumlength,substr($post[title],0,$recentforumlength)."...",$post[title]);
$post[full_title] = $post[title];
$recentforumposts .= "<a href=\"$forumpath/index.php?act=ST&f=$post[forum_id]&t=$post[tid]\" title=\"$post[full_title]\">$post[short_title]</a><br />\n";
}
|
|
|
|
|
|
Top | #3 |
|
OSNN Veteran Addict
Joined: June 2002
Location: Amstelveen, The Netherlands
Posts: 2,846
Reputation: 120
Power: 151 |
hmmm.... :confused:
You have to help me a bit more. Where do i have to put this code. Im a extremely newbie i need everything i steps Thanks for helping me
|
|
|
|
|
|
Top | #4 |
|
NTFS Guru
Joined: January 2002
Location: Sweden
Posts: 4,006
Reputation: 890
Power: 175 |
Put the code anywhere (pretty much) inside <? ?> -tags.
Then at the place you want to print the links type in: <?=$recentforumposts?> |
|
|
|
|
|
Top | #5 |
|
OSNN Veteran Addict
Joined: June 2002
Location: Amstelveen, The Netherlands
Posts: 2,846
Reputation: 120
Power: 151 |
this is what i have now and it still not work, what am i doing wrong:
<? $recentforumget = 5; // Number of posts to get $recentforumlength = 30; // Length of title to display before cutting off $forumexclude = ""; // Add forum id's to exclude from get (eg private ones) sepetate by a comma $getposts = query("SELECT tid,title,forum_id FROM ".$ibf_prefix."topics WHERE (state <> 'link')".iif($forumexclude," AND (forum_id NOT IN ($forumexclude))")." ORDER BY last_post DESC LIMIT $recentforumget"); while ($post = fetch_array($getposts)) { $post[short_title] = iif(strlen($post[title]) > $recentforumlength,substr($pos t[title],0,$recentforumlength) ."...",$post[title]); $post[full_title] = $post[title]; $recentforumposts .= "<a href=\"$forumpath/index.php?act=ST&f=$post[forum_id]&t=$post[tid]\" title=\"$post[full_title]\">$post[short_title]</a><br />\n"; } ?> <?=$recentforumposts?> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Latest Artwork | ~bk | Graphic Design | 9 | August 18th, 2005 8:39pm |
| Latest WMP 9 Build.... | ThesiS | Windows Desktop Systems | 3 | November 6th, 2002 1:59am |
| Latest Microangelo? | renakuajo | Windows Desktop Systems | 3 | October 31st, 2002 4:43pm |
| My Latest Wallpapers... | Grandmaster | Desktop Customisation | 4 | August 15th, 2002 4:08am |
| "Latest 5 Posts" | BLEHg0d | Green Room | 4 | February 19th, 2002 8:20pm |