Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 03:44 pm EST
Geeklog Forums
top download for filemgmt in block
Status: offline
koalasoft
Forum User
Full Member
Registered: 03/09/05
Posts: 242
Location:Mexico
Hi ...
in english
How it is called and where I can obtain plugin or I cosay so that it shows to me in blocke that archives but have been unloaded of my filemgmt?
in spanish
Cómo se llama y donde puedo conseguir un plugin o codigo para que me muestre en un blocke que archivos han sido los mas descargados de mi filemgmt ?
Saludos !!
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
in english
How it is called and where I can obtain plugin or I cosay so that it shows to me in blocke that archives but have been unloaded of my filemgmt?
in spanish
Cómo se llama y donde puedo conseguir un plugin o codigo para que me muestre en un blocke que archivos han sido los mas descargados de mi filemgmt ?
Saludos !!
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
3
4
Quote
Status: offline
koalasoft
Forum User
Full Member
Registered: 03/09/05
Posts: 242
Location:Mexico
Dirk. thanks. daptare and hara its translation to the Spanish. despues say to me where to send it to share it
Greetings!!
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
Greetings!!
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
3
3
Quote
Status: offline
koalasoft
Forum User
Full Member
Registered: 03/09/05
Posts: 242
Location:Mexico
Do you mean a block to show N last news?
in english ...
no, I talk about to have block that shows the leidas news but in the site, top 10 of the news for example.
in spanish ...
no, me refiero a tener un block que muestre las noticias mas leidas en el sitio, un top 10 de noticias por ejemplo.
Saludos !!
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
5
3
Quote
Status: offline
lokki
Forum User
Chatty
Registered: 03/19/05
Posts: 59
I think this can help you. It's very amateur and simple, doesn't check permisions, but does show N top news
function phpblock_topnews()
{
global $_CONF, $_TABLES;
$retval = '';
$num = 10; //number of top stories to show
$sql = "SELECT sid,hits,title FROM {$_TABLES['stories']} ORDER BY hits DESC LIMIT ".$num;
$result = DB_query ($sql);
$stories = DB_numRows ($result);
if($stories < $num)
{
$num = $stories;
}
if($num > 0)
{
$retval .= '<ul>'.LB;
for($i = 0; $i < $num; $i++)
{
$story = DB_fetchArray($result);
$retval .= '<li><a href="'.$_CONF['site_url'].'/article.php?story='.$story['sid'].'">'.$story['title'].'</a> ('.$story['hits'].')</li>'.LB;
}
}
else
{
$retval .= "There are no stories in the system<br>";
}
return $retval;
}
just put this code in the end of /path/to/geeklog/system/lib-custom.php and create a PHP block putiing this function's name into the appropriate field
Text Formatted Code
//shows a block with $num top storiesfunction phpblock_topnews()
{
global $_CONF, $_TABLES;
$retval = '';
$num = 10; //number of top stories to show
$sql = "SELECT sid,hits,title FROM {$_TABLES['stories']} ORDER BY hits DESC LIMIT ".$num;
$result = DB_query ($sql);
$stories = DB_numRows ($result);
if($stories < $num)
{
$num = $stories;
}
if($num > 0)
{
$retval .= '<ul>'.LB;
for($i = 0; $i < $num; $i++)
{
$story = DB_fetchArray($result);
$retval .= '<li><a href="'.$_CONF['site_url'].'/article.php?story='.$story['sid'].'">'.$story['title'].'</a> ('.$story['hits'].')</li>'.LB;
}
}
else
{
$retval .= "There are no stories in the system<br>";
}
return $retval;
}
just put this code in the end of /path/to/geeklog/system/lib-custom.php and create a PHP block putiing this function's name into the appropriate field
3
5
Quote
All times are EST. The time is now 03:44 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content