Advanced Search  :  Site Statistics  :  Directory  :  Web Resources  :  Forum  
    Plugins for Geeklog Geeklog Plugins    
 Welcome to Plugins for Geeklog
 Saturday, May 17 2008 @ 07:09 AM EDT

Links Block

   
Blocks

I've created a Links Block. I've used a number of different types of blogs in the past and all of them have had built in functionality to add links to your mainpage.. geeklog doesn't have that for some reason, so here is a block that adds that functionality. I don't know PHP or MySQL but I managed to get it all working perfectly for me, but you may want to go over my code before using it yourself..

http://www.mottie.com/tmp/linksblock.txt

 

What's Related

Story Options

Links Block | 7 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Links Block
Authored by: anonymous on Sunday, April 24 2005 @ 05:56 AM EDT
I' added a little variation with updating of PORTAL hits ;) :
--------------
function phpblock_LinksPage()
{
global $_TABLES, $_CONF, $LANG10;
$result = DB_query("SELECT DISTINCT category from {$_TABLES['links']} WHERE category > '' ORDER BY category DESC");
$nrows = DB_numRows($result);
if ($nrows > 0 )
{
for ($i = 1; $i <= $nrows; $i++)
{
$A = DB_fetchArray($result);
$cat = addslashes ($A['category']);
$result1 = DB_query ("SELECT count(*) AS count FROM {$_TABLES['links']} WHERE category = '{$cat}'");
$D = DB_fetchArray($result1);
$retval .='<b><u>' . $A['category'] . '</u></b><br>';
$titles = DB_query("select DISTINCT title,url,hits,lid from {$_TABLES['links']} WHERE category = '{$cat}' ORDER by title");
$ntitles= DB_numRows($titles);
if ($ntitles > 0)
{
for ($j = 1; $j <= $ntitles; $j++)
{
$B = DB_fetchArray($titles);
$title = addslashes ($B['title']);
$url = addslashes ($B['url']);

$retval .='<a href="/portal.php?what=link&amp;item=' . $B['lid'] . '" target="_new">' . $B['title'] .'</a>&nbsp<br>';


// $retval .= ''. $B['title'] . '<br>';
// $retval .= 'URL ='. $url . '<br>';
}
}
$retval .= '<br>';
}
} else {
$retval .= $LANG10[21];
}
return $retval;
}
--------

  • Links Block - Authored by: anonymous on Thursday, June 02 2005 @ 07:35 AM EDT
  • Links Block - Authored by: anonymous on Tuesday, June 07 2005 @ 06:45 PM EDT
  • Links Block - Authored by: anonymous on Thursday, July 21 2005 @ 01:43 PM EDT
  • Links Block - Authored by: anonymous on Tuesday, July 26 2005 @ 06:09 PM EDT
 Copyright © 2008 Plugins for Geeklog
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.16 seconds