I want to make a plugin that shows it total amount of pages a member add to a site.
So far i have this but not workable, same as it shows the page_ownerid only instead of a name!
Can anyone help me on this?
<?PHP
/* ====================
Land Down Under - Website engine
Copyright Neocrome
http://www.neocrome.net
[BEGIN_SED]
File=plugins/tpposters/tpposters.php
Version=101
Updated=25-03-2006
Type=Plugin.admin
Author=Rayblo
Description=Shows a list of the top posters in pages
[END_SED]
[BEGIN_SED_EXTPLUGIN]
Description=Shows a list of the top posters in pages
Name=Top Posters in pages
Code=tpposters
File=tpposters
Hooks=index.tags
Tags=index.tpl:{PLUGIN_TPPOSTERS}
Minlevel=0
Order=10
Version=1.0
Date=2005/10/13
Author=rayblo
Copyright=
Notes=
SQL=
Auth_guests=R
Lock_guests=W12345A
Auth_members=R
Lock_members=12345
[END_SED_EXTPLUGIN]
[BEGIN_SED_EXTPLUGIN_CONFIG]
maxpost=01:select:0,1,2,3,4,5,6,7,8,9,10,15,20,25,30:5:Max Top Posters in pages
[END_SED_EXTPLUGIN_CONFIG]
==================== */
if (!defined('SED_CODE')) { sed_diefatal('Wrong URL.'); }
?>
<?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net
[BEGIN_SED]
File=plugins/tpposters/tpposters.php
Version=101
Updated=25-03-2006
Type=Plugin.admin
Author=Rayblo
Description=Shows a list of the top posters in pages
[END_SED]
[BEGIN_SED_EXTPLUGIN]
Code=tpposters
Part=main
File=tpposters
Hooks=index.tags
Tags=index.tpl:{PLUGIN_TPPOSTERS}
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]
==================== */
if ( !defined('SED_CODE') ) { die("Hacking attempt."); }
require("plugins/tpposters/lang/tpposters.".$usr['lang'].".lang.php");
if ($cfg['plugin']['tpposters']['maxpost']>0)
{ $limit = $cfg['plugin']['tpposters']['maxpost']; }
$sqltmps = sed_sql_query("SELECT page_ownerid, page_count, FROM $db_pages ORDER BY page_ownerid DESC LIMIT ".$limit." ");
$plugin_tppost = "<table><br>";
while ( $row = mysql_fetch_assoc($sqltmps) ){
$plugin_tppost .= "<tr>";
$plugin_tppost .= "<td>".sed_build_user($row['page_ownerid'], sed_cc(stripslashes($row['page_ownerid'])))."</td>";
$plugin_tppost .= "<td><strong>".$row['page_ownerid']."</strong> ".$L['user_postcount1']."</td>";
$plugin_tppost .= "</tr>";
}
$plugin_tppost .= "</table>";
$t-> assign(array(
"PLUGIN_TPPOSTERS" => $plugin_tppost));
?>