Article Written By: Admin
Create a new Block called TopAuthors or what name you prefer.
Set up as UNIVERSAL
In the HTML part put the code below
andlt;h4andgt;Most Active Authorsandlt;/h4andgt;
andlt;ulandgt; {section name=$this-andgt;iandnbsp; loop=$this-andgt;authors} andlt;liandgt;{$this-andgt;i|inc} - andlt;a href=andquot;{$this-andgt;authors[$this-andgt;i]['profile_url']}andquot;andgt; {$this-andgt;authors[$this-andgt;i]['user_name']}andlt;/aandgt; - Articles Published: {$this-andgt;authors[$this-andgt;i]['user_articlecount']} andlt;/liandgt; {/section} andlt;/ulandgt;andnbsp;
Then in the PHP part add the code below
$q = $this-andgt;db-andgt;query(andquot;SELECT * FROM {$this-andgt;pre}users WHERE user_idandgt;1 ORDER BY user_articlecount DESC LIMIT 6andquot;);
$this-andgt;authors = array(); while ($row = $this-andgt;db-andgt;nqfetch($q)){ andnbsp; $this-andgt;authors[] = $row; andnbsp; $name = $row['user_name']; andnbsp; if (strlen($name) andgt; 15){ andnbsp;andnbsp;andnbsp; $this-andgt;authors[sizeof($this-andgt;authors)-1]['user_name'] = substr($name,0,13).'..'; andnbsp; } andnbsp; $this-andgt;_getUser($row,$this-andgt;blou); andnbsp; $this-andgt;authors[sizeof($this-andgt;authors)-1]['profile_url'] = $this-andgt;blou-andgt;url_profile; }I have also another version that i'm customizing to show up also the avatar, but it's still in development.
Come back here in the next few days to see the new version .
Admin Blooobs at ArticleMs Forum
This Article Has Been Published on Wed, 28 May 2008 and Read 1903 Times