Welcome to Geeklog, Anonymous Tuesday, May 07 2024 @ 05:37 pm EDT

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 !! Mr. Green
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I wrote one, if you don't mind it being in German Wink

bye, Dirk
 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 itWink

Greetings!! Mr. Green
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
 Quote

Status: offline

koalasoft

Forum User
Full Member
Registered: 03/09/05
Posts: 242
Location:Mexico
and top news in block ? Neutral
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
 Quote

Status: offline

lokki

Forum User
Chatty
Registered: 03/19/05
Posts: 59
Do you mean a block to show N last news?
 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 !! Mr. Green

**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
 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 Big Celebration

Text Formatted Code
//shows a block with $num top stories
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
 Quote

Status: offline

koalasoft

Forum User
Full Member
Registered: 03/09/05
Posts: 242
Location:Mexico
Thank's ...working !!!

Grettings !! Mr. Green
**Cuando el Alumno esta listo, el Maestro Aparece **
::Geeklog support in Spanish::
 Quote

All times are EDT. The time is now 05:37 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