Antar |
|
---|---|
Here's the code
[spoiler] <?PHP /* ==================== Seditio - Website engine Copyright Neocrome http://www.neocrome.net [BEGIN_SED] File=plugins/userpages/userpages.php Version=100 Updated=2006-jan-01 Type=Plugin Author=Neocrome Description= [END_SED] [BEGIN_SED_EXTPLUGIN] Code=userpages Part=main File=userpages Hooks=users.details.tags Tags=users.details.tpl:{USERS_DETAILS_USERPAGES} Minlevel=0 Order=10 [END_SED_EXTPLUGIN] ==================== */ if ( !defined('SED_CODE') ) { die("Hacking attempt."); } /* ============ MASKS FOR THE HTML OUTPUT =========== */ $mask = "%3\$s : %1\$s"." ".$cfg['separator']." "."%2\$s"."<br />"; // %1\$s = Link to the category // %2\$s = Link to the page // %3\$s = Date /* ====================== */ if (!empty($urr['user_name'])) { $ps = sed_import('ps','G','ALP'); if ($ps=='cat') { $sql = sed_sql_query("SELECT page_id, page_cat, page_title, page_date FROM $db_pages WHERE page_state=0 AND page_cat NOT LIKE 'system' AND page_ownerid='".$urr['user_id']."' ORDER by page_cat ASC", "Plugins"); } else { $sql = sed_sql_query("SELECT page_id, page_cat, page_title, page_date FROM $db_pages WHERE page_state=0 AND page_cat NOT LIKE 'system' AND page_ownerid='".$urr['user_id']."' ORDER by page_date DESC", "Plugins"); } while ($row = sed_sql_fetcharray($sql)) { $userpages .= (sed_auth('page', $row['page_cat'], 'R')) ? sprintf($mask, "<a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a>", "<a href=\"page.php?id=".$row['page_id']."\">".sed_cc(sed_cutstring(stripslashes($row['page_title']),48))."</a>", date($cfg['formatyearmonthday'], $row['page_date'] + $usr['timezone'] * 3600) ) : ''; } if (empty($userpages)) { $userpages = $L['None']; } elseif (sed_sql_numrows($sql)>2) { $userpages_head = "[<a href=\"users.php?m=details&id=".$urr['user_id']."\">Sort by date</a>]"; $userpages_head .= " [<a href=\"users.php?m=details&id=".$urr['user_id']."&ps=cat\">Sort by category</a>]"."<br /> <br />"; } $userpages = $userpages_head . $userpages; $t->assign(array( "USERS_DETAILS_USERPAGES" => $userpages )); } ?>[/spoiler] Could someone help modifying it, so it will show specified number of last pages, and not all? Some ppl have 1000+ submitted pages, and it causes troubles. |
Trustmaster |
|
---|---|
Can be easily done with sed_pagination() function and some GET variable (default is 'd').
May the Source be with you!
|
Antar |
|
---|---|
Not so easy for me.
Paginated- it's the ultimate update, but even show only last x pages as option will aslo be good. I'm not asking you (i know you're quite bisy), but if someone can find the time to make the change, please do :) |
Lombi |
|
---|---|
Actually the whole user details display needs changing. Cotonti will get myspace/facebook-like friends, viewcounter, recent user views of the profile, paginated commenting...
So it's gonna be Seditio 4.8 basically :) <a href="http://www.domenlo.com">Surreal Art</a>
|