<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2007 The Nucleus Group
+ * Copyright (C) 2002-2009 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Functions to create lists of things inside the admin are
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2007 The Nucleus Group
- * @version $Id: showlist.php,v 1.6 2007-03-19 10:21:21 shizuki Exp $
- * @version $NucleusJP: showlist.php,v 1.4 2006/11/13 00:36:39 kimitake Exp $
+ * @copyright Copyright (C) 2002-2009 The Nucleus Group
+ * @version $Id$
+ * @version $NucleusJP: showlist.php,v 1.7.2.3 2007/12/03 00:01:48 kmorimatsu Exp $
*/
echo _LIST_PLUGS_VER, ' ' , htmlspecialchars($plug->getVersion()) , '<br />';
if ($plug->getURL())
echo '<a href="',htmlspecialchars($plug->getURL()),'" tabindex="'.$template['tabindex'].'">',_LIST_PLUGS_SITE,'</a><br />';
+// echo '<a href="',htmlspecialchars($plug->getURL()),'" tabindex="'.$template['tabindex'].'">'.htmlspecialchars(shorten($plug->getURL(), 25, '...')),'</a><br />';
echo '</td>';
echo '<td>';
echo _LIST_PLUGS_DESC .'<br/>'. encode_desc($plug->getDescription());
if (!$plug->subscribtionListIsUptodate()) {
echo '<br /><br /><strong>',_LIST_PLUG_SUBS_NEEDUPDATE,'</strong>';
}
- if (sizeof($plug->getPluginDep()) > 0)
+ if (sizeof($plug->getPluginDep()) > 0) {
echo '<br /><br />',_LIST_PLUGS_DEP,'<br />',htmlspecialchars(implode($plug->getPluginDep(),', '));
+ }
+// <add by shizuki>
+ // check dependency require
+ $req = array();
+ $res = sql_query('SELECT pfile FROM ' . sql_table('plugin'));
+ while($o = mysql_fetch_object($res)) {
+ $preq =& $manager->getPlugin($o->pfile);
+ if ($preq) {
+ $depList = $preq->getPluginDep();
+ foreach ($depList as $depName) {
+ if ($current->pfile == $depName) {
+ $req[] = $o->pfile;
+ }
+ }
+ }
+ }
+ if (count($req) > 0) {
+ echo '<h4 class="plugin_dependreq_title">' . _LIST_PLUGS_DEPREQ . "</h4>\n";
+ echo '<p class="plugin_dependreq_text">';
+ echo htmlspecialchars(implode(', ', $req), ENT_QUOTES);
+ echo "</p>\n";
+ }
+// </add by shizuki>
echo '</td>';
} else {
- echo '<td colspan="2">Error: plugin file <b>',htmlspecialchars($current->pfile),'.php</b> could not be loaded, or it has been set inactive because it does not support some features (check the <a href="?action=actionlog">actionlog</a> for more info)</td>';
+ echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, htmlspecialchars($current->pfile, ENT_QUOTES)) . '</td>';
}
- echo '<td>';
+ echo '<td style="white-space:nowrap">';
$baseUrl = 'index.php?plugid=' . intval($current->pid) . '&action=';
$url = $manager->addTicketToUrl($baseUrl . 'pluginup');
$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
// only if it is not a hidden option write the controls to the page
- if ($meta['access'] != 'hidden') {
+ if (@$meta['access'] != 'hidden') {
echo '<td>',htmlspecialchars($current['description']?$current['description']:$current['name']),'</td>';
echo '<td>';
switch($current['type']) {
case 'textarea':
//$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
echo '<textarea class="pluginoption" cols="30" rows="5" name="',htmlspecialchars($varname),'"';
- if ($meta['access'] == 'readonly') {
+ if (@$meta['access'] == 'readonly') {
echo ' readonly="readonly"';
}
echo '>',htmlspecialchars($current['value']),'</textarea>';
//$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
echo '<input type="text" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'"';
- if ($meta['datatype'] == 'numerical') {
+ if (@$meta['datatype'] == 'numerical') {
echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
}
- if ($meta['access'] == 'readonly') {
+ if (@$meta['access'] == 'readonly') {
echo ' readonly="readonly"';
}
echo ' />';
}
- echo $current['extra'];
+ echo @$current['extra'];
echo '</td>';
}
}
$current->ibody = strip_tags($current->ibody);
$current->ibody = htmlspecialchars(shorten($current->ibody,300,'...'));
+ $COMMENTS = new COMMENTS($current->inumber);
echo "$current->ibody</td>";
echo "<td style=\"white-space:nowrap\" $cssclass>";
echo "<a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a>";
- echo "<br /><a href='index.php?action=itemcommentlist&itemid=$current->inumber'>"._LISTS_COMMENTS."</a>";
+ // evaluate amount of comments for the item
+ $camount = $COMMENTS->amountComments();
+ if ($camount>0) {
+ echo "<br /><a href='index.php?action=itemcommentlist&itemid=$current->inumber'>";
+ echo "( " . sprintf(_LIST_ITEM_COMMENTS, $COMMENTS->amountComments())." )</a>";
+ }
+ else {
+ echo "<br />"._LIST_ITEM_NOCONTENT;
+ }
echo "<br /><a href='index.php?action=itemmove&itemid=$current->inumber'>"._LISTS_MOVE."</a>";
echo "<br /><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a>";
echo "</td>";
function listplug_table_shortblognames($template, $type) {
switch($type) {
case 'HEAD':
- echo "<th>" . _NAME . "</th><th>" . _NAME. "</th>";
+ echo "<th>" . _EBLOG_SHORTNAME . "</th><th>" . _EBLOG_NAME. "</th>";
break;
case 'BODY':
$current = $template['current'];
$hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
if ($hasEnlargement)
- echo '<a href="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview-large.png" title="View larger">';
+ echo '<a href="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . '">';
- echo '<img class="skinpreview" src="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview.png" width="100" height="75" alt="Preview for \'',htmlspecialchars($current->sdname),'\' skin" />';
+ $imgAlt = sprintf(_LIST_SKIN_PREVIEW, htmlspecialchars($current->sdname, ENT_QUOTES));
+ echo '<img class="skinpreview" src="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview.png" width="100" height="75" alt="' . $imgAlt . '" />';
if ($hasEnlargement)
echo '</a>';
if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html'))
{
- echo '<br /><a href="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'readme.html" title="More info on the \'',htmlspecialchars($current->sdname),'\' skin">Readme</a>';
+ $url = $CONF['SkinsURL'] . htmlspecialchars($current->sdincpref, ENT_QUOTES) . 'readme.html';
+ $readmeTitle = sprintf(_LIST_SKIN_README, htmlspecialchars($current->sdname, ENT_QUOTES));
+ echo '<br /><a href="' . $url . '" title="' . $readmeTitle . '">' . _LIST_SKIN_README_TXT . '</a>';
}
echo "</td>";
- echo "<td>" , htmlspecialchars($current->sddesc);
+ echo '<td class="availableSkinTypes">' . htmlspecialchars($current->sddesc);
// show list of defined parts
$r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber . ' ORDER BY stype');
$types = array();
}
}
-?>
\ No newline at end of file
+?>