SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 23, 2012, 10:39:28 pm

Login with username, password and session length
Members
Total Members: 10070
Latest: pipattra
Stats
Total Posts: 28683
Total Topics: 4976
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 48
Total: 48
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: SMF Links TP/SSI function  (Read 3819 times)
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9676


View Profile
« on: December 01, 2006, 08:57:09 am »

Coded a quick TinyPortal / SSI function you can use to show recent links.

Code:
function ssi_links_recent()
{
global $scripturl,$db_prefix;

$dbresult = db_query("SELECT l.ID_LINK, l.rating, l.title,l.date, l.ID_MEMBER, l.description,l.hits FROM {$db_prefix}links AS l WHERE l.approved = 1 ORDER BY l.ID_LINK DESC LIMIT 5", __FILE__, __LINE__);
while($row = mysql_fetch_assoc($dbresult))
{

echo '<a href="' . $scripturl . '?action=links;sa=visit;id=' . $row['ID_LINK'] . '" target="blank">' . $row['title'] . '</a><br />';


}
echo '<br />';
echo '<a href="' . $scripturl . '?action=links;sa=addlink">Add Link</a>';

mysql_free_result($dbresult);
}
Logged
clintre
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #1 on: February 12, 2009, 04:55:20 pm »

Can we get an update to this for SMF 2.x?

Thanks
Logged
clintre
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: May 04, 2009, 04:08:15 pm »

Huh
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 05:17:53 pm]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]

[May 17, 2012, 12:38:16 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 4.752 seconds with 18 queries.