To use this website completely, it is necessary to store cookies on your computer.
 

* Navigator

Expand - Collapse

* Statistic

  • *Total Posts: 16403
  • *Total Topics: 2518
  • *Online Today: 8
  • *Most Online: 292
(12. Nov 2016, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 1
  • *Total: 1

  • *Yahoo!

SMF Links Directory Block

Started by NIBOGO, 17. Jul 2010, 01:10:09

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

Go Down

NIBOGO

17. Jul 2010, 01:10:09
SMF 2.0 Block for SMF Links Directory

Horizontal:


Code Select
global $smcFunc, $scripturl;

echo'Recent Links:<br />';

$dbresult = $smcFunc['db_query']('', '
   SELECT id_link, name, url
   FROM {db_prefix}links
   ORDER BY id_link DESC
   LIMIT 5');
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
   echo'<a href="'.$scripturl.'?action=links;sa=details;lid='.$row['id_link'].'"><img src="http://open.thumbshots.org/image.aspx?url='.$row['url'].'" alt="'.$row['name'].'" /><br />'.$row['name'].'</a>';
}
$smcFunc['db_free_result']($dbresult);



Vertical:


Code Select
global $smcFunc, $scripturl;

echo'Recent Links:<br />';

$dbresult = $smcFunc['db_query']('', '
   SELECT id_link, name, url
   FROM {db_prefix}links
   ORDER BY id_link DESC
   LIMIT 5');
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
   echo'<a href="'.$scripturl.'?action=links;sa=details;lid='.$row['id_link'].'"><img src="http://open.thumbshots.org/image.aspx?url='.$row['url'].'" alt="'.$row['name'].'" /><br />'.$row['name'].'</a><br />';
}
$smcFunc['db_free_result']($dbresult);

jarska

#1
28. Sep 2010, 13:14:13
Hello,

I`m new here and dont understand where do I put that code? :-[

spoogs

#2
28. Sep 2010, 16:49:31
Custom php, block

DirtRider

#3
28. Sep 2010, 18:20:51
Looks like you need to purchase the mod first
"The real question is not whether machines think but whether men do. "


jarska

#4
04. Oct 2010, 21:44:58
Okay, now I understand, thank you.

NIBOGO

#5
29. Jul 2011, 06:24:59
Yes, you must have that mod installed first and then you must insert the code in a PHP Block

lemontwist

#6
02. Feb 2012, 17:49:08
Great block!  Is there a way to just have link names listed in the blocks and not the webshot?

Go Up