AllBestArticles.com AllBestArticles.com AllBestArticles.com Services Blog AllBestArticles.com Write Articles AllBestArticles.com Videos AllBestArticles.com RSS AllBestArticles.com News AllBestArticles.com Sitemap
   

Most Active Authors Block


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 .


About the Author

Admin    Blooobs at    ArticleMs Forum





You Can Link Directly to "Most Active Authors Block" by using the url:
http://www.allbestarticles.com//articlems/most-active-authors-block.html

This Article Has Been Published on Wed, 28 May 2008 and Read 1903 Times


Find All Best Articles at http://www.allbestarticles.com








Rating: 5.0



Comments

No comments posted.

Add Comment

You do not have permission to comment. If you log in, you may be able to comment.

Related information on ArticleMs - How To Start And Use AMS

Top Authors Block: How To
How To Upgrade ArticleMs 1.3 Skin to ArticleMs 2.0
Top Authors Block for ArticleMs 2.0
The most famous Article Directory Script ArticleMs 2.0 - Beta 1 released
How To Install a New Skin
Most Active Authors Block
ArticleMs Default Skin: display third column only in some pages
ArticleMs Default Skin: add the third column