Kingsley |
|
---|---|
dudes.. I know it is a very old plug-in, but seeing there is nothing that can replace it, I still use it. However I have one small problem with it, which I can't seem to find.
Somehow there is an extra title above the page, which I can't remove, example: http://www.killbox1alpha.nl/plug.php?e=whatsnew Can some-one please check and see if I really do need a seeing eye dog? thx in advance..
these are the files of the plug-in:
whatsnew.setup.php <?PHP /* ==================== Seditio - Website engine Copyright Neocrome http://www.neocrome.net [BEGIN_SED] File=plugins/whatsnew/whatsnew.setup.php Version=100 Updated=2006-jan-24 Type=Plugin Author=Neocrome Description= [END_SED] [BEGIN_SED_EXTPLUGIN] Code=whatsnew Name=What's new Description=Recent things Version=100 Date=2006-jan-24 Author=Neocrome Copyright= Notes= SQL= Auth_guests=R Lock_guests=W12345A Auth_members=R Lock_members=W12345A [END_SED_EXTPLUGIN] [BEGIN_SED_EXTPLUGIN_CONFIG] maxlines=01:select:0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,40,50,100:10:Max lines per list [END_SED_EXTPLUGIN_CONFIG] ==================== */ if (!defined('SED_CODE')) { die('Wrong URL.'); } ?> whatsnew.php: <?PHP /* ==================== Seditio - Website engine Copyright Neocrome http://www.neocrome.net [BEGIN_SED] File=plugins/whatsnew/whatsnew.php Version=100 Updated=2006-jan-24 Type=Plugin Author=Neocrome Description= [END_SED] [BEGIN_SED_EXTPLUGIN] Code=whatsnew Part=main File=whatsnew Hooks=standalone Tags= Minlevel=0 Order=10 [END_SED_EXTPLUGIN] ==================== */ if (!defined('SED_CODE')) { die('Wrong URL.'); } // Recent pages $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' ORDER by page_date DESC LIMIT ".$cfg['plugin']['whatsnew']['maxlines']); $plugin_body .= "<div id=\"main\">"; $plugin_body .= "<div class=\"mbox-outer\">"; $plugin_body .= "<div class=\"mbox\">"; $plugin_body .= "<h2>".$L['plu_title']."</h2>"; $plugin_body .= "<div class=\"content\">"; $plugin_body .= "<h3 class=\"coltop1\" style=\"border:0; padding-left:20px; padding-top:15px; width:916px; height: 30px; margin-bottom:0px; margin-left:1px;\">".$L['plu_title_pages']."</h3>"; $plugin_body .= "<table class=\"cells\"><tr>"; $plugin_body .= "<td style=\"width:40%;\" class=\"coltop\">".$L['Page']."</td>"; $plugin_body .= "<td style=\"width:25%;\" class=\"coltop\">".$L['Category']."</td>"; $plugin_body .= "<td style=\"width:35%;\" class=\"coltop\" colspan=\"2\">".$L['Updated']."</td></tr>"; $ii = 1; while ($row = sed_sql_fetcharray($sql)) { if (sed_auth('page', $row['page_cat'], 'R')) { $plugin_body .= "<tr><td><a href=\"page.php?id=".$row['page_id']."\">".sed_cc($row['page_title'])."</a></td>"; $plugin_body .= "<td><a href=\"list.php?c=".$row['page_cat']."\">".$sed_cat[$row['page_cat']]['title']."</a></td>"; $plugin_body .= "<td style=\"text-align:center;\">".date($cfg['dateformat'], $row['page_date'] + $usr['timezone'] * 3600)."</td>"; $plugin_body .= "<td style=\"text-align:center;\">".sed_build_timegap($row['page_date'], $sys['now_offset'])."</td></tr>"; $ii++; } } $plugin_body .= "</table>"; // Recent posts $plugin_body .= "<h3 class=\"coltop1\" style=\"border:0; padding-left:20px; padding-top:15px; width:916px; height: 30px; margin-bottom:0px; margin-left:1px;\">".$L['plu_title_posts']."</h3>"; $plugin_body .= "<table class=\"cells\">"; $plugin_body .= "<td style=\"width:60%;\" class=\"coltop\">".$L['Section']." / ".$L['Topic']."</td>"; $plugin_body .= "<td style=\"width:5%;\" class=\"coltop\">".$L['Posts']."</td>"; $plugin_body .= "<td style=\"width:15%;\" class=\"coltop\">".$L['Author']."</td>"; $plugin_body .= "<td style=\"width:20%;\" class=\"coltop\">".$L['Updated']."</td></tr>"; $sql = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, s.fs_id, s.fs_title, u.user_id, u.user_name FROM $db_forum_topics t, $db_forum_sections s, $db_users u WHERE t.ft_lastposterid=u.user_id AND t.ft_sectionid=s.fs_id AND t.ft_movedto=0 ORDER by t.ft_updated DESC LIMIT ".$cfg['plugin']['whatsnew']['maxlines']); while ($row = sed_sql_fetcharray($sql)) { if (sed_auth('forums', $row['fs_id'], 'R')) { $img = ($usr['id']>0 && $row['ft_updated']>$usr['lastvisit']) ? "<a href=\"forums.php?m=posts&q=".$row['ft_id']."&n=unread#unread\"><img src=\"skins/$skin/img/system/arrow-unread.gif\" alt=\"\" /></a>" : "<a href=\"forums.php?m=posts&q=".$row['ft_id']."&n=last#bottom\"><img src=\"skins/$skin/img/system/arrow-follow.gif\" alt=\"\" /></a> "; $plugin_body .= "<tr><td>"."<a href=\"forums.php?m=topics&s=".$row['fs_id']."\">".sed_cutstring(stripslashes($row['fs_title']),32)."</a> "; $plugin_body .= $cfg['separator']." <a href=\"forums.php?m=posts&q=".$row['ft_id']."&n=last#bottom\">".sed_cc(sed_cutstring(stripslashes($row['ft_title']),40))."</a></td>"; $plugin_body .= "<td style=\"text-align:center;\">".$row['ft_postcount']."</td>"; $plugin_body .= "<td style=\"text-align:center;\">".sed_build_user($row['user_id'], sed_cc($row['user_name']))."</td>"; $plugin_body .= "<td style=\"text-align:center;\">".sed_build_timegap($row['ft_updated'], $sys['now_offset'])."</td></tr>"; } } $plugin_body .= "</table>"; // Recent comments $sql = sed_sql_query("SELECT c.com_code, c.com_author, c.com_authorid, c.com_date, p.page_title, p.page_cat FROM $db_com as c LEFT JOIN $db_pages as p ON CONCAT('p', p.page_id)=c.com_code WHERE com_isspecial=0 ORDER by com_date DESC LIMIT ".$cfg['plugin']['whatsnew']['maxlines']); $plugin_body .= "<h3 class=\"coltop1\" style=\"border:0; padding-left:20px; padding-top:15px; width:916px; height: 30px; margin-bottom:0px; margin-left:1px;\">".$L['plu_title_comments']."</h3>"; $plugin_body .= "<table class=\"cells\">"; $plugin_body .= "<td class=\"coltop\">".$L['Page']."</td>"; $plugin_body .= "<td class=\"coltop\">".$L['Category']."</td>"; $plugin_body .= "<td class=\"coltop\">".$L['Author']."</td>"; $plugin_body .= "<td class=\"coltop\" colspan=\"2\">".$L['Updated']."</td></tr>"; $ii = 1; while ($row = sed_sql_fetcharray($sql)) { $com_code = $row['com_code']; $j = substr($com_code, 0, 1); $k = substr($com_code, 1); switch($j) { case 'p': $lnk = "<a href=\"page.php?id=$k&comments=1\">".stripslashes($row['page_title'])."</a>"; $lnk2 = sed_build_catpath($row['page_cat'], "<a href=\"list.php?c=%1\$s\">%2\$s</a>"); break; default: $lnk = "<a href=\"index.php\">?</a>"; $lnk2 = "<a href=\"index.php\">?</a>"; break; } $plugin_body .= "<tr><td>".$lnk."</a></td><td>".$lnk2."</a></td>"; $plugin_body .= "<td>".sed_build_user($row['com_authorid'], sed_cc($row['com_author']))."</a></td>"; $plugin_body .= "<td style=\"text-align:center;\">".date($cfg['dateformat'], $row['com_date'] + $usr['timezone'] * 3600)."</a></td>"; $plugin_body .= "<td style=\"text-align:center;\">".sed_build_timegap($row['com_date'], $sys['now_offset'])."</td></tr>"; } $plugin_body .= "</table>"; // Recent users $sql = sed_sql_query("SELECT user_name, user_id, user_country, user_regdate FROM $db_users WHERE user_maingrp>1 ORDER by user_regdate DESC LIMIT ".$cfg['plugin']['whatsnew']['maxlines']); $plugin_body .= "<h3 class=\"coltop1\" style=\"border:0; padding-left:20px; padding-top:15px; width:916px; height: 30px; margin-bottom:0px; margin-left:1px;;\">".$L['plu_title_users']."</h3>"; $plugin_body .= "<table class=\"cells\">"; $plugin_body .= "<td style=\"width:25%;\" class=\"coltop\">".$L['User']."</td>"; $plugin_body .= "<td style=\"width:25%;\" class=\"coltop\">".$L['Country']."</td>"; $plugin_body .= "<td style=\"width:50%;\" class=\"coltop\" colspan=\"2\">".$L['Registered']."</td></tr>"; while ($row = sed_sql_fetcharray($sql)) { $plugin_body .= "<tr><td>".sed_build_user($row['user_id'], sed_cc(stripslashes($row['user_name'])))."</td>"; $plugin_body .= "<td>".sed_build_flag($row['user_country'])." "; $plugin_body .= sed_build_country($row['user_country'])."</td>"; $plugin_body .= "<td style=\"text-align:center;\">".date($cfg['dateformat'], $row['user_regdate'] + $usr['timezone'] * 3600)."</a></td>"; $plugin_body .= "<td style=\"text-align:center;\">".sed_build_timegap($row['user_regdate'], $sys['now_offset'])."</td></tr>"; } $plugin_body .= "</table>"; $plugin_body .= "</div>"; $plugin_body .= "</div>"; $plugin_body .= "</div>"; $plugin_body .= "</div>"; ?> |