From: <be...@us...> - 2012-02-05 19:31:48
|
Revision: 8884 http://xoops.svn.sourceforge.net/xoops/?rev=8884&view=rev Author: beckmi Date: 2012-02-05 19:31:41 +0000 (Sun, 05 Feb 2012) Log Message: ----------- - fix some E_STRICT errors - fix wrong name of an image - add load language references for admin.php Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -265,7 +265,7 @@ } if ($this->_obj->getInfo('help')) { $help = array(); - $help['link'] = '../../modules/system/help.php?mid=' . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help'); + $help['link'] = 'modules/system/help.php?mid=' . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help'); $help['icon'] = XOOPS_URL . "/media/xoops/images/icons/32/help.png"; $help['title'] = _AM_SYSTEM_HELP; $xoops->tpl->append('xo_admin_index_menu', $help); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -17,7 +17,7 @@ * @package class * @since 2.6.0 * @author trabis <lus...@gm...> - * @version $Id:$ + * @version $Id$ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -196,23 +196,23 @@ break; case 'password': - $myts =& MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); break; case 'color': - $myts =& MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $ele = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); break; case 'hidden': - $myts =& MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $ele = new XoopsFormHidden($config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); break; case 'textbox': default: - $myts =& MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); break; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/functions.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/functions.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -95,7 +95,7 @@ */ function xoPassField($name, $value, $label, $help = '') { - $myts =& MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $label = $myts->htmlspecialchars($label, ENT_QUOTES, _INSTALL_CHARSET, false); $name = $myts->htmlspecialchars($name, ENT_QUOTES, _INSTALL_CHARSET, false); $value = $myts->htmlspecialchars($value, ENT_QUOTES); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -115,7 +115,7 @@ <?php foreach($pages as $page): ?> <li<?php echo $page['current']? ' class="current"':''; ?><?php echo $page['past']? ' class="past"':''; ?>> <?php echo $page['name']; ?> - <span><?php echo $page['index']; ?><?php if($page['past']): ?><img src="./img/oks.png" alt="" /><?php endif; ?></span> + <span><?php echo $page['index']; ?><?php if($page['past']): ?><img src="./img/yes.png" alt="" /><?php endif; ?></span> </li> <?php endforeach; ?> </ul> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -32,18 +32,21 @@ /* @var $wizard XoopsInstallWizard */ $wizard = $xoops->registry->get('wizard'); +$xoops->loadLanguage('admin', 'system', $wizard->language); $xoops->loadLanguage('global', '',$wizard->language); $xoops->loadLanguage('admin/modulesadmin', 'system',$wizard->language); $pageHasForm = true; if ($_SERVER['REQUEST_METHOD'] == 'POST') { - include_once XOOPS_ROOT_PATH . "/modules/system/admin/modulesadmin/modulesadmin.php"; + include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; + $system_module = new SystemModule(); + $msgs = array(); foreach ($_REQUEST['modules'] as $dirname => $installmod) { if ($installmod) { - $msgs[] = xoops_module_install($dirname); + $msgs[] = $system_module->install($dirname); } } @@ -52,7 +55,8 @@ if (count($msgs) > 0) { $content = "<div class='x2-note successMsg'>" . INSTALLED_MODULES . "</div><ul class='log'>"; foreach ($msgs as $msg) { - $content .= "<dt>{$msg}</dt>"; + $tempvar = $msg->modinfo['name']; + $content .= "<dt>{$tempvar}</dt>"; } $content .= "</ul>"; } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php 2012-02-05 05:50:29 UTC (rev 8883) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php 2012-02-05 19:31:41 UTC (rev 8884) @@ -48,14 +48,16 @@ $wizard->redirectToPage('+1'); } - +$xoops->loadLanguage('admin', 'system', $wizard->language); $xoops->loadLanguage('admin/preferences', 'system', $wizard->language); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('conf_modid', 0)); $criteria->add(new Criteria('conf_name', 'theme_set')); -$config = array_pop($config_handler->getConfigs($criteria)); +$tempvar = $config_handler->getConfigs($criteria); +$config = array_pop($tempvar); + include XOOPS_INSTALL_PATH . '/include/createconfigform.php'; $wizard->form = createThemeform($config); $content = $wizard->CreateForm(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-02-13 10:34:20
|
Revision: 8951 http://xoops.svn.sourceforge.net/xoops/?rev=8951&view=rev Author: mageg Date: 2012-02-13 10:34:09 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Fixed bug ID: 3201929 Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-02-13 10:33:32 UTC (rev 8950) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-02-13 10:34:09 UTC (rev 8951) @@ -34,7 +34,7 @@ CREATE TABLE banner ( bid smallint(5) unsigned NOT NULL auto_increment, cid tinyint(3) unsigned NOT NULL default '0', - imptotal mediumint(8) unsigned NOT NULL default '0', + imptotal int(10) unsigned NOT NULL default '0', impmade mediumint(8) unsigned NOT NULL default '0', clicks mediumint(8) unsigned NOT NULL default '0', imageurl varchar(255) NOT NULL default '', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-02-13 10:33:32 UTC (rev 8950) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-02-13 10:34:09 UTC (rev 8951) @@ -69,6 +69,11 @@ $xoops->db->queryF($sql); $sql = "DELETE FROM " . $xoops->db->prefix("config") . " WHERE `conf_name` = 'my_ip'"; $xoops->db->queryF($sql); + + // change 'imptotal' + $sql = "ALTER TABLE " . $xoops->db->prefix("banner") . " CHANGE `imptotal` `imptotal` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'"; + $xoops->db->queryF($sql); + // move file // Get banners handler This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wis...@us...> - 2012-02-14 17:35:45
|
Revision: 8972 http://xoops.svn.sourceforge.net/xoops/?rev=8972&view=rev Author: wishcraft Date: 2012-02-14 17:35:36 +0000 (Tue, 14 Feb 2012) Log Message: ----------- * Duplicate Meta Entries Fix (Abridged on Trabis Forum Solution) - class/theme.php * exit(0); missing preloader call before calling in - class/xoops.php * Better Statistic Model for Persistence Handler - class/model/stats.php * Date problem work around definition of XOBJ_DTYPE_DATE for passing date to date field type in MySQL, Postgres, MSSQL and other DB Platforms. * Time problem work around definition of XOBJ_DTYPE_TIME for passing date to date field type in MySQL, Postgres, MSSQL and other DB Platforms. * Timestamp problem work around definition of XOBJ_DTYPE_TIMESTAMP for passing date to date field type in MySQL, Postgres, MSSQL and other DB Platforms. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/write.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php 2012-02-14 16:32:37 UTC (rev 8971) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php 2012-02-14 17:35:36 UTC (rev 8972) @@ -100,4 +100,326 @@ } return $ret; } + + /** + * get sum of field matching a condition + * + * @param string $field field to base sum on to match in criteria if set + * @param CriteriaElement|null $criteria {@link CriteriaElement} to match + * @return array of counts + */ + public function getSum($field, $criteria = NULL) { + if (empty($field)) { + return false; + } + $idxfield = ''; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->getGroupby() != '') { + $groupby = true; + $idxfield = $criteria->getGroupby() . ", "; + } + } + if ($groupby == false) { + $sql = "SELECT sum(`$field`) as result FROM `" . $this->table . "`"; + } else { + $sql = "SELECT `$idxfield`, sum(`$field`) as result FROM `" . $this->table . "`"; + } + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + $sql .= $criteria->getGroupby(); + } + $result = $this->handler->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list ($sum) = $this->handler->db->fetchRow($result); + return $sum; + } else { + $ret = array(); + while (list ($id, $sum) = $this->handler->db->fetchRow($result)) { + $ret[$id] = $sum; + } + return $ret; + } + } + + /** + * get average of field matching a condition + * + * @param string $field field to base average on to match in criteria if set + * @param CriteriaElement|null $criteria {@link CriteriaElement} to match + * @return array of counts + */ + function getAverage($field, $criteria = NULL) { + if (empty($field)) { + return false; + } + $idxfield = ''; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->getGroupby() != '') { + $groupby = true; + $idxfield = $criteria->getGroupby() . ", "; + } + } + if ($groupby==false) { + $sql = "SELECT avg(`$field`) as result FROM `" . $this->table . "`"; + } else { + $sql = "SELECT `$idxfield`, avg(`$field`) as result FROM `" . $this->table . "`"; + } + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + $sql .= $criteria->getGroupby(); + } + $result = $this->handler->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list ($avg) = $this->handler->db->fetchRow($result); + return $avg; + } else { + $ret = array(); + while (list ($id, $avg) = $this->handler->db->fetchRow($result)) { + $ret[$id] = $avg; + } + return $ret; + } + } + + /** + * get maximum of field matching a condition + * + * @param string $field field to base maximum value on + * @param CriteriaElement|null $criteria {@link CriteriaElement} to match + * @return array of counts + */ + function getMaximum($field, $criteria = NULL) { + if (empty($field)) { + return false; + } + $idxfield = ''; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->getGroupby() != '') { + $groupby = true; + $idxfield = $criteria->getGroupby() . ", "; + } + } + if ($groupby==false) { + $sql = "SELECT max(`$field`) as result FROM `" . $this->table . "`"; + } else { + $sql = "SELECT `$idxfield`, max(`$field`) as result FROM `" . $this->table . "`"; + } + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + $sql .= $criteria->getGroupby(); + } + $result = $this->handler->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list ($max) = $this->handler->db->fetchRow($result); + return $max; + } else { + $ret = array(); + while (list ($id, $max) = $this->handler->db->fetchRow($result)) { + $ret[$id] = $max; + } + return $ret; + } + } + + /** + * get minimum of field matching a condition + * + * @param string $field field to base minimum value on + * @param CriteriaElement|null $criteria {@link CriteriaElement} to match + * @return array of counts + */ + function getMinimum($field, $criteria = NULL) { + if (empty($field)) { + return false; + } + $idxfield = ''; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->getGroupby() != '') { + $groupby = true; + $idxfield = $criteria->getGroupby() . ", "; + } + } + if ($groupby==false) { + $sql = "SELECT min(`$field`) as result FROM `" . $this->table . "`"; + } else { + $sql = "SELECT `$idxfield`, min(`$field`) as result FROM `" . $this->table . "`"; + } + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + $sql .= $criteria->getGroupby(); + } + $result = $this->handler->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list ($min) = $this->handler->db->fetchRow($result); + return $min; + } else { + $ret = array(); + while (list ($id, $min) = $this->handler->db->fetchRow($result)) { + $ret[$id] = $min; + } + return $ret; + } + } + + /** + * get standard deviation of field matching a condition + * + * @param string $field field to base standard deviation value on + * @param CriteriaElement|null $criteria {@link CriteriaElement} to match + * @return array of counts + */ + function getDeviation($field, $criteria = NULL) { + if (empty($field)) { + return false; + } + $idxfield = ''; + $groupby = false; + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if ($criteria->getGroupby() != '') { + $groupby = true; + $idxfield = $criteria->getGroupby() . ", "; + } + } + if ($groupby==false) { + $sql = "SELECT stddev(`$field`) as result FROM `" . $this->table . "`"; + } else { + $sql = "SELECT `$idxfield`, stddev(`$field`) as result FROM `" . $this->table . "`"; + } + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + $sql .= $criteria->getGroupby(); + } + $result = $this->handler->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list ($stddev) = $this->handler->db->fetchRow($result); + return $stddev; + } else { + $ret = array(); + while (list ($id, $stddev) = $this->handler->db->fetchRow($result)) { + $ret[$id] = $stddev; + } + return $ret; + } + } + + /** + * get standard variance of field matching a condition + * + * @param string $field field to base standard variance value on + * @param CriteriaElement|null $criteria {@link CriteriaElement} to match + * @return array of counts + */ + function getVariance($field, $criteria = NULL) { + if (empty($field)) { + return false; + } + $idxfield = ''; + $groupby = false; + if ($criteria->getGroupby() != '') { + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $groupby = true; + $idxfield = $criteria->getGroupby() . ", "; + } + } + if ($groupby==false) { + $sql = "SELECT variance(`$field`) as result FROM `" . $this->table . "`"; + } else { + $sql = "SELECT `$idxfield`, variance(`$field`) as result FROM `" . $this->table . "`"; + } + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + $sql .= $criteria->getGroupby(); + } + $result = $this->handler->db->query($sql); + if (!$result) { + return 0; + } + if ($groupby == false) { + list ($variance) = $this->handler->db->fetchRow($result); + return $variance; + } else { + $ret = array(); + while (list ($id, $variance) = $this->handler->db->fetchRow($result)) { + $ret[$id] = $variance; + } + return $ret; + } + } + + /** + * get CriteriaElement Object based on a filter string + * + * @param string $filter string to base filter on of criteria element + * @return CriteriaElement|null $criteria {@link CriteriaElement} + */ + function getFilterCriteria($filter) { + $parts = explode('|', $filter); + $criteria = new CriteriaCompo(); + foreach($parts as $part) { + $var = explode(',', $part); + if (!empty($var[1])&&!is_numeric($var[0])) { + $object = $this->create(); + if ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TXTBOX || + $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TXTAREA) { + $criteria->add(new Criteria('`'.$var[0].'`', '%'.$var[1].'%', (isset($var[2])?$var[2]:'LIKE'))); + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_INT || + $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_DECIMAL || + $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_FLOAT ) { + $criteria->add(new Criteria('`'.$var[0].'`', $var[1], (isset($var[2])?$var[2]:'='))); + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_STIME || + $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_MTIME || + $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_LTIME ) { + if (is_string($var[1])) { + $criteria->add(new Criteria('`'.$var[0].'`', strtotime($var[1]), (isset($var[2])?$var[2]:'='))); + } elseif (is_numeric($var[1])) { + $criteria->add(new Criteria('`'.$var[0].'`', $var[1], (isset($var[2])?$var[2]:'='))); + } + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_DATE ) { + if (is_numeric($var[1])&&!is_string($var[1])) { + $criteria->add(new Criteria('`'.$var[0].'`', date(_DBDATESTRING, $var[1]), (isset($var[2])?$var[2]:'='))); + } else { + $criteria->add(new Criteria('`'.$var[0].'`', date(_DBDATESTRING, strtotime($var[1])), (isset($var[2])?$var[2]:'='))); + } + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TIME ) { + if (is_numeric($var[1])&&!is_string($var[1])) { + $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTRING, $var[1]), (isset($var[2])?$var[2]:'='))); + } else { + $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTRING, strtotime($var[1])), (isset($var[2])?$var[2]:'='))); + } + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TIMESTAMP ) { + if (is_numeric($var[1])&&!is_string($var[1])) { + $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTAMPSTRING, $var[1]), (isset($var[2])?$var[2]:'='))); + } else { + $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTAMPSTRING, strtotime($var[1])), (isset($var[2])?$var[2]:'='))); + } + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_ENUM ) { + $criteria->add(new Criteria('`'.$var[0].'`', $var[1], (isset($var[2])?$var[2]:'='))); + } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_ARRAY ) { + $criteria->add(new Criteria('`'.$var[0].'`', '%"'.$var[1].'";%', (isset($var[2])?$var[2]:'LIKE'))); + } + } elseif (!empty($var[1])&&is_numeric($var[0])) { + $criteria->add(new Criteria("'".$var[0]."'", $var[1])); + } + } + return $criteria; + } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/write.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/write.php 2012-02-14 16:32:37 UTC (rev 8971) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/write.php 2012-02-14 17:35:36 UTC (rev 8972) @@ -58,7 +58,19 @@ } $cleanv = $v['value']; switch ($v["data_type"]) { - + + case XOBJ_DTYPE_TIMESTAMP: + $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTAMPSTRING, $cleanv) : date(_DBTIMESTAMPSTRING, strtotime($cleanv)); + break; + + case XOBJ_DTYPE_TIME: + $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTRING, $cleanv) : date(_DBTIMESTRING, strtotime($cleanv)); + break; + + case XOBJ_DTYPE_DATE: + $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBDATESTRING, $cleanv) : date(_DBDATESTRING, strtotime($cleanv)); + break; + case XOBJ_DTYPE_TXTBOX: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $errors[] = sprintf(_XOBJ_ERR_REQUIRED, $k); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-02-14 16:32:37 UTC (rev 8971) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-02-14 17:35:36 UTC (rev 8972) @@ -581,40 +581,43 @@ /** * *#@+ + * * @tasktype 20 Manipulating page meta-information */ /** * Adds script code to the document head + * * This methods allows the insertion of an external script file (if $src is provided), or * of a script snippet. The file URI is parsed to take benefit of the theme resource * overloading system. + * * The $attributes parameter allows you to specify the attributes that will be added to the * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to * 'text/javascript'. + * * <code> * // Add an external script using a physical path * $theme->addScript( 'www/script.js', null, '' ); * $theme->addScript( 'modules/newbb/script.js', null, '' ); * // Specify attributes for the <script> tag - * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' ); + * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '', 'mod_xoops_Sitemanager' ); * // Insert a code snippet - * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' ); + * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");', 'hello' ); * </code> * - * @param string $src path to an external script file - * @param array $attributes hash of attributes to add to the <script> tag - * @param string $content Code snippet to output within the <script> tag - * + * @param string $src path to an external script file + * @param array $attributes hash of attributes to add to the <script> tag + * @param string $content Code snippet to output within the <script> tag + * @param string $name Element Name in array scripts are stored in. * @return void */ - public function addScript($src = '', $attributes = array(), $content = '') + function addScript($src = '', $attributes = array(), $content = '', $name = '') { - $xoops = Xoops::getInstance(); if (empty($attributes)) { $attributes = array(); } if (!empty($src)) { - $src = $xoops->url($this->resourcePath($src)); + $src = $GLOBALS['xoops']->url($this->resourcePath($src)); $attributes['src'] = $src; } if (!empty($content)) { @@ -623,26 +626,29 @@ if (!isset($attributes['type'])) { $attributes['type'] = 'text/javascript'; } - $this->addMeta('script', $src, $attributes); + if (empty($name)) { + $name = md5(serialize($attributes)); + } + $this->addMeta('script', $name, $attributes); } + /** * Add StyleSheet or CSS code to the document head * - * @param string|null $src path to .css file - * @param array|null $attributes name => value paired array of attributes such as title - * @param string $content CSS code to output between the <style> tags (in case $src is empty) - * + * @param string $src path to .css file + * @param array $attributes name => value paired array of attributes such as title + * @param string $content CSS code to output between the <style> tags (in case $src is empty) + * @param string $name Element Name in array stylesheets are stored in. * @return void */ - public function addStylesheet($src = '', $attributes = array(), $content = '') + function addStylesheet($src = '', $attributes = array(), $content = '', $name = '') { - $xoops = Xoops::getInstance(); if (empty($attributes)) { $attributes = array(); } if (!empty($src)) { - $src = $xoops->url($this->resourcePath($src)); + $src = $GLOBALS['xoops']->url($this->resourcePath($src)); $attributes['href'] = $src; } if (!isset($attributes['type'])) { @@ -651,17 +657,21 @@ if (!empty($content)) { $attributes['_'] = $content; } - $this->addMeta('stylesheet', $src, $attributes); + if (empty($name)) { + $name = md5(serialize($attributes)); + } + $this->addMeta('stylesheet', $name, $attributes); } /** * Add a <link> to the header * - * @param string $rel Relationship from the current doc to the anchored one - * @param string $href URI of the anchored document - * @param array $attributes Additional attributes to add to the <link> element + * @param string $rel Relationship from the current doc to the anchored one + * @param string $href URI of the anchored document + * @param array $attributes Additional attributes to add to the <link> element + * @param string $name Element Name in array links are stored in. */ - public function addLink($rel, $href = '', $attributes = array()) + function addLink($rel, $href = '', $attributes = array(), $name = '') { if (empty($attributes)) { $attributes = array(); @@ -670,9 +680,12 @@ $attributes['href'] = $href; } $attributes['rel'] = $rel; - $this->addMeta('link', '', $attributes); + if (empty($name)) { + $name = md5(serialize($attributes)); + } + $this->addMeta('link', $name, $attributes); } - + /** * Set a meta http-equiv value * Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-02-14 16:32:37 UTC (rev 8971) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-02-14 17:35:36 UTC (rev 8972) @@ -433,6 +433,7 @@ $this->preload->triggerEvent('core.header.checkcache'); if ($this->theme->checkCache()) { + $xoopsPreload->triggerEvent('core.header.cacheend'); exit(); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2012-02-14 16:32:37 UTC (rev 8971) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2012-02-14 17:35:36 UTC (rev 8972) @@ -38,7 +38,9 @@ define('XOBJ_DTYPE_FLOAT', 13); define('XOBJ_DTYPE_DECIMAL', 14); define('XOBJ_DTYPE_ENUM', 15); - +define('XOBJ_DTYPE_DATE', 22); +define('XOBJ_DTYPE_TIME', 23); +define('XOBJ_DTYPE_TIMESTAMP', 24); /** * Base class for all objects in the Xoops kernel (and beyond) */ @@ -172,7 +174,31 @@ public function assignVar($key, $value) { if (isset($key) && isset($this->vars[$key])) { - $this->vars[$key]['value'] = $value; + switch ($this->vars[$key]['data_type']) { + case XOBJ_DTYPE_DATE: + if (!is_string($value)&&is_numeric($value)) { + $this->vars[$key]['value'] =& date(_DBDATESTRING, $value); + } else { + $this->vars[$key]['value'] =& date(_DBDATESTRING, strtotime($value)); + } + break; + case XOBJ_DTYPE_TIME: + if (!is_string($value)&&is_numeric($value)) { + $this->vars[$key]['value'] =& date(_DBTIMESTRING, $value); + } else { + $this->vars[$key]['value'] =& date(_DBTIMESTRING, strtotime($value)); + } + break; + case XOBJ_DTYPE_TIMESTAMP: + if (!is_string($value)&&is_numeric($value)) { + $this->vars[$key]['value'] =& date(_DBTIMESTAMPSTRING, $value); + } else { + $this->vars[$key]['value'] =& date(_DBTIMESTAMPSTRING, strtotime($value)); + } + break; + default: + $this->vars[$key]['value'] =& $value; + } } } @@ -321,6 +347,126 @@ $ret = $this->vars[$key]['value']; $ts = MyTextSanitizer::getInstance(); switch ($this->vars[$key]['data_type']) { + case XOBJ_DTYPE_DATE: + switch (strtolower($format)) { + case 's': + case 'show': + if (is_string($ret)&&!is_numeric($ret)) { + return date(_DBDATESTRING, strtotime($ret)); + } else { + return date(_DBDATESTRING, $ret); + } + break 1; + case 'e': + case 'edit': + if (is_string($ret)&&!is_numeric($ret)) { + return htmlspecialchars(date(_DBDATESTRING, strtotime($ret)), ENT_QUOTES); + } else { + return htmlspecialchars(date(_DBDATESTRING, $ret), ENT_QUOTES); + } + break 1; + case 'p': + case 'preview': + if (is_string($ret)&&!is_numeric($ret)) { + return $ts->stripSlashesGPC(date(_DBDATESTRING, strtotime($ret))); + } else { + return $ts->stripSlashesGPC(date(_DBDATESTRING, $ret)); + } + break 1; + case 'f': + case 'formpreview': + if (is_string($ret)&&!is_numeric($ret)) { + return htmlspecialchars($ts->stripSlashesGPC(date(_DBDATESTRING, strtotime($ret))), ENT_QUOTES); + } else { + return htmlspecialchars($ts->stripSlashesGPC(date(_DBDATESTRING, $ret)), ENT_QUOTES); + } + break 1; + case 'n': + case 'none': + default: + break 1; + } + break; + case XOBJ_DTYPE_TIME: + switch (strtolower($format)) { + case 's': + case 'show': + if (is_string($ret)&&!is_numeric($ret)) { + return date(_DBTIMESTRING, strtotime($ret)); + } else { + return date(_DBTIMESTRING, $ret); + } + break 1; + case 'e': + case 'edit': + if (is_string($ret)&&!is_numeric($ret)) { + return htmlspecialchars(date(_DBTIMESTRING, strtotime($ret)), ENT_QUOTES); + } else { + return htmlspecialchars(date(_DBTIMESTRING, $ret), ENT_QUOTES); + } + break 1; + case 'p': + case 'preview': + if (is_string($ret)&&!is_numeric($ret)) { + return $ts->stripSlashesGPC(date(_DBTIMESTRING, strtotime($ret))); + } else { + return $ts->stripSlashesGPC(date(_DBTIMESTRING, $ret)); + } + break 1; + case 'f': + case 'formpreview': + if (is_string($ret)&&!is_numeric($ret)) { + return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTRING, strtotime($ret))), ENT_QUOTES); + } else { + return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTRING, $ret)), ENT_QUOTES); + } + break 1; + case 'n': + case 'none': + default: + break 1; + } + break; + case XOBJ_DTYPE_TIMSTAMP: + switch (strtolower($format)) { + case 's': + case 'show': + if (is_string($ret)&&!is_numeric($ret)) { + return date(_DBTIMESTAMPSTRING, strtotime($ret)); + } else { + return date(_DBTIMESTAMPSTRING, $ret); + } + break 1; + case 'e': + case 'edit': + if (is_string($ret)&&!is_numeric($ret)) { + return htmlspecialchars(date(_DBTIMESTAMPSTRING, strtotime($ret)), ENT_QUOTES); + } else { + return htmlspecialchars(date(_DBTIMESTAMPSTRING, $ret), ENT_QUOTES); + } + break 1; + case 'p': + case 'preview': + if (is_string($ret)&&!is_numeric($ret)) { + return $ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, strtotime($ret))); + } else { + return $ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, $ret)); + } + break 1; + case 'f': + case 'formpreview': + if (is_string($ret)&&!is_numeric($ret)) { + return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, strtotime($ret))), ENT_QUOTES); + } else { + return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, $ret)), ENT_QUOTES); + } + break 1; + case 'n': + case 'none': + default: + break 1; + } + break; case XOBJ_DTYPE_TXTBOX: switch (strtolower($format)) { case 's': @@ -461,6 +607,15 @@ } else { $cleanv = is_string($cleanv) ? trim($cleanv) : $cleanv; switch ($v['data_type']) { + case XOBJ_DTYPE_TIMESTAMP: + $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTAMPSTRING, $cleanv) : date(_DBTIMESTAMPSTRING, strtotime($cleanv)); + break; + case XOBJ_DTYPE_TIME: + $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTRING, $cleanv) : date(_DBTIMESTRING, strtotime($cleanv)); + break; + case XOBJ_DTYPE_DATE: + $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBDATESTRING, $cleanv) : date(_DBDATESTRING, strtotime($cleanv)); + break; case XOBJ_DTYPE_TXTBOX: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php 2012-02-14 16:32:37 UTC (rev 8971) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php 2012-02-14 17:35:36 UTC (rev 8972) @@ -213,4 +213,10 @@ **/ define('_RESET', 'Reset'); define('_RE', 'Re:'); +/** + * Additions to 2.5.5 +**/ +define('_DBDATESTRING', 'Y-m-d'); +define('_DBTIMESTRING', 'H:i:s'); +define('_DBTIMESTAMPSTRING', 'Y-m-d H:i:s'); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wis...@us...> - 2012-02-15 02:08:19
|
Revision: 8976 http://xoops.svn.sourceforge.net/xoops/?rev=8976&view=rev Author: wishcraft Date: 2012-02-15 02:08:07 +0000 (Wed, 15 Feb 2012) Log Message: ----------- * Duplicate Meta Entries Fix (Abridged on Trabis Forum Solution) - class/theme.php * exit(0); missing preloader call before calling exit - header.php * Date problem work around definition of XOBJ_DTYPE_DATE for passing date to date field type in MySQL, Postgres, MSSQL and other DB Platforms. * Time problem work around definition of XOBJ_DTYPE_TIME for passing date to date field type in MySQL, Postgres, MSSQL and other DB Platforms. * Timestamp problem work around definition of XOBJ_DTYPE_TIMESTAMP for passing timestamp to timestamp field type in MySQL, Postgres, MSSQL and other DB Platforms. * 0.25 ADOdb Implementation and installation replacing 1996 database classes * Better Statistical model for XoopsPersistableObjectHandler * Implementation of Query File Cache on all read instances of XoopsPersistableObjectHandler * Implementation of all Database System supporting MySQL SQL92 Queries (Postgres/Mysql) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/joint.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/read.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/access_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ado5_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ado_access_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ado_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ado_mssql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-active-record.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-active-recordx.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-csvlib.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-datadict.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-error.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-errorhandler.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-errorpear.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-exceptions.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-iterator.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-lib.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-memcache.lib.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-pager.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-pear.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-perf.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-php4.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-time.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-xmlschema.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb-xmlschema03.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/adodb.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/contrib/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/contrib/toxmlrpc.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-access.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-db2.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-firebird.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-generic.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-ibase.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-informix.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-mssql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-mssqlnative.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-mysql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-oci8.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-postgres.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-sapdb.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-sqlite.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/datadict/datadict-sybase.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-access.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ado.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ado5.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ado_access.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ado_mssql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ads.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-borland_ibase.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-csv.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-db2.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-db2oci.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-db2ora.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-fbsql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-firebird.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ibase.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-informix.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-informix72.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-ldap.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mssql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mssql_n.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mssqlnative.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mssqlpo.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mysql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mysqli.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mysqlpo.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-mysqlt.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-netezza.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-oci8.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-oci805.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-oci8po.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-odbc.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-odbc_db2.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-odbc_mssql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-odbc_oracle.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-odbtp.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-odbtp_unicode.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-oracle.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-pdo.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-pdo_mssql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-pdo_mysql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-pdo_oci.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-pdo_pgsql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-pdo_sqlite.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-postgres.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-postgres64.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-postgres7.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-postgres8.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-proxy.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-sapdb.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-sqlanywhere.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-sqlite.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-sqlitepo.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-sybase.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-sybase_ase.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/drivers/adodb-vfp.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-ar.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-bg.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-bgutf8.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-ca.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-cn.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-cz.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-da.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-de.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-en.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-es.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-esperanto.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-fa.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-fr.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-hu.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-it.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-nl.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-pl.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-pt-br.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-ro.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-ru1251.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-sv.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb-uk1251.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/lang/adodb_th.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/license.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/pear/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/pear/Auth/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/pear/Auth/Container/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/pear/Auth/Container/ADOdb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/pear/readme.Auth.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-db2.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-informix.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-mssql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-mssqlnative.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-mysql.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-oci8.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/perf/perf-postgres.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/pivottable.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/rsfilter.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/server.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/toexport.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/tohtml.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xmlschema.dtd XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xmlschema03.dtd XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/convert-0.1-0.2.xsl XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/convert-0.1-0.3.xsl XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/convert-0.2-0.1.xsl XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/convert-0.2-0.3.xsl XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/remove-0.2.xsl XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/adodb/xsl/remove-0.3.xsl XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ads_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/borland_ibase_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/csv_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/db2_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/db2oci_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/fbsql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/firebird_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ibase_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/informix72_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/informix_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/ldap_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mssql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mssql_n_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mssqlnative_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mssqlpo_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqli_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqlpo_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqlt_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/netezza_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/oci805_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/oci8_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/oci8po_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/odbc_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/odbc_db2_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/odbc_mssql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/odbc_oracle_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/odbtp_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/odbtp_unicode_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/oracle_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ado.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ado5.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ado_access.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ado_mssql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ads.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/borland_ibase.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/csv.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/db2.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/db2oci.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/firebird.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ibase.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/informix.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/informix72.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/ldap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mssql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mssql_n.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mssqlnative.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mssqlpo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mysql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mysqli.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mysqlpo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/mysqlt.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/netezza.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/oci8.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/oci805.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/oci8po.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/odbc_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/odbc_db2.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/odbc_mssql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/odbc_oracle.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/odbtp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/odbtp_unicode.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/oracle.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pdo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pdo_mssql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pdo_mysql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pdo_oci.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pdo_pgsql.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pdo_sqlite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/pivot.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/postgres.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/postgres7.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/postgres8.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/proxy.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/sapdb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/sqlanywhere.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/sqlite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/sqlitepo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/sybase.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/sybase_ase.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo/vfp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo_mssql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo_mysql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo_oci_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo_pgsql_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/pdo_sqlite_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/postgres7_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/postgres8_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/postgres_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/proxy_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sapdb_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlanywhere_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlite_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlitepo_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sybase_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sybase_ase_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/vfp_adodb.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/mysqli.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/mysqlpo.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/mysqlt.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/pdo_mysql.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/pdo_pgsql.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/postgres.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/postgres7.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/postgres8.lang.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysqli.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysqli.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysqlpo.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysqlpo.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysqlt.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysqlt.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/pdo_mysql.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/pdo_mysql.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/pdo_pgsql.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/pdo_pgsql.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/postgres.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/postgres.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/postgres7.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/postgres7.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/postgres8.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/postgres8.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_data/caches/adodb_cache/ Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqldatabase.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/access_adodb.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/access_adodb.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/access_adodb.php 2012-02-15 02:08:07 UTC (rev 8976) @@ -0,0 +1,1774 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Factory Class for Xoops Database + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package kernel + * @subpackage database + * @since 2.6.0 + * @author Kazumi Ono <on...@xo...> + * @author Simon Roberts <si...@xo...> + * @version $Id$ + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * + * @package kernel + * @subpackage database + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ + +/** + * base class + */ +include_once XOOPS_ROOT_PATH . '/class/database/database.php'; +include_once XOOPS_ROOT_PATH . '/class/database/adodb/adodb.inc.php'; +include_once XOOPS_ROOT_PATH . '/class/database/pdo/'.XOOPS_DB_TYPE.'.php'; + +// xoops_load( 'xoopsdatabase' ); +/** + * connection to a mysql database + * + * @abstrac + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + * @package kernel + * @subpackage database + */ +class XoopsAccess_ADODBDatabase extends XoopsDatabase +{ + /** + * Database connection + * + * @var resource + */ + var $conn; + + /** + * connect to the database + * + * @param bool $selectdb select the database now? + * @return bool successful? + */ + public function connect($selectdb = true) + { + static $db_charset_set;$this->allowWebChanges = ($_SERVER['REQUEST_METHOD'] != 'GET'); + + // This is a global variable that determines how arrays are retrieved by recordsets. The recordset saves this value on creation (eg.// + // in Execute( ) or SelectLimit( )), and any subsequent changes to $ADODB_FETCH_MODE have no affect on existing recordsets, only on + // recordsets created in the future + $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; // Options: ADODB_FETCH_DEFAULT, ADODB_FETCH_NUM, ADODB_FETCH_ASSOC, ADODB_FETCH_BOTH + + // If you are using recordset caching, this is the directory to save your recordsets in. Define this before you call any caching + // public functions such as CacheExecute( ). We recommend setting register_globals=off in php.ini if you use this feature for security reasons. + $ADODB_CACHE_DIR = XOOPS_VAR_PATH . DIRECTORY_SEPARATOR . 'caches'. DIRECTORY_SEPARATOR .'adodb_cache'; + + + // If the database driver API does not support counting the number of records returned in a SELECT statement, the public function RecordCount() + // is emulated when the global variable $ADODB_COUNTRECS is set to true, which is the default. We emulate this by buffering the records, + // which can take up large amounts of memory for big recordsets. Set this variable to false for the best performance. This variable is + // checked every time a query is executed, so you can selectively choose which recordsets to count. + $ADODB_COUNTRECS = true; + + //Determines the language used in MetaErrorMsg(). The default is 'en', for English. To find out what languages are supported, see the + // files in adodb/lang/adodb-$lang.inc.php, where $lang is the supported language. + $ADODB_LANG = 'en'; + + // Determines whether to right trim CHAR fields (and also VARCHAR for ibase/firebird). Set to true to trim. Default is false. + // Currently works for oci8po, ibase and firebird drivers. + $ADODB_ANSI_PADDING_OFF = true; + + + $this->conn = @NewADOConnection(XOOPS_DB_DSN); + $this->conn->setFetchMode($ADODB_FETCH_MODE); + + + if (!$this->conn) { + $this->logger->addQuery('', $this->error(), $this->errno()); + return false; + } + } + + /** + * check if connected to a database + * + * @return true if connected to database + */ + public function isConnected() + { + return @$this->conn->IsConnected(); // will use auto_increment + } + + /** + * execute a sql question to the database + * + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @param $inputarr parameter can be used for binding variables to parameters + * @return ADORecordset Objects + */ + public function execute($sql, $inputarr=false) + { + return @$this->conn->Execute($sql, $inputarr); // will use auto_increment + } + + /** + * Similar to Execute, except that the recordset is cached for $secs2cache seconds + * + * @param $secs2cache the recordset is cached for $secs2cache seconds + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @param $inputarr parameter can be used for binding variables to parameters + * @return ADODBRecordset Object from cache + */ + public function executeCache($secs2cache,$sql,$inputarr=false) + { + return @$this->conn->CacheExecute($secs2cache,$sql,$inputarr); + } + + /** + * Execute an Oracle stored procedure, and returns an Oracle REF cursor variable as a regular ADOdb recordset + * + * @param $cursorName Oracle REF cursor variable as a regular ADOdb recordset + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @param $parameters parameter can be used for binding variables to parameters + * @returntrue if connected to database + */ + public function executeCursor($sql,$cursorName='rs',$parameters=false) + { + if (XOOPS_DB_TYPE!='oci8_adodb') + trigger_error('ADODB: Function not supported by database type! Function: '.__FUNC__.'; Class: '.__CLASS__); + else + return @$this->conn->ExecuteCursor($sql,$cursorName,$parameters); + } + + /** + * Returns a recordset if successful. Returns false otherwise. Performs a select statement. + * + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @param $numrows number of rows to return + * @param $offset offset in record count to load from. + * @param $inputarr parameter can be used for binding variables to parameters + * @return ADORecordset Object + */ + public function fetchSelectLimit($sql,$numrows=-1,$offset=-1,$inputarr=false) + { + return @$this->conn->SelectLimit($sql,$numrows,$offset,$inputarr); + } + + /** + * Similar to SelectLimit, except that the recordset returned is cached for $secs2cache seconds + * + * @param $secs2cache the recordset is cached for $secs2cache seconds + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @param $numrows number of rows to return + * @param $offset offset in record count to load from. + * @param $inputarr parameter can be used for binding variables to parameters + * @return true if connected to database + */ + public function fetchCacheSelectLimit($secs2cache, $sql, $numrows=-1,$offset=-1,$inputarr=false) + { + return @$this->conn->CacheSelectLimit($secs2cache, $sql, $numrows,$offset,$inputarr); + } + + /** + * Flush (delete) any cached recordsets for the SQL statement $sql in $ADODB_CACHE_DIR + * + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @returntrue if connected to database + */ + public function flushCache($sql=false) + { + return @$this->conn->CacheFlush($sql); + } + + /** + * Prepares (compiles) an SQL query for repeated execution. Bind parameters are denoted by ? + * except for the oci8 driver, which uses the traditional Oracle :varname convention. + * + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @returntrue if connected to database + */ + public function getPrepare($sql) + { + return @$this->conn->Prepare($sql); + } + + /** + * hen calling stored procedures in mssql and oci8 (oracle), and you might want to directly bind to parameters + * except for the oci8 driver, which uses the traditional Oracle :varname convention. + * + * @param $cursor Oracle REF cursor variable as a regular ADOdb recordset + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @returntrue if connected to database + */ + public function getPrepareSP($sql, $cursor=false) + { + return @$this->conn->Prepare($sql); + } + + /** + * Binds a PHP variable as input to a stored procedure variable. + * + * @param $stmt is the value returned by PrepareSP() + * @param $var is the PHP variable you want to bind + * @param $name is the name of the stored + * @param $maxLen the maximum length of the data to bind + * @param $type which is database dependant + * @returntrue if connected to database + */ + public function setInParameter($stmt, $var, $name, $maxLen = 4000, $type = false ) + { + return @$this->conn->InParameter($stmt, $var, $name, $maxLen, $type); + } + + /** + * Binds a PHP variable as output from a stored procedure variable. + * + * @param $stmt is the value returned by PrepareSP() + * @param $var is the PHP variable you want to bind + * @param $name is the name of the stored + * @param $maxLen the maximum length of the data to bind + * @param $type which is database dependant + * @returntrue if connected to database + */ + public function setOutParameter($stmt, $var, $name, $maxLen = 4000, $type = false ) + { + return @$this->conn->OutParameter($stmt, $var, $name, $maxLen, $type); + } + + /** + * Binds a PHP variable as output from a stored procedure variable. + * + * @param $stmt is the value returned by PrepareSP() + * @param $var is the PHP variable you want to bind + * @param $name is the name of the stored + * @param $isOutput Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT + * @param $maxLen the maximum length of the data to bind + * @param $type which is database dependant + * @returntrue if connected to database + */ + public function setParameter($stmt, $var, $name, $isOutput=false, $maxLen = 4000, $type = false ) + { + trigger_error('ADODB: This public function is deprecated. Use InParameter( ) and OutParameter( ) instead. - Function: '.__FUNC__.'; Class='.__CLASS__); + return @$this->conn->Parameter($stmt, $var, $name, $isOutput, $maxLen, $types); + } + + /** + * Generates a bind placeholder portably. + * For most databases, the bind placeholder is "?" + * + * @param $name string to be encoded as parameter binding + * @return string portably define an SQL statement with bind parameters + */ + public function setParam($name) + { + return @$this->conn->Param($name); + } + + /** + * Executes the SQL and returns the first field of the first row + * + * @param $sql parameter SQL statement and return derived class of ADORecordSet if successful + * @return string the first field of the first rowe + */ + public function getOne($sql) + { + return @$this->conn->GetOne($sql); + } + + /** + * Returns an associative array for the given query $sql with optional bind parameters in $inputarr + * + * @param $sql query + * @param $inputarr optional bind parameters + * @param $force_array is set to true, when an array is created for each value + * @param $first2cols Indicates direction of parameter + * @return array an associative array for the given query + */ + public function getAssoc($sql,$inputarr=false,$force_array=false,$first2cols=false) + { + return @$this->conn->GetAssoc($sql,$inputarr,$force_array,$first2cols); + } + + /** + * Caching version of GetAssoc public function above + * + * @param $secs2cache the recordset is cached for $secs2cache seconds + * @param $sql query + * @param $inputarr optional bind parameters + * @param $force_array is set to true, when an array is created for each value + * @param $first2cols Indicates direction of parameter + * @return array an associative array for the given query + */ + public function getCacheAssoc($secs2cache,$sql,$inputarr=false,$force_array=false,$first2cols=false) + { + return @$this->conn->GetAssoc($sql,$inputarr,$force_array,$first2cols); + } + + + /** + * Returns the median value of $field for $table + * + * @param $table table name to get median from + * @param $field field in table to get median from + * @param $where The $where clause is optional. If used, make sure the WHERE is included, as in "WHERE name > 'A'" + * @return string the median value of $field for $table + */ + public function getMedian($table, $field, $where='') + { + return @$this->conn->GetMedian($table, $field, $where); + } + + /** + * Executes the SQL and returns the first row as an array + * + * @param $sql query + * @return array First row as an array + */ + public function getRow($sql) + { + return @$this->conn->GetRow($sql); + } + + /** + * Executes the SQL and returns the first row as an array, <br /> + * except that the recordset is serialized and cached + * + * @param integer $secs2cache number of seconds to cache for + * @param string $sql query + * @return array First row as an array + */ + public function getCacheRow($secs2cache, $sql) + { + return @$this->conn->CacheGetRow($secs2cache, $sql); + } + + /** + * Executes the SQL and returns the all the rows as a 2-dimensional array + * The recordset is discarded for you automatically + * + * @param string $sql query + * @param array $inputarr parameters to bind to sql query + * @return array he all the rows as a 2-dimensional array + */ + public function getAll($sql,$inputarr=false) + { + return @$this->conn->GetAll($sql,$inputarr); // will use auto_increment + } + + /** + * Executes the SQL and returns the all the rows as a 2-dimensional array + * Similar to above GetAll public functions, except that the recordset is serialized and cached + * + * @param array $secs2cache seconds to cache query + * @param string $sql query + * @returntrue if connected to database + */ + public function getCacheAll($secs2cache, $sql) + { + return @$this->conn->CacheGetAll($secs2cache, $sql); + } + + /** + * Executes the SQL and returns all elements of the first column as a 1-dimensional array + * + * @param string $sql query + * @return array all elements of the first column as a 1-dimensional array + */ + public function fetchGetCol($sql) + { + return @$this->conn->GetCol($sql); + } + + /** + * Executes the SQL and returns all elements of the first column as a 1-dimensional array + * Similar to above GetCol public functions, except that the recordset is serialized and cached + * + * @param array $secs2cache seconds to cache query + * @param string $sql query + * @return array all elements of the first column as a 1-dimensional array + */ + public function fetchCacheGetCol($secs2cache, $sql) + { + return @$this->conn->CacheGetCol($secs2cache, $sql); + } + + /** + * Try to update a record, and if the record is not found, an insert statement is generated and executed + * + * @param string $table which is the table name + * @param array $arrFields which is an associative array where the keys are the field names + * @param array $keyCols is the name of the primary key, or an array of field names if it is a compound key + * @param boolean $autoQuote will quote all values that are non-numeric; auto-quoting will not quote nullss + * @return integer Try to update a record, and if the record is not found, an insert statement is generated and executed + */ + public function setReplace($table, $arrFields, $keyCols,$autoQuote=false) + { + return @$this->conn->Replace($table, $arrFields, $keyCols,$autoQuote); + } + + /** + * AutoExecute() inserts or updates $table given an array of $arrField. + * + * @param string $table which is the table name. + * @param array $arrFields which is an associative array where the keys are the field names. + * @param array $mode is enumerator either DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE. + * @param string $where clause is required if $mode == 'UPDATE'. + * @param boolean $forceUpdate false then we will query the database first and check if the field value returned by <br /> + the query matches the current field value. + * @param boolean $magicq is used to indicate whether magic quotes are enabled + * @returntrue if connected to database + */ + public function setAutoExecute($table, $arrFields, $mode, $where=false, $forceUpdate=true,$magicq=false) + { + return @$this->conn->AutoExecute($table, $arrFields, $mode, $where, $forceUpdate,$magicq); + } + + /** + * Generate SQL to update a table given a recordset $rs, and the modified fields of the array $arrFields + * (which must be an associative array holding the column names and the new values).s + * + * @param object $rs ADORecordset Object + * @param array $arrFields modified fields of the array. + * @param boolean $forceUpdate is true, then we also generate the SQL even if $arrFields is identical to $rs->fields. + * @param boolean $magicq is used to indicate whether magic quotes are enabled. + * @param boolean $forcenulls is used to indicate whether NULLS are forced with the update. + * @return string Update SQL Query/Question + */ + public function getUpdateSQL(&$rs, $arrFields, $forceUpdate=false,$magicq=false,$forcenulls=false) + { + return @$this->conn->GetUpdateSQL($rs, $arrFields, $forceUpdate,$magicq,$forcenulls); + } + + /** + * Generate SQL to insert into a table given a recordset $rs. Requires the query to be associative. + * + * @param object $rs ADORecordset Object + * @param array $arrFields modified fields of the array. + * @param boolean $magicq is used to indicate whether magic quotes are enabled. + * @param boolean $forcenulls is used to indicate whether NULLS are forced with the update. + * @return string Update SQL Query/Question + */ + public function getInsertSQL(&$rs, $arrFields,$magicq=false,$forcenulls=false) + { + return @$this->conn->GetInsertSQL($rs, $arrFields, $magicq,$forcenulls); + } + + /** + * Allows you to store a blob (in $val) into $table into $column in a row at $where + * + * @param string $table Table in database for blob + * @param string $column Column in table in database for blob. + * @param string $val Value to set blob. + * @param string $where SQL Where clause include ie. WHERE 1=1. + * @return boolean true if successful, false otherwise + */ + public function setUpdateBlob($table, $column, $val, $where) + { + return @$this->conn->UpdateBlob($table, $column, $val, $where); + } + + /** + * Allows you to store a clob (in $val) into $table into $column in a row at $where. + * Similar to UpdateBlob (see above), but for Character Large OBjects + * + * @param string $table Table in database for blob + * @param string $column Column in table in database for blob. + * @param string $val Value to set blob. + * @param string $where SQL Where clause include ie. WHERE 1=1. + * @return boolean true if successful, false otherwise + */ + public function setUpdateClob($table,$column,$val,$where) + { + return @$this->conn->UpdateClob($table,$column,$val,$where); + } + + /** + * Allows you to store a blob (in $val) into $table into $column in a row at $where + * Similar to UpdateBlob, except that we pass in a file path to where the blob resides. + * + * @param string $table Table in database for blob + * @param string $column Column in table in database for blob. + * @param string $path Real Path of the Blob to be put in the database. + * @param string $where SQL Where clause include ie. WHERE 1=1. + * @param enum $blobtype Type field for blob default ie. BLOB. + * @return boolean true if successful, false otherwise + */ + public function setUpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') + { + return @$this->conn->UpdateBlobFile($table,$column,$path,$where,$blobtype); + } + + + /** + * Some databases require blob's to be encoded manually before uploading + * + * @param string $blob data to be encoded. + * @return string the encoded blob value + */ + public function getBlobEncode($blob) + { + return @$this->conn->BlobEncode($blob); + } + + /** + * Some databases require blob's to be decoded manually after doing a select statement + * + * @param string $blob data to be encoded. + * @param integer $maxblobsize The default maxblobsize is set in $connection->maxblobsize, which is set to 256K. + * @return string the decoded blob value + */ + public function getBlobDecode($blob, $maxblobsize=false) + { + return @$this->conn->BlobDecode($blob,$maxblobsize); + } + + /** + * Used for pagination of recordset. $page is 1-based + * + * @param string $sql data to be encoded. + * @param integer $nrows Number of rows per page + * @param integer $page Page Number on. + * @param array $inputarr Variable to bind to the SQL statement (optional) + * @return string the decoded blob value + */ + public function fetchPageExecute($sql, $nrows, $page, $inputarr=false) + { + return @$this->conn->PageExecute($sql, $nrows, $page, $inputarr); + } + + /** + * Used for pagination of recordset. $page is 1-based + * Caching version of PageExecute + * + * @param integer $secs2cache Seconds to hold in cache + * @param string $sql data to be encoded. + * @param integer $nrows Number of rows per page + * @param integer $page Page Number on. + * @param array $inputarr Variable to bind to the SQL statement (optional) + * @return string the decoded blob value + */ + public function fetchCachePageExecute($secs2cache, $sql, $nrows, $page, $inputarr=false) + { + return @$this->conn->CachePageExecute($secs2cache, $sql, $nrows, $page, $inputarr); + } + + /** + * Start a monitored transaction. As SQL statements are executed, ADOdb will monitor for SQL errors, + * and if any are detected, when CompleteTrans() is called, we auto-rollback. + * + * @return boolean true if successful. + */ + public function setStartTrans() + { + return @$this->conn->StartTrans(); + } + + /** + * Start a monitored transaction. As SQL statements are executed, ADOdb will monitor for SQL errors, + * and if any are detected, when CompleteTrans() is called, we auto-rollback. + * + * @return boolean true if successful. + */ + public function setBeginTrans() + { + return @$this->conn->BeginTrans(); + } + + + /** + * Complete a transaction called with StartTrans() + * This public function monitors for SQL errors, and will commit if no errors have occured, otherwise it will rollback. + * + * @param boolean $autoComplete is true monitor sql errors and commit and rollback as appropriate + * @return boolean true on commit, false on rollback + */ + public function setCompleteTrans($autoComplete=true) + { + return @$this->conn->CompleteTrans($autoComplete); + } + + /** + * Fail a transaction started with StartTrans(). The rollback will only occur when CompleteTrans() is called + * + * @return boolean true + */ + public function isFailTrans() + { + return @$this->conn->FailTrans(); + } + + /** + * Check whether smart transaction has failed, eg. returns true if SQL execution failed, or FailTrans() was called. + * + * @return boolean true + */ + public function hasFailedTrans() + { + return @$this->conn->HasFailedTrans(); + } + + /** + * SetTransactionMode allows you to pass in the transaction mode to use for all subsequent transactions for that connection session + * + * @param enum $mode Supported values: READ UNCOMMITTED; READ COMMITTED; REPEATABLE READ; SERIALIZABLE; (oci8) SNAPSHOT; READ ONLY. + * @return string the decoded blob value + */ + public function setTransactionMode($mode ) + { + return @$this->conn->SetTransactionMode($mode); + } + + /** + * End a transaction successfully + * + * @param boolean $ok you pass the parameter false, the data is rolled back. . + * @return boolean will return true also as data is always committed. + */ + public function setCommitTrans($ok=true) + { + return @$this->conn->CommitTrans($ok); + } + + /** + * End a transaction, rollback all changes + * + * @param boolean $ok you pass the parameter false, the data is rolled back. . + * @return boolean true if successful. If the database does not support transactions, will return false as data is never rollbacked. + */ + public function setRollbackTrans($ok=true) + { + return @$this->conn->RollbackTrans($ok); + } + + /** + * Sets the current fetch mode for the connection and stores. + * + * @param enum $mode Legal modes are ADODB_FETCH_ASSOC and ADODB_FETCH_NUM. + * @return string the decoded blob value + */ + public function setFetchMode($mode) + { + return @$this->conn->SetFetchMode($mode); + } + + /** + * Generates the sql string used to concatenate $sa, $sb, etc together + * + * @param string $sa string to concatinate. (required) + * @param string $sb string to concatinate. (required) + * @param string $sc string to concatinate. (optional) + * @param string $sd string to concatinate. (optional) + * @param string $se string to concatinate. (optional) + * @param string $sf string to concatinate. (optional) + * @param string $sg string to concatinate. (optional) + * @param string $sh string to concatinate. (optional) + * @param string $si string to concatinate. (optional) + * @param string $sj string to concatinate. (optional) + * @param string $sk string to concatinate. (optional) + * @param string $sl string to concatinate. (optional) + * @param string $sm string to concatinate. (optional) + * @param string $sn string to concatinate. (optional) + * @param string $so string to concatinate. (optional) + * @param string $sp string to concatinate. (optional) + * @param string $sq string to concatinate. (optional) + * @param string $sr string to concatinate. (optional) + * @param string $ss string to concatinate. (optional) + * @param string $st string to concatinate. (optional) + * @param string $su string to concatinate. (optional) + * @param string $sv string to concatinate. (optional) + * @param string $sw string to concatinate. (optional) + * @param string $sx string to concatinate. (optional) + * @param string $sy string to concatinate. (optional) + * @param string $sz string to concatinate. (optional) + * @return string the concatenated string + */ + public function getConcat($sa, $sb, $sc, $sd, $se, $sf, $sg, $sh, $si, $sj, $sk, $sl, $sm, $sn, $so, $sp, $sq, $sr, $ss, $st, $su, $sv, $sw, $sx, $sy, $sz) + { + return @$this->conn->Concat($sa, $sb, $sc, $sd, $se, $sf, $sg, $sh, $si, $sj, $sk, $sl, $sm, $sn, $so, $sp, $sq, $sr, $ss, $st, $su, $sv, $sw, $sx, $sy, $sz); + } + + /** + * Portable IFNULL public function (NVL in Oracle). + * + * Example + * $sql = 'SELECT '.$GLOBALS['xoopsDB']->conn->IfNull('name', "'- unknown -'"). ' FROM table'; + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql); + * + * @param string $field data to be encoded. + * @param string $nullReplacementValue Replace NULL with this value. + * @return string a string that represents the public function that checks whether a $field is null for the given database, and if null, change the value returned to $nullReplacementValue. + */ + public function setIfNull($field, $nullReplacementValue) + { + return @$this->conn->IfNull($field, $nullReplacementValue); + } + + /** + * This is not a public function, but a property + * Some databases have "length" and others "len" as the public function to measure the length of a string + * + * Example + * $sql = "SELECT ".$GLOBALS['xoopsDB']->conn->length()."(field) from table + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql); + * + * @return integer public function to measure the length of a string + */ + public function getLength() + { + return @$this->conn->length; + } + + /** + * This is not a public function, but a property. This is a string that holds the sql to generate a random number + * + * @return float between 0.0 and 1.0 inclusive + */ + public function getRandom() + { + return @$this->conn->random; + } + + /** + * This is not a public function, but a property + * Some databases have "substr" and others "substring" as the public function to retrieve a sub-string. + * the 1st parameter of substr is the field, the 2nd is the offset (1-based) to the beginning of + * the sub-string, and the 3rd is the length of the sub-string + * + * Example + * $sql = "SELECT ".$GLOBALS['xoopsDB']->conn->substr."(field, $offset, $length) from table"; + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql); + * + * @return string parameter for substr for $this->Execute + */ + public function getSubstr() + { + return @$this->conn->substr; + } + + /** + * Format the $date in the format the database accepts. + * + * Example + * $sql = "select * from atable where created > ".$GLOBALS['xoopsDB']->conn->DBDate("$year-$month-$day") + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql); + * + * @param string $date date string in format of $year-$month-$day + * @return string the date as a quoted string + */ + public function fetchDBDate($date) + { + return @$this->conn->DBDate($date); + } + + /** + * Format the $date in the bind format the database accepts. + * Normally this means that the date string is not quoted, unlike DBDate, which quotes the string. + * + * Example + * $sql = "select * from atable where created > ".$GLOBALS['xoopsDB']->conn->Param('0') + * OR $sql = "select * from atable where created > ?"; + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql,array($GLOBALS['xoopsDB']->conn->BindDate("$year-$month-$day")); + * + * @param string $date date string in format of $year-$month-$day + * @return string the date as a quoted string + */ + public function fetchBindDate($date) + { + return @$this->conn->BindDate($date); + } + + /** + * Format the timestamp $ts in the format the database accepts; this can be a Unix integer timestamp or an ISO format Y-m-d H:i:s. + * + * Example + * $sql = "select * from atable where created > ".$GLOBALS['xoopsDB']->conn->DBTimeStamp("$year-$month-$day $hr:$min:$secs") + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql); + * + * @param string/integer $ts time & date in the format the database accepts; this can be a Unix integer timestamp or an ISO format Y-m-d H:i:s. + * @return string the timestamp as a quoted string. + */ + public function fetchDBTimeStamp($ts) + { + return @$this->conn->DBTimeStamp($ts); + } + + + /** + * Format the $date in the bind format the database accepts. + * Normally this means that the date string is not quoted, unlike DBDate, which quotes the string. + * + * Example + * $sql = "select * from atable where created > ".$GLOBALS['xoopsDB']->conn->Param('0') + * OR $sql = "select * from atable where created > ?"; + * $rs = $GLOBALS['xoopsDB']->conn->Execute($sql,array($GLOBALS['xoopsDB']->conn->BindTimeStamp("$year-$month-$day $hr:$min:$secs")); + * + * @param string/integer $ts time & date in the format the database accepts; this can be a Unix integer timestamp or an ISO format Y-m-d H:i:s. + * @return string the date as a quoted string + */ + public function fetchBindTimeStamp($ts) + { + return @$this->conn->BindTimeStamp($ts); + } + + + + /** + * Parses the date string $str and returns it in unix mktime format + * Expects the date to be in Y-m-d H:i:s format, except for Sybase and Microsoft SQL Server, + * where M d Y is also accepted + * + * @param string $str the date string. + * @return intger UNIX Time Stamp + */ + public function fetchUnixDate($str) + { + return @$this->conn->UnixDate($str); + } + + /** + * Parses the timestamp string $str and returns it in unix mktime format + * + * @param string $str the date string - Expects the date to to be in "Y-m-d, H:i:s" (1970-12-24, 00:00:00) <br /> + * or "Y-m-d H:i:s" (1970-12-24 00:00:00) + * or "YmdHis" (19701225000000) format, + * except for Sybase and Microsoft SQL Server, + * where "M d Y h:i:sA" (Dec 25 1970 00:00:00AM) + * @return intger UNIX Time Stamp + */ + public function fetchUnixTimeStamp($str) + { + return @$this->conn->UnixTimeStamp($str); + } + + /** + * Allows you to calculate future and past dates based on $basedate in a portable fashion. + * + * Example; + * # get date one week from now + * $fld = $GLOBALS['xoopsDB']->conn->OffsetDate(7); // returns "(trunc(sysdate)+7") + * + * # get date and time that is 60 hours from current date and time + * $fld = $GLOBALS['xoopsDB']->conn->OffsetDate(2.5, $GLOBALS['xoopsDB']->conn->sysTimeStamp); // returns "(sysdate+2.5)" + * + * @param decimal $dayFraction Rounding Decimal Point of the Number if Days in Fractions. + * @param integer $basedate If not defined, then the current date (at 12 midnight) is used. + * @return string the decoded blob value + */ + public function fetchOffsetDate($dayFraction, $basedate=false) + { + return @$this->conn->OffsetDate($dayFraction, $basedate); + } + + /** + * Returns a string which contains the native SQL public functions to format a date + * + * For example to display total cost of goods sold broken by quarter; + * $sqlfn = $GLOBALS['xoopsDB']->conn->SQLDate('Y-QQ','postdate'); # get sql that formats postdate to output 2002-Q1 + * $sql = "SELECT $sqlfn,SUM(cogs) FROM table GROUP BY $sqlfn ORDER BY 1 desc"; + * + * @param string $dateFormat It uses a date formating string, which supports:. + * Y: 4-digit Year + * Q: Quarter (1-4) + * M: Month (Jan-Dec) + * m: Month (01-12) + * d: Day (01-31) + * H: Hour (00-23) + * h: Hour (1-12) + * i: Minute (00-59) + * s: Second (00-60) + * w: day of week (0-6 or 1-7 depending on DB) + * l: day of week (as string - lowercase L) + * W: week in year (0..53 for MySQL, 1..53 for PostgreSQL and Oracle) + * A: AM/PM indicator + * @param integer $basedate If not defined, then the current date (at 12 midnight) is used. + * @return string the encoded date string based on formating. + */ + public function fetchSQLDate($dateFormat, $basedate=false) + { + return @$this->conn->SQLDate($dateFormat, $basedate); + } + + /** + * Lock a table row for the duration of a transaction + * + * For example to lock record $id in table1; + * $GLOBALS['xoopsDB']->conn->StartTrans(); + * $GLOBALS['xoopsDB']->conn->RowLock("table1","rowid=$id"); + * $GLOBALS['xoopsDB']->conn->Execute($sql1); + * $GLOBALS['xoopsDB']->conn->Execute($sql2); + * $GLOBALS['xoopsDB']->conn->CompleteTrans(); + * + * @param string $table table where lockin is to occure. + * @param string $where where clause for lockin of table. + * @return boolean true on successful. + */ + public function setRowLock($table,$where) + { + return @$this->conn->RowLock($table,$where); + } + + /** + * generate an ID for a new row + * + * This is for compatibility only. Will always return 0, because MySQL supports + * autoincrement for primary keys. + * + * @param string $sequence name of the sequence from which to get the next ID + * @return int always 0, because mysql has support for autoincrement + */ + public function genId($sequence, $startID=1) + { + return @$this->conn->GenID($sequence, $startID); + } + + /** + * Create a sequence + * + * @param string $seqName key for sequences. + * @param integer $startID The next time GenID( ) is called, the value returned will be $startID + * @return boolean true on successful. + */ + public function setCreateSequence($seqName = 'xoops_adodb_seq', $startID=1) + { + return @$this->conn->CreateSequence($seqName, $startID); + } + + /** + * Delete a sequence + * + * @para... [truncated message content] |
From: <for...@us...> - 2012-02-15 10:24:59
|
Revision: 8985 http://xoops.svn.sourceforge.net/xoops/?rev=8985&view=rev Author: forxoops Date: 2012-02-15 10:24:49 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Revert DB Connector addition Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/manager.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/manager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/manager.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/manager.php 2012-02-15 10:24:49 UTC (rev 8985) @@ -0,0 +1,296 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Database manager for XOOPS + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package class + * @subpackage database + * @since 2.6.0 + * @author Haruki Setoyama <ha...@pl...> + * @version $Id$ + */ + +class XoopsDatabaseManager +{ + /** + * @var array + */ + private $s_tables = array(); + + /** + * @var array + */ + private $f_tables = array(); + + /** + * @var XoopsDatabase + */ + public $db; + + /** + * @var array + */ + public $successStrings = array( + 'create' => TABLE_CREATED, 'insert' => ROWS_INSERTED, 'alter' => TABLE_ALTERED, 'drop' => TABLE_DROPPED, + ); + + /** + * @var array + */ + public $failureStrings = array( + 'create' => TABLE_NOT_CREATED, 'insert' => ROWS_FAILED, 'alter' => TABLE_NOT_ALTERED, + 'drop' => TABLE_NOT_DROPPED, + ); + + /** + * + */ + public function __construct() + { + $this->db = XoopsDatabaseFactory::getDatabase(); + $this->db->setPrefix(XOOPS_DB_PREFIX); + $this->db->setLogger(XoopsLogger::getInstance()); + } + + /** + * @return bool + */ + public function isConnectable() + { + return ($this->db->connect(false) != false) ? true : false; + } + + /** + * @return bool + */ + public function dbExists() + { + return ($this->db->connect() != false) ? true : false; + } + + /** + * @return bool + */ + public function createDB() + { + $this->db->connect(false); + + $result = $this->db->query("CREATE DATABASE " . XOOPS_DB_NAME); + + return ($result != false) ? true : false; + } + + /** + * @param string $sql_file_path + * @return bool + */ + public function queryFromFile($sql_file_path) + { + if (!file_exists($sql_file_path)) { + return false; + } + $sql_query = trim(fread(fopen($sql_file_path, 'r'), filesize($sql_file_path))); + SqlUtility::splitMySqlFile($pieces, $sql_query); + $this->db->connect(); + foreach ($pieces as $piece) { + $piece = trim($piece); + // [0] contains the prefixed query + // [4] contains unprefixed table name + $prefixed_query = SqlUtility::prefixQuery($piece, $this->db->prefix()); + if ($prefixed_query != false) { + $table = $this->db->prefix($prefixed_query[4]); + if ($prefixed_query[1] == 'CREATE TABLE') { + if ($this->db->query($prefixed_query[0]) != false) { + if (!isset($this->s_tables['create'][$table])) { + $this->s_tables['create'][$table] = 1; + } + } else { + if (!isset($this->f_tables['create'][$table])) { + $this->f_tables['create'][$table] = 1; + } + } + } else { + if ($prefixed_query[1] == 'INSERT INTO') { + if ($this->db->query($prefixed_query[0]) != false) { + if (!isset($this->s_tables['insert'][$table])) { + $this->s_tables['insert'][$table] = 1; + } else { + $this->s_tables['insert'][$table]++; + } + } else { + if (!isset($this->f_tables['insert'][$table])) { + $this->f_tables['insert'][$table] = 1; + } else { + $this->f_tables['insert'][$table]++; + } + } + } else { + if ($prefixed_query[1] == 'ALTER TABLE') { + if ($this->db->query($prefixed_query[0]) != false) { + if (!isset($this->s_tables['alter'][$table])) { + $this->s_tables['alter'][$table] = 1; + } + } else { + if (!isset($this->s_tables['alter'][$table])) { + $this->f_tables['alter'][$table] = 1; + } + } + } else { + if ($prefixed_query[1] == 'DROP TABLE') { + if ($this->db->query('DROP TABLE ' . $table) != false) { + if (!isset($this->s_tables['drop'][$table])) { + $this->s_tables['drop'][$table] = 1; + } + } else { + if (!isset($this->s_tables['drop'][$table])) { + $this->f_tables['drop'][$table] = 1; + } + } + } + } + } + } + } + } + return true; + } + + /** + * @return string + */ + public function report() + { + $commands = array('create', 'insert', 'alter', 'drop'); + $content = '<ul class="log">'; + foreach ($commands as $cmd) { + if (!@empty($this->s_tables[$cmd])) { + foreach ($this->s_tables[$cmd] as $key => $val) { + $content .= '<li class="success">'; + $content .= ($cmd != 'insert') ? sprintf($this->successStrings[$cmd], $key) + : sprintf($this->successStrings[$cmd], $val, $key); + $content .= "</li>\n"; + } + } + } + foreach ($commands as $cmd) { + if (!@empty($this->f_tables[$cmd])) { + foreach ($this->f_tables[$cmd] as $key => $val) { + $content .= '<li class="failure">'; + $content .= ($cmd != 'insert') ? sprintf($this->failureStrings[$cmd], $key) + : sprintf($this->failureStrings[$cmd], $val, $key); + $content .= "</li>\n"; + } + } + } + $content .= '</ul>'; + return $content; + } + + /** + * @param $sql + * @return bool|resource + */ + public function query($sql) + { + $this->db->connect(); + return $this->db->query($sql); + } + + /** + * @param $table + * @return string + */ + public function prefix($table) + { + $this->db->connect(); + return $this->db->prefix($table); + } + + /** + * @param $ret + * @return array + */ + public function fetchArray($ret) + { + $this->db->connect(); + return $this->db->fetchArray($ret); + } + + /** + * @param $table + * @param $query + * @return bool|void + */ + public function insert($table, $query) + { + $this->db->connect(); + $table = $this->db->prefix($table); + $query = 'INSERT INTO ' . $table . ' ' . $query; + if (!$this->db->queryF($query)) { + if (!isset($this->f_tables['insert'][$table])) { + $this->f_tables['insert'][$table] = 1; + } else { + $this->f_tables['insert'][$table]++; + } + return false; + } else { + if (!isset($this->s_tables['insert'][$table])) { + $this->s_tables['insert'][$table] = 1; + } else { + $this->s_tables['insert'][$table]++; + } + return $this->db->getInsertId(); + } + } + + /** + * @return bool + */ + public function isError() + { + return (isset($this->f_tables)) ? true : false; + } + + /** + * @param $tables + * @return array + */ + public function deleteTables($tables) + { + $deleted = array(); + $this->db->connect(); + foreach ($tables as $key => $val) { + if (!$this->db->query("DROP TABLE " . $this->db->prefix($key))) { + $deleted[] = $val; + } + } + return $deleted; + } + + /** + * @param $table + * @return bool + */ + public function tableExists($table) + { + $table = trim($table); + $ret = false; + if ($table != '') { + $this->db->connect(); + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix($table); + $ret = (false != $this->db->query($sql)) ? true : false; + } + return $ret; + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/manager.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php 2012-02-15 10:05:15 UTC (rev 8984) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php 2012-02-15 10:24:49 UTC (rev 8985) @@ -100,326 +100,4 @@ } return $ret; } - - /** - * get sum of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @return array of counts - */ - public function getSum($field, $criteria = NULL) { - if (empty($field)) { - return false; - } - $idxfield = ''; - $groupby = false; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - if ($criteria->getGroupby() != '') { - $groupby = true; - $idxfield = $criteria->getGroupby() . ", "; - } - } - if ($groupby == false) { - $sql = "SELECT sum(`$field`) as result FROM `" . $this->table . "`"; - } else { - $sql = "SELECT `$idxfield`, sum(`$field`) as result FROM `" . $this->table . "`"; - } - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= $criteria->getGroupby(); - } - $result = $this->handler->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list ($sum) = $this->handler->db->fetchRow($result); - return $sum; - } else { - $ret = array(); - while (list ($id, $sum) = $this->handler->db->fetchRow($result)) { - $ret[$id] = $sum; - } - return $ret; - } - } - - /** - * get average of field matching a condition - * - * @param string $field field to base average on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @return array of counts - */ - function getAverage($field, $criteria = NULL) { - if (empty($field)) { - return false; - } - $idxfield = ''; - $groupby = false; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - if ($criteria->getGroupby() != '') { - $groupby = true; - $idxfield = $criteria->getGroupby() . ", "; - } - } - if ($groupby==false) { - $sql = "SELECT avg(`$field`) as result FROM `" . $this->table . "`"; - } else { - $sql = "SELECT `$idxfield`, avg(`$field`) as result FROM `" . $this->table . "`"; - } - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= $criteria->getGroupby(); - } - $result = $this->handler->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list ($avg) = $this->handler->db->fetchRow($result); - return $avg; - } else { - $ret = array(); - while (list ($id, $avg) = $this->handler->db->fetchRow($result)) { - $ret[$id] = $avg; - } - return $ret; - } - } - - /** - * get maximum of field matching a condition - * - * @param string $field field to base maximum value on - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @return array of counts - */ - function getMaximum($field, $criteria = NULL) { - if (empty($field)) { - return false; - } - $idxfield = ''; - $groupby = false; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - if ($criteria->getGroupby() != '') { - $groupby = true; - $idxfield = $criteria->getGroupby() . ", "; - } - } - if ($groupby==false) { - $sql = "SELECT max(`$field`) as result FROM `" . $this->table . "`"; - } else { - $sql = "SELECT `$idxfield`, max(`$field`) as result FROM `" . $this->table . "`"; - } - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= $criteria->getGroupby(); - } - $result = $this->handler->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list ($max) = $this->handler->db->fetchRow($result); - return $max; - } else { - $ret = array(); - while (list ($id, $max) = $this->handler->db->fetchRow($result)) { - $ret[$id] = $max; - } - return $ret; - } - } - - /** - * get minimum of field matching a condition - * - * @param string $field field to base minimum value on - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @return array of counts - */ - function getMinimum($field, $criteria = NULL) { - if (empty($field)) { - return false; - } - $idxfield = ''; - $groupby = false; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - if ($criteria->getGroupby() != '') { - $groupby = true; - $idxfield = $criteria->getGroupby() . ", "; - } - } - if ($groupby==false) { - $sql = "SELECT min(`$field`) as result FROM `" . $this->table . "`"; - } else { - $sql = "SELECT `$idxfield`, min(`$field`) as result FROM `" . $this->table . "`"; - } - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= $criteria->getGroupby(); - } - $result = $this->handler->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list ($min) = $this->handler->db->fetchRow($result); - return $min; - } else { - $ret = array(); - while (list ($id, $min) = $this->handler->db->fetchRow($result)) { - $ret[$id] = $min; - } - return $ret; - } - } - - /** - * get standard deviation of field matching a condition - * - * @param string $field field to base standard deviation value on - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @return array of counts - */ - function getDeviation($field, $criteria = NULL) { - if (empty($field)) { - return false; - } - $idxfield = ''; - $groupby = false; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - if ($criteria->getGroupby() != '') { - $groupby = true; - $idxfield = $criteria->getGroupby() . ", "; - } - } - if ($groupby==false) { - $sql = "SELECT stddev(`$field`) as result FROM `" . $this->table . "`"; - } else { - $sql = "SELECT `$idxfield`, stddev(`$field`) as result FROM `" . $this->table . "`"; - } - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= $criteria->getGroupby(); - } - $result = $this->handler->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list ($stddev) = $this->handler->db->fetchRow($result); - return $stddev; - } else { - $ret = array(); - while (list ($id, $stddev) = $this->handler->db->fetchRow($result)) { - $ret[$id] = $stddev; - } - return $ret; - } - } - - /** - * get standard variance of field matching a condition - * - * @param string $field field to base standard variance value on - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @return array of counts - */ - function getVariance($field, $criteria = NULL) { - if (empty($field)) { - return false; - } - $idxfield = ''; - $groupby = false; - if ($criteria->getGroupby() != '') { - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $groupby = true; - $idxfield = $criteria->getGroupby() . ", "; - } - } - if ($groupby==false) { - $sql = "SELECT variance(`$field`) as result FROM `" . $this->table . "`"; - } else { - $sql = "SELECT `$idxfield`, variance(`$field`) as result FROM `" . $this->table . "`"; - } - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= $criteria->getGroupby(); - } - $result = $this->handler->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list ($variance) = $this->handler->db->fetchRow($result); - return $variance; - } else { - $ret = array(); - while (list ($id, $variance) = $this->handler->db->fetchRow($result)) { - $ret[$id] = $variance; - } - return $ret; - } - } - - /** - * get CriteriaElement Object based on a filter string - * - * @param string $filter string to base filter on of criteria element - * @return CriteriaElement|null $criteria {@link CriteriaElement} - */ - function getFilterCriteria($filter) { - $parts = explode('|', $filter); - $criteria = new CriteriaCompo(); - foreach($parts as $part) { - $var = explode(',', $part); - if (!empty($var[1])&&!is_numeric($var[0])) { - $object = $this->create(); - if ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TXTBOX || - $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TXTAREA) { - $criteria->add(new Criteria('`'.$var[0].'`', '%'.$var[1].'%', (isset($var[2])?$var[2]:'LIKE'))); - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_INT || - $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_DECIMAL || - $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_FLOAT ) { - $criteria->add(new Criteria('`'.$var[0].'`', $var[1], (isset($var[2])?$var[2]:'='))); - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_STIME || - $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_MTIME || - $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_LTIME ) { - if (is_string($var[1])) { - $criteria->add(new Criteria('`'.$var[0].'`', strtotime($var[1]), (isset($var[2])?$var[2]:'='))); - } elseif (is_numeric($var[1])) { - $criteria->add(new Criteria('`'.$var[0].'`', $var[1], (isset($var[2])?$var[2]:'='))); - } - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_DATE ) { - if (is_numeric($var[1])&&!is_string($var[1])) { - $criteria->add(new Criteria('`'.$var[0].'`', date(_DBDATESTRING, $var[1]), (isset($var[2])?$var[2]:'='))); - } else { - $criteria->add(new Criteria('`'.$var[0].'`', date(_DBDATESTRING, strtotime($var[1])), (isset($var[2])?$var[2]:'='))); - } - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TIME ) { - if (is_numeric($var[1])&&!is_string($var[1])) { - $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTRING, $var[1]), (isset($var[2])?$var[2]:'='))); - } else { - $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTRING, strtotime($var[1])), (isset($var[2])?$var[2]:'='))); - } - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_TIMESTAMP ) { - if (is_numeric($var[1])&&!is_string($var[1])) { - $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTAMPSTRING, $var[1]), (isset($var[2])?$var[2]:'='))); - } else { - $criteria->add(new Criteria('`'.$var[0].'`', date(_DBTIMESTAMPSTRING, strtotime($var[1])), (isset($var[2])?$var[2]:'='))); - } - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_ENUM ) { - $criteria->add(new Criteria('`'.$var[0].'`', $var[1], (isset($var[2])?$var[2]:'='))); - } elseif ( $object->vars[$var[0]]['data_type']==XOBJ_DTYPE_ARRAY ) { - $criteria->add(new Criteria('`'.$var[0].'`', '%"'.$var[1].'";%', (isset($var[2])?$var[2]:'LIKE'))); - } - } elseif (!empty($var[1])&&is_numeric($var[0])) { - $criteria->add(new Criteria("'".$var[0]."'", $var[1])); - } - } - return $criteria; - } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-02-15 10:05:15 UTC (rev 8984) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-02-15 10:24:49 UTC (rev 8985) @@ -672,7 +672,7 @@ $attributes['rel'] = $rel; $this->addMeta('link', '', $attributes); } - + /** * Set a meta http-equiv value * Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2012-02-15 10:05:15 UTC (rev 8984) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2012-02-15 10:24:49 UTC (rev 8985) @@ -38,9 +38,7 @@ define('XOBJ_DTYPE_FLOAT', 13); define('XOBJ_DTYPE_DECIMAL', 14); define('XOBJ_DTYPE_ENUM', 15); -define('XOBJ_DTYPE_DATE', 22); -define('XOBJ_DTYPE_TIME', 23); -define('XOBJ_DTYPE_TIMESTAMP', 24); + /** * Base class for all objects in the Xoops kernel (and beyond) */ @@ -174,31 +172,7 @@ public function assignVar($key, $value) { if (isset($key) && isset($this->vars[$key])) { - switch ($this->vars[$key]['data_type']) { - case XOBJ_DTYPE_DATE: - if (!is_string($value)&&is_numeric($value)) { - $this->vars[$key]['value'] =& date(_DBDATESTRING, $value); - } else { - $this->vars[$key]['value'] =& date(_DBDATESTRING, strtotime($value)); - } - break; - case XOBJ_DTYPE_TIME: - if (!is_string($value)&&is_numeric($value)) { - $this->vars[$key]['value'] =& date(_DBTIMESTRING, $value); - } else { - $this->vars[$key]['value'] =& date(_DBTIMESTRING, strtotime($value)); - } - break; - case XOBJ_DTYPE_TIMESTAMP: - if (!is_string($value)&&is_numeric($value)) { - $this->vars[$key]['value'] =& date(_DBTIMESTAMPSTRING, $value); - } else { - $this->vars[$key]['value'] =& date(_DBTIMESTAMPSTRING, strtotime($value)); - } - break; - default: - $this->vars[$key]['value'] =& $value; - } + $this->vars[$key]['value'] = $value; } } @@ -347,126 +321,6 @@ $ret = $this->vars[$key]['value']; $ts = MyTextSanitizer::getInstance(); switch ($this->vars[$key]['data_type']) { - case XOBJ_DTYPE_DATE: - switch (strtolower($format)) { - case 's': - case 'show': - if (is_string($ret)&&!is_numeric($ret)) { - return date(_DBDATESTRING, strtotime($ret)); - } else { - return date(_DBDATESTRING, $ret); - } - break 1; - case 'e': - case 'edit': - if (is_string($ret)&&!is_numeric($ret)) { - return htmlspecialchars(date(_DBDATESTRING, strtotime($ret)), ENT_QUOTES); - } else { - return htmlspecialchars(date(_DBDATESTRING, $ret), ENT_QUOTES); - } - break 1; - case 'p': - case 'preview': - if (is_string($ret)&&!is_numeric($ret)) { - return $ts->stripSlashesGPC(date(_DBDATESTRING, strtotime($ret))); - } else { - return $ts->stripSlashesGPC(date(_DBDATESTRING, $ret)); - } - break 1; - case 'f': - case 'formpreview': - if (is_string($ret)&&!is_numeric($ret)) { - return htmlspecialchars($ts->stripSlashesGPC(date(_DBDATESTRING, strtotime($ret))), ENT_QUOTES); - } else { - return htmlspecialchars($ts->stripSlashesGPC(date(_DBDATESTRING, $ret)), ENT_QUOTES); - } - break 1; - case 'n': - case 'none': - default: - break 1; - } - break; - case XOBJ_DTYPE_TIME: - switch (strtolower($format)) { - case 's': - case 'show': - if (is_string($ret)&&!is_numeric($ret)) { - return date(_DBTIMESTRING, strtotime($ret)); - } else { - return date(_DBTIMESTRING, $ret); - } - break 1; - case 'e': - case 'edit': - if (is_string($ret)&&!is_numeric($ret)) { - return htmlspecialchars(date(_DBTIMESTRING, strtotime($ret)), ENT_QUOTES); - } else { - return htmlspecialchars(date(_DBTIMESTRING, $ret), ENT_QUOTES); - } - break 1; - case 'p': - case 'preview': - if (is_string($ret)&&!is_numeric($ret)) { - return $ts->stripSlashesGPC(date(_DBTIMESTRING, strtotime($ret))); - } else { - return $ts->stripSlashesGPC(date(_DBTIMESTRING, $ret)); - } - break 1; - case 'f': - case 'formpreview': - if (is_string($ret)&&!is_numeric($ret)) { - return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTRING, strtotime($ret))), ENT_QUOTES); - } else { - return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTRING, $ret)), ENT_QUOTES); - } - break 1; - case 'n': - case 'none': - default: - break 1; - } - break; - case XOBJ_DTYPE_TIMESTAMP: - switch (strtolower($format)) { - case 's': - case 'show': - if (is_string($ret)&&!is_numeric($ret)) { - return date(_DBTIMESTAMPSTRING, strtotime($ret)); - } else { - return date(_DBTIMESTAMPSTRING, $ret); - } - break 1; - case 'e': - case 'edit': - if (is_string($ret)&&!is_numeric($ret)) { - return htmlspecialchars(date(_DBTIMESTAMPSTRING, strtotime($ret)), ENT_QUOTES); - } else { - return htmlspecialchars(date(_DBTIMESTAMPSTRING, $ret), ENT_QUOTES); - } - break 1; - case 'p': - case 'preview': - if (is_string($ret)&&!is_numeric($ret)) { - return $ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, strtotime($ret))); - } else { - return $ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, $ret)); - } - break 1; - case 'f': - case 'formpreview': - if (is_string($ret)&&!is_numeric($ret)) { - return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, strtotime($ret))), ENT_QUOTES); - } else { - return htmlspecialchars($ts->stripSlashesGPC(date(_DBTIMESTAMPSTRING, $ret)), ENT_QUOTES); - } - break 1; - case 'n': - case 'none': - default: - break 1; - } - break; case XOBJ_DTYPE_TXTBOX: switch (strtolower($format)) { case 's': @@ -607,15 +461,6 @@ } else { $cleanv = is_string($cleanv) ? trim($cleanv) : $cleanv; switch ($v['data_type']) { - case XOBJ_DTYPE_TIMESTAMP: - $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTAMPSTRING, $cleanv) : date(_DBTIMESTAMPSTRING, strtotime($cleanv)); - break; - case XOBJ_DTYPE_TIME: - $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTRING, $cleanv) : date(_DBTIMESTRING, strtotime($cleanv)); - break; - case XOBJ_DTYPE_DATE: - $cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBDATESTRING, $cleanv) : date(_DBDATESTRING, strtotime($cleanv)); - break; case XOBJ_DTYPE_TXTBOX: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); @@ -1154,7 +999,7 @@ $select = '*'; } $sql = sprintf('SELECT %s FROM %s WHERE %s = %s', $select, $this->table, $this->keyName, $this->db->quote($id)); - if (!$result = $this->db->query($sql, null, null, null, $secondscached, $flushcache)) { + if (!$result = $this->db->query($sql)) { return $object; } if (!$this->db->getRowsNum($result)) { @@ -1251,11 +1096,11 @@ * @param bool $as_object return an array of objects * @return array */ - public function getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true, $secondscached = 0, $flushcache = false) + public function getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); - $ret = $handler->getObjects($criteria, $id_as_key, $as_object, $secondscached, $flushcache); + $ret = $handler->getObjects($criteria, $id_as_key, $as_object); return $ret; } @@ -1268,11 +1113,11 @@ * @param bool $id_as_key use the ID as key for the array * @return array of objects/array {@link XoopsObject} */ - public function getAll(CriteriaElement $criteria = null, $fields = null, $asObject = true, $id_as_key = true, $secondscached = 0, $flushcache = false) + public function getAll(CriteriaElement $criteria = null, $fields = null, $asObject = true, $id_as_key = true) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); - $ret = $handler->getAll($criteria, $fields, $asObject, $id_as_key, $secondscached, $flushcache); + $ret = $handler->getAll($criteria, $fields, $asObject, $id_as_key); return $ret; } @@ -1284,11 +1129,11 @@ * @param int $start Which record to start at * @return array */ - public function getList(CriteriaElement $criteria = null, $limit = 0, $start = 0, $secondscached = 0, $flushcache = false) + public function getList(CriteriaElement $criteria = null, $limit = 0, $start = 0) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); - $ret = $handler->getList($criteria, $limit, $start, $secondscached, $flushcache); + $ret = $handler->getList($criteria, $limit, $start); return $ret; } @@ -1298,11 +1143,11 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return array of object IDs */ - public function getIds(CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) + public function getIds(CriteriaElement $criteria = null) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); - $ret = $handler->getIds($criteria, $secondscached, $flushcache); + $ret = $handler->getIds($criteria); return $ret; } @@ -1318,127 +1163,28 @@ * count objects matching a condition * * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true * @return int count of objects */ - public function getCount(CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) + public function getCount(CriteriaElement $criteria = null) { /* @var $handler XoopsModelStats */ $handler = $this->loadHandler('stats'); - return $handler->getCount($criteria, $secondscached, $flushcache); + return $handler->getCount($criteria); } /** * Get counts of objects matching a condition * * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true * @return array of counts */ - public function getCounts(CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) + public function getCounts(CriteriaElement $criteria = null) { /* @var $handler XoopsModelStats*/ $handler = $this->loadHandler('stats'); - return $handler->getCounts($criteria, $secondscached, $flushcache); + return $handler->getCounts($criteria); } - - /** - * get sum of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true - * @return array of sum if grouped or int of sum - */ - public function getSum($field, CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) - { - /* @var $handler XoopsModelStats */ - $handler = $this->loadHandler('stats'); - return $handler->getSum($field, $criteria, $secondscached, $flushcache); - } - - /** - * get average of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true - * @return array of sum if grouped or int of sum - */ - public function getAverage($field, CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) - { - /* @var $handler XoopsModelStats */ - $handler = $this->loadHandler('stats'); - return $handler->getAverage($field, $criteria, $secondscached, $flushcache); - } - - /** - * get maximum of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true - * @return array of maximum if grouped or int of maximum - */ - public function getMaximum($field, CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) - { - /* @var $handler XoopsModelStats */ - $handler = $this->loadHandler('stats'); - return $handler->getMaximum($field, $criteria, $secondscached, $flushcache); - } - /** - * get minimum of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true - * @return array of minimum if grouped or int of minimum - */ - public function getMinimum($field, CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) - { - /* @var $handler XoopsModelStats */ - $handler = $this->loadHandler('stats'); - return $handler->getMinimum($field, $criteria, $secondscached, $flushcache); - } - - /** - * get deviation of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true - * @return array of deviation if grouped or int of deviation - */ - public function getDeviation($field, CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) - { - /* @var $handler XoopsModelStats */ - $handler = $this->loadHandler('stats'); - return $handler->getDeviation($field, $criteria, $secondscached, $flushcache); - } - - /** - * get variance of field matching a condition - * - * @param string $field field to base sum on to match in criteria if set - * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true - * @return array of variance if grouped or int of variance - */ - public function getVariance($field, CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) - { - /* @var $handler XoopsModelStats */ - $handler = $this->loadHandler('stats'); - return $handler->getVariance($field, $criteria, $secondscached, $flushcache); - } /** * *#@- */ @@ -1455,11 +1201,9 @@ * @param bool $asObject flag indicating as object, otherwise as array * @param string $field_link field of linked object for JOIN * @param string $field_object field of current object for JOIN - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true * @return array of objects {@link XoopsObject} */ - public function getByLink(CriteriaElement $criteria = null, $fields = null, $asObject = true, $field_link = null, $field_object = null, $secondscached = 0, $flushcache = false) + public function getByLink(CriteriaElement $criteria = null, $fields = null, $asObject = true, $field_link = null, $field_object = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); @@ -1471,15 +1215,13 @@ * Count of objects matching a condition * * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true * @return int count of objects */ - public function getCountByLink(CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) + public function getCountByLink(CriteriaElement $criteria = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); - $ret = $handler->getCountByLink($criteria, $secondscached, $flushcache); + $ret = $handler->getCountByLink($criteria); return $ret; } @@ -1487,15 +1229,13 @@ * array of count of objects matching a condition of, groupby linked object keyname * * @param CriteriaElement|null $criteria {@link CriteriaElement} to match - * @param integer $secondscached result based on SQL Statement will be file cached for this amount of second - * @param boolean $flushcache result based on SQL Statement will be from database and file cached will be cleared when true * @return int count of objects */ - public function getCountsByLink(CriteriaElement $criteria = null, $secondscached = 0, $flushcache = false) + public function getCountsByLink(CriteriaElement $criteria = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); - $ret = $handler->getCountsByLink($criteria, $secondscached, $flushcache); + $ret = $handler->getCountsByLink($criteria); return $ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2012-02-19 18:09:18
|
Revision: 9027 http://xoops.svn.sourceforge.net/xoops/?rev=9027&view=rev Author: forxoops Date: 2012-02-19 18:09:08 +0000 (Sun, 19 Feb 2012) Log Message: ----------- Replace bootstrap version to the lastest Replace some system tool by plugin Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/regstep.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/module.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/js/module.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/groups.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/plugins.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/users.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_breadcrumb.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tabs.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tips.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_groups.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_header.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_available.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_card.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_logger.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_menu.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_table.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_plugins.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_users.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/menu.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/blocks.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/comments.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/configuration.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/edituser.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/groups.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/help.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/images.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/mailuser.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/modules.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/prefs.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/tpls.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/ddsmoothmenu.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/tooltip.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/head.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/avatars.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/avatars.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/banners.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_avatars.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_banners.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/formenu.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/menu.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/styleswitch.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/tabs.jquery.tools.min.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/topbar.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-02-19 12:59:12 UTC (rev 9026) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-02-19 18:09:08 UTC (rev 9027) @@ -184,7 +184,7 @@ { $ret['title'] = $title; $ret['link'] = $link; - $ret['icon'] = XOOPS_URL . '/media/xoops/images/icons/32/' . $icon . '.png'; + $ret['icon'] = $icon; $ret['extra'] = $extra; $this->_itemButton[] = $ret; return true; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css 2012-02-19 12:59:12 UTC (rev 9026) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css 2012-02-19 18:09:08 UTC (rev 9027) @@ -1,1119 +1,1110 @@ -.icon, .icon-disabled { - display: inline !important; - display: -moz-inline-stack !important; - display: inline-block !important; - zoom: 1; - width: 16px !important; - height: 16px !important; - overflow: hidden !important; - padding: 0 !important; - border: 0 !important; - margin: 0 !important; - vertical-align: middle !important; - line-height: 0 !important; - font-size: 0 !important; - text-decoration: none !important; - text-indent: -999px !important; - background-color: transparent !important; - background-image: url('../images/icons/icons.png') !important; +[class^="ico-"], [class*=" ico-"] { + display: inline-block; + width: 16px; + height: 16px; + line-height: 14px; + vertical-align: text-top; + background-image: url("../images/icons/icons.png"); + background-position: 16px 16px; + background-repeat: no-repeat; + *margin-right: .3em; } -.icon-disabled { - background-image: url('../images/icons/icons-disabled.png') !important; - cursor: default; +[class^="ico-"]:last-child, [class*=" ico-"]:last-child { + *margin-left: 0; } -.icon-add{background-position: 0 0;} -.icon-anchor{background-position: 0 -26px;} -.icon-application{background-position: 0 -52px;} -.icon-application-add{background-position: 0 -78px;} -.icon-application-cascade{background-position: 0 -104px;} -.icon-application-delete{background-position: 0 -130px;} -.icon-application-double{background-position: 0 -156px;} -.icon-application-edit{background-position: 0 -182px;} -.icon-application-error{background-position: 0 -208px;} -.icon-application-form{background-position: 0 -234px;} -.icon-application-form-add{background-position: 0 -260px;} -.icon-application-form-delete{background-position: 0 -286px;} -.icon-application-form-edit{background-position: 0 -312px;} -.icon-application-form-magnify{background-position: 0 -338px;} -.icon-application-get{background-position: 0 -364px;} -.icon-application-go{background-position: 0 -390px;} -.icon-application-home{background-position: 0 -416px;} -.icon-application-key{background-position: 0 -442px;} -.icon-application-lightning{background-position: 0 -468px;} -.icon-application-link{background-position: 0 -494px;} -.icon-application-osx{background-position: 0 -520px;} -.icon-application-osx-terminal{background-position: 0 -546px;} -.icon-application-put{background-position: 0 -572px;} -.icon-application-side-boxes{background-position: 0 -598px;} -.icon-application-side-contract{background-position: 0 -624px;} -.icon-application-side-expand{background-position: 0 -650px;} -.icon-application-side-list{background-position: 0 -676px;} -.icon-application-side-tree{background-position: 0 -702px;} -.icon-application-split{background-position: 0 -728px;} -.icon-application-tile-horizontal{background-position: 0 -754px;} -.icon-application-tile-vertical{background-position: 0 -780px;} -.icon-application-view-columns{background-position: 0 -806px;} -.icon-application-view-detail{background-position: 0 -832px;} -.icon-application-view-gallery{background-position: 0 -858px;} -.icon-application-view-icons{background-position: 0 -884px;} -.icon-application-view-list{background-position: 0 -910px;} -.icon-application-view-tile{background-position: 0 -936px;} -.icon-application-xp{background-position: 0 -962px;} -.icon-application-xp-terminal{background-position: 0 -988px;} -.icon-arrow-branch{background-position: 0 -1014px;} -.icon-arrow-divide{background-position: 0 -1040px;} -.icon-arrow-down{background-position: 0 -1066px;} -.icon-arrow-in{background-position: 0 -1092px;} -.icon-arrow-inout{background-position: 0 -1118px;} -.icon-arrow-join{background-position: 0 -1144px;} -.icon-arrow-left{background-position: 0 -1170px;} -.icon-arrow-merge{background-position: 0 -1196px;} -.icon-arrow-out{background-position: 0 -1222px;} -.icon-arrow-redo{background-position: 0 -1248px;} -.icon-arrow-refresh{background-position: 0 -1274px;} -.icon-arrow-refresh-small{background-position: 0 -1300px;} -.icon-arrow-right{background-position: 0 -1326px;} -.icon-arrow-rotate-anticlockwise{background-position: 0 -1352px;} -.icon-arrow-rotate-clockwise{background-position: 0 -1378px;} -.icon-arrow-switch{background-position: 0 -1404px;} -.icon-arrow-turn-left{background-position: 0 -1430px;} -.icon-arrow-turn-right{background-position: 0 -1456px;} -.icon-arrow-undo{background-position: 0 -1482px;} -.icon-arrow-up{background-position: 0 -1508px;} -.icon-asterisk1{background-position: 0 -1534px;} -.icon-asterisk2{background-position: 0 -1560px;} -.icon-asterisk3{background-position: 0 -1586px;} -.icon-asterisk4{background-position: 0 -1612px;} -.icon-asterisk5{background-position: 0 -1638px;} -.icon-asterisk6{background-position: 0 -1664px;} -.icon-asterisk7{background-position: 0 -1690px;} -.icon-attach{background-position: 0 -1716px;} -.icon-award-star-add{background-position: 0 -1742px;} -.icon-award-star-bronze-1{background-position: 0 -1768px;} -.icon-award-star-bronze-2{background-position: 0 -1794px;} -.icon-award-star-bronze-3{background-position: 0 -1820px;} -.icon-award-star-delete{background-position: 0 -1846px;} -.icon-award-star-gold-1{background-position: 0 -1872px;} -.icon-award-star-gold-2{background-position: 0 -1898px;} -.icon-award-star-gold-3{background-position: 0 -1924px;} -.icon-award-star-silver-1{background-position: 0 -1950px;} -.icon-award-star-silver-2{background-position: 0 -1976px;} -.icon-award-star-silver-3{background-position: -26px 0;} -.icon-basket{background-position: -26px -26px;} -.icon-basket-add{background-position: -26px -52px;} -.icon-basket-delete{background-position: -26px -78px;} -.icon-basket-edit{background-position: -26px -104px;} -.icon-basket-error{background-position: -26px -130px;} -.icon-basket-go{background-position: -26px -156px;} -.icon-basket-put{background-position: -26px -182px;} -.icon-basket-remove{background-position: -26px -208px;} -.icon-bell{background-position: -26px -234px;} -.icon-bell-add{background-position: -26px -260px;} -.icon-bell-delete{background-position: -26px -286px;} -.icon-bell-error{background-position: -26px -312px;} -.icon-bell-go{background-position: -26px -338px;} -.icon-bell-link{background-position: -26px -364px;} -.icon-bin{background-position: -26px -390px;} -.icon-bin-closed{background-position: -26px -416px;} -.icon-bin-empty{background-position: -26px -442px;} -.icon-bomb{background-position: -26px -468px;} -.icon-book{background-position: -26px -494px;} -.icon-book-add{background-position: -26px -520px;} -.icon-book-addresses{background-position: -26px -546px;} -.icon-book-delete{background-position: -26px -572px;} -.icon-book-edit{background-position: -26px -598px;} -.icon-book-error{background-position: -26px -624px;} -.icon-book-go{background-position: -26px -650px;} -.icon-book-key{background-position: -26px -676px;} -.icon-book-link{background-position: -26px -702px;} -.icon-book-next{background-position: -26px -728px;} -.icon-book-open{background-position: -26px -754px;} -.icon-book-previous{background-position: -26px -780px;} -.icon-box{background-position: -26px -806px;} -.icon-brick{background-position: -26px -832px;} -.icon-brick-add{background-position: -26px -858px;} -.icon-brick-delete{background-position: -26px -884px;} -.icon-brick-edit{background-position: -26px -910px;} -.icon-brick-error{background-position: -26px -936px;} -.icon-brick-go{background-position: -26px -962px;} -.icon-brick-link{background-position: -26px -988px;} -.icon-bricks{background-position: -26px -1014px;} -.icon-briefcase{background-position: -26px -1040px;} -.icon-bug{background-position: -26px -1066px;} -.icon-bug-add{background-position: -26px -1092px;} -.icon-bug-delete{background-position: -26px -1118px;} -.icon-bug-edit{background-position: -26px -1144px;} -.icon-bug-error{background-position: -26px -1170px;} -.icon-bug-go{background-position: -26px -1196px;} -.icon-bug-link{background-position: -26px -1222px;} -.icon-building{background-position: -26px -1248px;} -.icon-building-add{background-position: -26px -1274px;} -.icon-building-delete{background-position: -26px -1300px;} -.icon-building-edit{background-position: -26px -1326px;} -.icon-building-error{background-position: -26px -1352px;} -.icon-building-go{background-position: -26px -1378px;} -.icon-building-key{background-position: -26px -1404px;} -.icon-building-link{background-position: -26px -1430px;} -.icon-bullet-add{background-position: -26px -1456px;} -.icon-bullet-arrow-bottom{background-position: -26px -1482px;} -.icon-bullet-arrow-down{background-position: -26px -1508px;} -.icon-bullet-arrow-top{background-position: -26px -1534px;} -.icon-bullet-arrow-up{background-position: -26px -1560px;} -.icon-bullet-black{background-position: -26px -1586px;} -.icon-bullet-blue{background-position: -26px -1612px;} -.icon-bullet-delete{background-position: -26px -1638px;} -.icon-bullet-disk{background-position: -26px -1664px;} -.icon-bullet-error{background-position: -26px -1690px;} -.icon-bullet-feed{background-position: -26px -1716px;} -.icon-bullet-go{background-position: -26px -1742px;} -.icon-bullet-green{background-position: -26px -1768px;} -.icon-bullet-key{background-position: -26px -1794px;} -.icon-bullet-orange{background-position: -26px -1820px;} -.icon-bullet-picture{background-position: -26px -1846px;} -.icon-bullet-pink{background-position: -26px -1872px;} -.icon-bullet-purple{background-position: -26px -1898px;} -.icon-bullet-red{background-position: -26px -1924px;} -.icon-bullet-star{background-position: -26px -1950px;} -.icon-bullet-toggle-minus{background-position: -26px -1976px;} -.icon-bullet-toggle-plus{background-position: -52px 0;} -.icon-bullet-white{background-position: -52px -26px;} -.icon-bullet-wrench{background-position: -52px -52px;} -.icon-bullet-yellow{background-position: -52px -78px;} -.icon-cake{background-position: -52px -104px;} -.icon-calculator{background-position: -52px -130px;} -.icon-calculator-add{background-position: -52px -156px;} -.icon-calculator-delete{background-position: -52px -182px;} -.icon-calculator-edit{background-position: -52px -208px;} -.icon-calculator-error{background-position: -52px -234px;} -.icon-calculator-link{background-position: -52px -260px;} -.icon-calendar{background-position: -52px -286px;} -.icon-calendar-add{background-position: -52px -312px;} -.icon-calendar-delete{background-position: -52px -338px;} -.icon-calendar-edit{background-position: -52px -364px;} -.icon-calendar-link{background-position: -52px -390px;} -.icon-calendar-view-day{background-position: -52px -416px;} -.icon-calendar-view-month{background-position: -52px -442px;} -.icon-calendar-view-week{background-position: -52px -468px;} -.icon-camera{background-position: -52px -494px;} -.icon-camera-add{background-position: -52px -520px;} -.icon-camera-delete{background-position: -52px -546px;} -.icon-camera-edit{background-position: -52px -572px;} -.icon-camera-error{background-position: -52px -598px;} -.icon-camera-go{background-position: -52px -624px;} -.icon-camera-link{background-position: -52px -650px;} -.icon-camera-small{background-position: -52px -676px;} -.icon-cancel{background-position: -52px -702px;} -.icon-car{background-position: -52px -728px;} -.icon-car-add{background-position: -52px -754px;} -.icon-car-delete{background-position: -52px -780px;} -.icon-cart{background-position: -52px -806px;} -.icon-cart-add{background-position: -52px -832px;} -.icon-cart-delete{background-position: -52px -858px;} -.icon-cart-edit{background-position: -52px -884px;} -.icon-cart-error{background-position: -52px -910px;} -.icon-cart-go{background-position: -52px -936px;} -.icon-cart-put{background-position: -52px -962px;} -.icon-cart-remove{background-position: -52px -988px;} -.icon-cd{background-position: -52px -1014px;} -.icon-cd-add{background-position: -52px -1040px;} -.icon-cd-burn{background-position: -52px -1066px;} -.icon-cd-delete{background-position: -52px -1092px;} -.icon-cd-edit{background-position: -52px -1118px;} -.icon-cd-eject{background-position: -52px -1144px;} -.icon-cd-go{background-position: -52px -1170px;} -.icon-chart-bar{background-position: -52px -1196px;} -.icon-chart-bar-add{background-position: -52px -1222px;} -.icon-chart-bar-delete{background-position: -52px -1248px;} -.icon-chart-bar-edit{background-position: -52px -1274px;} -.icon-chart-bar-error{background-position: -52px -1300px;} -.icon-chart-bar-link{background-position: -52px -1326px;} -.icon-chart-curve{background-position: -52px -1352px;} -.icon-chart-curve-add{background-position: -52px -1378px;} -.icon-chart-curve-delete{background-position: -52px -1404px;} -.icon-chart-curve-edit{background-position: -52px -1430px;} -.icon-chart-curve-error{background-position: -52px -1456px;} -.icon-chart-curve-go{background-position: -52px -1482px;} -.icon-chart-curve-link{background-position: -52px -1508px;} -.icon-chart-line{background-position: -52px -1534px;} -.icon-chart-line-add{background-position: -52px -1560px;} -.icon-chart-line-delete{background-position: -52px -1586px;} -.icon-chart-line-edit{background-position: -52px -1612px;} -.icon-chart-line-error{background-position: -52px -1638px;} -.icon-chart-line-link{background-position: -52px -1664px;} -.icon-chart-organisation{background-position: -52px -1690px;} -.icon-chart-organisation-add{background-position: -52px -1716px;} -.icon-chart-organisation-delete{background-position: -52px -1742px;} -.icon-chart-pie{background-position: -52px -1768px;} -.icon-chart-pie-add{background-position: -52px -1794px;} -.icon-chart-pie-delete{background-position: -52px -1820px;} -.icon-chart-pie-edit{background-position: -52px -1846px;} -.icon-chart-pie-error{background-position: -52px -1872px;} -.icon-chart-pie-link{background-position: -52px -1898px;} -.icon-clock{background-position: -52px -1924px;} -.icon-clock-add{background-position: -52px -1950px;} -.icon-clock-delete{background-position: -52px -1976px;} -.icon-clock-edit{background-position: -78px 0;} -.icon-clock-error{background-position: -78px -26px;} -.icon-clock-go{background-position: -78px -52px;} -.icon-clock-link{background-position: -78px -78px;} -.icon-clock-pause{background-position: -78px -104px;} -.icon-clock-play{background-position: -78px -130px;} -.icon-clock-red{background-position: -78px -156px;} -.icon-clock-stop{background-position: -78px -182px;} -.icon-code-tag{background-position: -78px -208px;} -.icon-cog{background-position: -78px -234px;} -.icon-cog-add{background-position: -78px -260px;} -.icon-cog-delete{background-position: -78px -286px;} -.icon-cog-edit{background-position: -78px -312px;} -.icon-cog-error{background-position: -78px -338px;} -.icon-cog-go{background-position: -78px -364px;} -.icon-coins{background-position: -78px -390px;} -.icon-coins-add{background-position: -78px -416px;} -.icon-coins-delete{background-position: -78px -442px;} -.icon-color-swatch{background-position: -78px -468px;} -.icon-color-wheel{background-position: -78px -494px;} -.icon-comment{background-position: -78px -520px;} -.icon-comment-add{background-position: -78px -546px;} -.icon-comment-delete{background-position: -78px -572px;} -.icon-comment-edit{background-position: -78px -598px;} -.icon-comments{background-position: -78px -624px;} -.icon-comments-add{background-position: -78px -650px;} -.icon-comments-delete{background-position: -78px -676px;} -.icon-compress{background-position: -78px -702px;} -.icon-computer{background-position: -78px -728px;} -.icon-computer-add{background-position: -78px -754px;} -.icon-computer-delete{background-position: -78px -780px;} -.icon-computer-edit{background-position: -78px -806px;} -.icon-computer-error{background-position: -78px -832px;} -.icon-computer-go{background-position: -78px -858px;} -.icon-computer-key{background-position: -78px -884px;} -.icon-computer-link{background-position: -78px -910px;} -.icon-connect{background-position: -78px -936px;} -.icon-contrast{background-position: -78px -962px;} -.icon-contrast-decrease{background-position: -78px -988px;} -.icon-contrast-high{background-position: -78px -1014px;} -.icon-contrast-increase{background-position: -78px -1040px;} -.icon-contrast-low{background-position: -78px -1066px;} -.icon-control-eject-1{background-position: -78px -1092px;} -.icon-control-eject-2{background-position: -78px -1118px;} -.icon-control-eject-3{background-position: -78px -1144px;} -.icon-control-eject-4{background-position: -78px -1170px;} -.icon-control-eject-5{background-position: -78px -1196px;} -.icon-control-eject-6{background-position: -78px -1222px;} -.icon-control-eject-7{background-position: -78px -1248px;} -.icon-control-end-1{background-position: -78px -1274px;} -.icon-control-end-2{background-position: -78px -1300px;} -.icon-control-end-3{background-position: -78px -1326px;} -.icon-control-end-4{background-position: -78px -1352px;} -.icon-control-end-5{background-position: -78px -1378px;} -.icon-control-end-6{background-position: -78px -1404px;} -.icon-control-end-7{background-position: -78px -1430px;} +.ico-add{background-position: 0 0;} +.ico-anchor{background-position: 0 -26px;} +.ico-application{background-position: 0 -52px;} +.ico-application-add{background-position: 0 -78px;} +.ico-application-cascade{background-position: 0 -104px;} +.ico-application-delete{background-position: 0 -130px;} +.ico-application-double{background-position: 0 -156px;} +.ico-application-edit{background-position: 0 -182px;} +.ico-application-error{background-position: 0 -208px;} +.ico-application-form{background-position: 0 -234px;} +.ico-application-form-add{background-position: 0 -260px;} +.ico-application-form-delete{background-position: 0 -286px;} +.ico-application-form-edit{background-position: 0 -312px;} +.ico-application-form-magnify{background-position: 0 -338px;} +.ico-application-get{background-position: 0 -364px;} +.ico-application-go{background-position: 0 -390px;} +.ico-application-home{background-position: 0 -416px;} +.ico-application-key{background-position: 0 -442px;} +.ico-application-lightning{background-position: 0 -468px;} +.ico-application-link{background-position: 0 -494px;} +.ico-application-osx{background-position: 0 -520px;} +.ico-application-osx-terminal{background-position: 0 -546px;} +.ico-application-put{background-position: 0 -572px;} +.ico-application-side-boxes{background-position: 0 -598px;} +.ico-application-side-contract{background-position: 0 -624px;} +.ico-application-side-expand{background-position: 0 -650px;} +.ico-application-side-list{background-position: 0 -676px;} +.ico-application-side-tree{background-position: 0 -702px;} +.ico-application-split{background-position: 0 -728px;} +.ico-application-tile-horizontal{background-position: 0 -754px;} +.ico-application-tile-vertical{background-position: 0 -780px;} +.ico-application-view-columns{background-position: 0 -806px;} +.ico-application-view-detail{background-position: 0 -832px;} +.ico-application-view-gallery{background-position: 0 -858px;} +.ico-application-view-icons{background-position: 0 -884px;} +.ico-application-view-list{background-position: 0 -910px;} +.ico-application-view-tile{background-position: 0 -936px;} +.ico-application-xp{background-position: 0 -962px;} +.ico-application-xp-terminal{background-position: 0 -988px;} +.ico-arrow-branch{background-position: 0 -1014px;} +.ico-arrow-divide{background-position: 0 -1040px;} +.ico-arrow-down{background-position: 0 -1066px;} +.ico-arrow-in{background-position: 0 -1092px;} +.ico-arrow-inout{background-position: 0 -1118px;} +.ico-arrow-join{background-position: 0 -1144px;} +.ico-arrow-left{background-position: 0 -1170px;} +.ico-arrow-merge{background-position: 0 -1196px;} +.ico-arrow-out{background-position: 0 -1222px;} +.ico-arrow-redo{background-position: 0 -1248px;} +.ico-arrow-refresh{background-position: 0 -1274px;} +.ico-arrow-refresh-small{background-position: 0 -1300px;} +.ico-arrow-right{background-position: 0 -1326px;} +.ico-arrow-rotate-anticlockwise{background-position: 0 -1352px;} +.ico-arrow-rotate-clockwise{background-position: 0 -1378px;} +.ico-arrow-switch{background-position: 0 -1404px;} +.ico-arrow-turn-left{background-position: 0 -1430px;} +.ico-arrow-turn-right{background-position: 0 -1456px;} +.ico-arrow-undo{background-position: 0 -1482px;} +.ico-arrow-up{background-position: 0 -1508px;} +.ico-asterisk1{background-position: 0 -1534px;} +.ico-asterisk2{background-position: 0 -1560px;} +.ico-asterisk3{background-position: 0 -1586px;} +.ico-asterisk4{background-position: 0 -1612px;} +.ico-asterisk5{background-position: 0 -1638px;} +.ico-asterisk6{background-position: 0 -1664px;} +.ico-asterisk7{background-position: 0 -1690px;} +.ico-attach{background-position: 0 -1716px;} +.ico-award-star-add{background-position: 0 -1742px;} +.ico-award-star-bronze-1{background-position: 0 -1768px;} +.ico-award-star-bronze-2{background-position: 0 -1794px;} +.ico-award-star-bronze-3{background-position: 0 -1820px;} +.ico-award-star-delete{background-position: 0 -1846px;} +.ico-award-star-gold-1{background-position: 0 -1872px;} +.ico-award-star-gold-2{background-position: 0 -1898px;} +.ico-award-star-gold-3{background-position: 0 -1924px;} +.ico-award-star-silver-1{background-position: 0 -1950px;} +.ico-award-star-silver-2{background-position: 0 -1976px;} +.ico-award-star-silver-3{background-position: -26px 0;} +.ico-basket{background-position: -26px -26px;} +.ico-basket-add{background-position: -26px -52px;} +.ico-basket-delete{background-position: -26px -78px;} +.ico-basket-edit{background-position: -26px -104px;} +.ico-basket-error{background-position: -26px -130px;} +.ico-basket-go{background-position: -26px -156px;} +.ico-basket-put{background-position: -26px -182px;} +.ico-basket-remove{background-position: -26px -208px;} +.ico-bell{background-position: -26px -234px;} +.ico-bell-add{background-position: -26px -260px;} +.ico-bell-delete{background-position: -26px -286px;} +.ico-bell-error{background-position: -26px -312px;} +.ico-bell-go{background-position: -26px -338px;} +.ico-bell-link{background-position: -26px -364px;} +.ico-bin{background-position: -26px -390px;} +.ico-bin-closed{background-position: -26px -416px;} +.ico-bin-empty{background-position: -26px -442px;} +.ico-bomb{background-position: -26px -468px;} +.ico-book{background-position: -26px -494px;} +.ico-book-add{background-position: -26px -520px;} +.ico-book-addresses{background-position: -26px -546px;} +.ico-book-delete{background-position: -26px -572px;} +.ico-book-edit{background-position: -26px -598px;} +.ico-book-error{background-position: -26px -624px;} +.ico-book-go{background-position: -26px -650px;} +.ico-book-key{background-position: -26px -676px;} +.ico-book-link{background-position: -26px -702px;} +.ico-book-next{background-position: -26px -728px;} +.ico-book-open{background-position: -26px -754px;} +.ico-book-previous{background-position: -26px -780px;} +.ico-box{background-position: -26px -806px;} +.ico-brick{background-position: -26px -832px;} +.ico-brick-add{background-position: -26px -858px;} +.ico-brick-delete{background-position: -26px -884px;} +.ico-brick-edit{background-position: -26px -910px;} +.ico-brick-error{background-position: -26px -936px;} +.ico-brick-go{background-position: -26px -962px;} +.ico-brick-link{background-position: -26px -988px;} +.ico-bricks{background-position: -26px -1014px;} +.ico-briefcase{background-position: -26px -1040px;} +.ico-bug{background-position: -26px -1066px;} +.ico-bug-add{background-position: -26px -1092px;} +.ico-bug-delete{background-position: -26px -1118px;} +.ico-bug-edit{background-position: -26px -1144px;} +.ico-bug-error{background-position: -26px -1170px;} +.ico-bug-go{background-position: -26px -1196px;} +.ico-bug-link{background-position: -26px -1222px;} +.ico-building{background-position: -26px -1248px;} +.ico-building-add{background-position: -26px -1274px;} +.ico-building-delete{background-position: -26px -1300px;} +.ico-building-edit{background-position: -26px -1326px;} +.ico-building-error{background-position: -26px -1352px;} +.ico-building-go{background-position: -26px -1378px;} +.ico-building-key{background-position: -26px -1404px;} +.ico-building-link{background-position: -26px -1430px;} +.ico-bullet-add{background-position: -26px -1456px;} +.ico-bullet-arrow-bottom{background-position: -26px -1482px;} +.ico-bullet-arrow-down{background-position: -26px -1508px;} +.ico-bullet-arrow-top{background-position: -26px -1534px;} +.ico-bullet-arrow-up{background-position: -26px -1560px;} +.ico-bullet-black{background-position: -26px -1586px;} +.ico-bullet-blue{background-position: -26px -1612px;} +.ico-bullet-delete{background-position: -26px -1638px;} +.ico-bullet-disk{background-position: -26px -1664px;} +.ico-bullet-error{background-position: -26px -1690px;} +.ico-bullet-feed{background-position: -26px -1716px;} +.ico-bullet-go{background-position: -26px -1742px;} +.ico-bullet-green{background-position: -26px -1768px;} +.ico-bullet-key{background-position: -26px -1794px;} +.ico-bullet-orange{background-position: -26px -1820px;} +.ico-bullet-picture{background-position: -26px -1846px;} +.ico-bullet-pink{background-position: -26px -1872px;} +.ico-bullet-purple{background-position: -26px -1898px;} +.ico-bullet-red{background-position: -26px -1924px;} +.ico-bullet-star{background-position: -26px -1950px;} +.ico-bullet-toggle-minus{background-position: -26px -1976px;} +.ico-bullet-toggle-plus{background-position: -52px 0;} +.ico-bullet-white{background-position: -52px -26px;} +.ico-bullet-wrench{background-position: -52px -52px;} +.ico-bullet-yellow{background-position: -52px -78px;} +.ico-cake{background-position: -52px -104px;} +.ico-calculator{background-position: -52px -130px;} +.ico-calculator-add{background-position: -52px -156px;} +.ico-calculator-delete{background-position: -52px -182px;} +.ico-calculator-edit{background-position: -52px -208px;} +.ico-calculator-error{background-position: -52px -234px;} +.ico-calculator-link{background-position: -52px -260px;} +.ico-calendar{background-position: -52px -286px;} +.ico-calendar-add{background-position: -52px -312px;} +.ico-calendar-delete{background-position: -52px -338px;} +.ico-calendar-edit{background-position: -52px -364px;} +.ico-calendar-link{background-position: -52px -390px;} +.ico-calendar-view-day{background-position: -52px -416px;} +.ico-calendar-view-month{background-position: -52px -442px;} +.ico-calendar-view-week{background-position: -52px -468px;} +.ico-camera{background-position: -52px -494px;} +.ico-camera-add{background-position: -52px -520px;} +.ico-camera-delete{background-position: -52px -546px;} +.ico-camera-edit{background-position: -52px -572px;} +.ico-camera-error{background-position: -52px -598px;} +.ico-camera-go{background-position: -52px -624px;} +.ico-camera-link{background-position: -52px -650px;} +.ico-camera-small{background-position: -52px -676px;} +.ico-cancel{background-position: -52px -702px;} +.ico-car{background-position: -52px -728px;} +.ico-car-add{background-position: -52px -754px;} +.ico-car-delete{background-position: -52px -780px;} +.ico-cart{background-position: -52px -806px;} +.ico-cart-add{background-position: -52px -832px;} +.ico-cart-delete{background-position: -52px -858px;} +.ico-cart-edit{background-position: -52px -884px;} +.ico-cart-error{background-position: -52px -910px;} +.ico-cart-go{background-position: -52px -936px;} +.ico-cart-put{background-position: -52px -962px;} +.ico-cart-remove{background-position: -52px -988px;} +.ico-cd{background-position: -52px -1014px;} +.ico-cd-add{background-position: -52px -1040px;} +.ico-cd-burn{background-position: -52px -1066px;} +.ico-cd-delete{background-position: -52px -1092px;} +.ico-cd-edit{background-position: -52px -1118px;} +.ico-cd-eject{background-position: -52px -1144px;} +.ico-cd-go{background-position: -52px -1170px;} +.ico-chart-bar{background-position: -52px -1196px;} +.ico-chart-bar-add{background-position: -52px -1222px;} +.ico-chart-bar-delete{background-position: -52px -1248px;} +.ico-chart-bar-edit{background-position: -52px -1274px;} +.ico-chart-bar-error{background-position: -52px -1300px;} +.ico-chart-bar-link{background-position: -52px -1326px;} +.ico-chart-curve{background-position: -52px -1352px;} +.ico-chart-curve-add{background-position: -52px -1378px;} +.ico-chart-curve-delete{background-position: -52px -1404px;} +.ico-chart-curve-edit{background-position: -52px -1430px;} +.ico-chart-curve-error{background-position: -52px -1456px;} +.ico-chart-curve-go{background-position: -52px -1482px;} +.ico-chart-curve-link{background-position: -52px -1508px;} +.ico-chart-line{background-position: -52px -1534px;} +.ico-chart-line-add{background-position: -52px -1560px;} +.ico-chart-line-delete{background-position: -52px -1586px;} +.ico-chart-line-edit{background-position: -52px -1612px;} +.ico-chart-line-error{background-position: -52px -1638px;} +.ico-chart-line-link{background-position: -52px -1664px;} +.ico-chart-organisation{background-position: -52px -1690px;} +.ico-chart-organisation-add{background-position: -52px -1716px;} +.ico-chart-organisation-delete{background-position: -52px -1742px;} +.ico-chart-pie{background-position: -52px -1768px;} +.ico-chart-pie-add{background-position: -52px -1794px;} +.ico-chart-pie-delete{background-position: -52px -1820px;} +.ico-chart-pie-edit{background-position: -52px -1846px;} +.ico-chart-pie-error{background-position: -52px -1872px;} +.ico-chart-pie-link{background-position: -52px -1898px;} +.ico-clock{background-position: -52px -1924px;} +.ico-clock-add{background-position: -52px -1950px;} +.ico-clock-delete{background-position: -52px -1976px;} +.ico-clock-edit{background-position: -78px 0;} +.ico-clock-error{background-position: -78px -26px;} +.ico-clock-go{background-position: -78px -52px;} +.ico-clock-link{background-position: -78px -78px;} +.ico-clock-pause{background-position: -78px -104px;} +.ico-clock-play{background-position: -78px -130px;} +.ico-clock-red{background-position: -78px -156px;} +.ico-clock-stop{background-position: -78px -182px;} +.ico-code-tag{background-position: -78px -208px;} +.ico-cog{background-position: -78px -234px;} +.ico-cog-add{background-position: -78px -260px;} +.ico-cog-delete{background-position: -78px -286px;} +.ico-cog-edit{background-position: -78px -312px;} +.ico-cog-error{background-position: -78px -338px;} +.ico-cog-go{background-position: -78px -364px;} +.ico-coins{background-position: -78px -390px;} +.ico-coins-add{background-position: -78px -416px;} +.ico-coins-delete{background-position: -78px -442px;} +.ico-color-swatch{background-position: -78px -468px;} +.ico-color-wheel{background-position: -78px -494px;} +.ico-comment{background-position: -78px -520px;} +.ico-comment-add{background-position: -78px -546px;} +.ico-comment-delete{background-position: -78px -572px;} +.ico-comment-edit{background-position: -78px -598px;} +.ico-comments{background-position: -78px -624px;} +.ico-comments-add{background-position: -78px -650px;} +.ico-comments-delete{background-position: -78px -676px;} +.ico-compress{background-position: -78px -702px;} +.ico-computer{background-position: -78px -728px;} +.ico-computer-add{background-position: -78px -754px;} +.ico-computer-delete{background-position: -78px -780px;} +.ico-computer-edit{background-position: -78px -806px;} +.ico-computer-error{background-position: -78px -832px;} +.ico-computer-go{background-position: -78px -858px;} +.ico-computer-key{background-position: -78px -884px;} +.ico-computer-link{background-position: -78px -910px;} +.ico-connect{background-position: -78px -936px;} +.ico-contrast{background-position: -78px -962px;} +.ico-contrast-decrease{background-position: -78px -988px;} +.ico-contrast-high{background-position: -78px -1014px;} +.ico-contrast-increase{background-position: -78px -1040px;} +.ico-contrast-low{background-position: -78px -1066px;} +.ico-control-eject-1{background-position: -78px -1092px;} +.ico-control-eject-2{background-position: -78px -1118px;} +.ico-control-eject-3{background-position: -78px -1144px;} +.ico-control-eject-4{background-position: -78px -1170px;} +.ico-control-eject-5{background-position: -78px -1196px;} +.ico-control-eject-6{background-position: -78px -1222px;} +.ico-control-eject-7{background-position: -78px -1248px;} +.ico-control-end-1{background-position: -78px -1274px;} +.ico-control-end-2{background-position: -78px -1300px;} +.ico-control-end-3{background-position: -78px -1326px;} +.ico-control-end-4{background-position: -78px -1352px;} +.ico-control-end-5{background-position: -78px -1378px;} +.ico-control-end-6{background-position: -78px -1404px;} +.ico-control-end-7{background-position: -78px -1430px;} -.icon-control-equalizer-1{background-position: -78px -1456px;} -.icon-control-equalizer-2{background-position: -78px -1482px;} -.icon-control-equalizer-3{background-position: -78px -1508px;} -.icon-control-equalizer-4{background-position: -78px -1534px;} -.icon-control-equalizer-5{background-position: -78px -1560px;} -.icon-control-equalizer-6{background-position: -78px -1586px;} -.icon-control-equalizer-7{background-position: -78px -1612px;} -.icon-control-fastforward-1{background-position: -78px -1638px;} -.icon-control-fastforward-2{background-position: -78px -1664px;} -.icon-control-fastforward-3{background-position: -78px -1690px;} -.icon-control-fastforward-4{background-position: -78px -1716px;} -.icon-control-fastforward-5{background-position: -78px -1742px;} -.icon-control-fastforward-6{background-position: -78px -1768px;} -.icon-control-fastforward-7{background-position: -78px -1794px;} -.icon-control-pause-1{background-position: -78px -1820px;} -.icon-control-pause-2{background-position: -78px -1846px;} -.icon-control-pause-3{background-position: -78px -1872px;} -.icon-control-pause-4{background-position: -78px -1898px;} -.icon-control-pause-5{background-position: -78px -1924px;} -.icon-control-pause-6{background-position: -78px -1950px;} -.icon-control-pause-7{background-position: -78px -1976px;} -.icon-control-play-1{background-position: -104px 0;} -.icon-control-play-2{background-position: -104px -26px;} -.icon-control-play-3{background-position: -104px -52px;} -.icon-control-play-4{background-position: -104px -78px;} -.icon-control-play-5{background-position: -104px -104px;} -.icon-control-play-6{background-position: -104px -130px;} -.icon-control-play-7{background-position: -104px -156px;} -.icon-control-repeat-1{background-position: -104px -182px;} -.icon-control-repeat-2{background-position: -104px -208px;} -.icon-control-repeat-3{background-position: -104px -234px;} -.icon-control-repeat-4{background-position: -104px -260px;} -.icon-control-repeat-5{background-position: -104px -286px;} -.icon-control-repeat-6{background-position: -104px -312px;} -.icon-control-repeat-7{background-position: -104px -338px;} -.icon-control-rewind-1{background-position: -104px -364px;} -.icon-control-rewind-2{background-position: -104px -390px;} -.icon-control-rewind-3{background-position: -104px -416px;} -.icon-control-rewind-4{background-position: -104px -442px;} -.icon-control-rewind-5{background-position: -104px -468px;} -.icon-control-rewind-6{background-position: -104px -494px;} -.icon-control-rewind-7{background-position: -104px -520px;} -.icon-control-start-1{background-position: -104px -546px;} -.icon-control-start-2{background-position: -104px -572px;} -.icon-control-start-3{background-position: -104px -598px;} -.icon-control-start-4{background-position: -104px -624px;} -.icon-control-start-5{background-position: -104px -650px;} -.icon-control-start-6{background-position: -104px -676px;} -.icon-control-start-7{background-position: -104px -702px;} -.icon-control-stop-1{background-position: -104px -728px;} -.icon-control-stop-2{background-position: -104px -754px;} -.icon-control-stop-3{background-position: -104px -780px;} -.icon-control-stop-4{background-position: -104px -806px;} -.icon-control-stop-5{background-position: -104px -832px;} -.icon-control-stop-6{background-position: -104px -858px;} -.icon-control-stop-7{background-position: -104px -884px;} -.icon-controller{background-position: -104px -910px;} -.icon-controller-add{background-position: -104px -936px;} -.icon-controller-delete{background-position: -104px -962px;} -.icon-controller-error{background-position: -104px -988px;} -.icon-creditcards{background-position: -104px -1014px;} -.icon-cross{background-position: -104px -1040px;} -.icon-css{background-position: -104px -1066px;} -.icon-css-add{background-position: -104px -1092px;} -.icon-css-delete{background-position: -104px -1118px;} -.icon-css-go{background-position: -104px -1144px;} -.icon-css-valid{background-position: -104px -1170px;} -.icon-cup{background-position: -104px -1196px;} -.icon-cup-add{background-position: -104px -1222px;} -.icon-cup-delete{background-position: -104px -1248px;} -.icon-cup-edit{background-position: -104px -1274px;} -.icon-cup-error{background-position: -104px -1300px;} -.icon-cup-go{background-position: -104px -1326px;} -.icon-cup-key{background-position: -104px -1352px;} -.icon-cup-link{background-position: -104px -1378px;} -.icon-cursor{background-position: -104px -1404px;} -.icon-cut{background-position: -104px -1430px;} -.icon-cut-red{background-position: -104px -1456px;} -.icon-database{background-position: -104px -1482px;} -.icon-database-add{background-position: -104px -1508px;} -.icon-database-connect{background-position: -104px -1534px;} -.icon-database-delete{background-position: -104px -1560px;} -.icon-database-edit{background-position: -104px -1586px;} -.icon-database-error{background-position: -104px -1612px;} -.icon-database-gear{background-position: -104px -1638px;} -.icon-database-go{background-position: -104px -1664px;} -.icon-database-key{background-position: -104px -1690px;} -.icon-database-lightning{background-position: -104px -1716px;} -.icon-database-link{background-position: -104px -1742px;} -.icon-database-refresh{background-position: -104px -1768px;} -.icon-database-save{background-position: -104px -1794px;} -.icon-database-table{background-position: -104px -1820px;} -.icon-date{background-position: -104px -1846px;} -.icon-date-add{background-position: -104px -1872px;} -.icon-date-delete{background-position: -104px -1898px;} -.icon-date-edit{background-position: -104px -1924px;} -.icon-date-error{background-position: -104px -1950px;} -.icon-date-go{background-position: -104px -1976px;} -.icon-date-link{background-position: -130px 0;} -.icon-date-magnify{background-position: -130px -26px;} -.icon-date-next{background-position: -130px -52px;} -.icon-date-previous{background-position: -130px -78px;} -.icon-delete{background-position: -130px -104px;} -.icon-disconnect{background-position: -130px -130px;} -.icon-disk{background-position: -130px -156px;} -.icon-disk-multiple{background-position: -130px -182px;} -.icon-dollar{background-position: -130px -208px;} -.icon-door{background-position: -130px -234px;} -.icon-door-in{background-position: -130px -260px;} -.icon-door-open{background-position: -130px -286px;} -.icon-door-out{background-position: -130px -312px;} -.icon-drink{background-position: -130px -338px;} -.icon-drink-empty{background-position: -130px -364px;} -.icon-drive{background-position: -130px -390px;} -.icon-drive-add{background-position: -130px -416px;} -.icon-drive-burn{background-position: -130px -442px;} -.icon-drive-cd{background-position: -130px -468px;} -.icon-drive-cd-empty{background-position: -130px -494px;} -.icon-drive-delete{background-position: -130px -520px;} -.icon-drive-disk{background-position: -130px -546px;} -.icon-drive-edit{background-position: -130px -572px;} -.icon-drive-error{background-position: -130px -598px;} -.icon-drive-go{background-position: -130px -624px;} -.icon-drive-key{background-position: -130px -650px;} -.icon-drive-link{background-position: -130px -676px;} -.icon-drive-magnify{background-position: -130px -702px;} -.icon-drive-network{background-position: -130px -728px;} -.icon-drive-rename{background-position: -130px -754px;} -.icon-drive-user{background-position: -130px -780px;} -.icon-drive-web{background-position: -130px -806px;} -.icon-dvd{background-position: -130px -832px;} -.icon-dvd-add{background-position: -130px -858px;} -.icon-dvd-delete{background-position: -130px -884px;} -.icon-dvd-edit{background-position: -130px -910px;} -.icon-dvd-error{background-position: -130px -936px;} -.icon-dvd-go{background-position: -130px -962px;} -.icon-dvd-key{background-position: -130px -988px;} -.icon-dvd-link{background-position: -130px -1014px;} -.icon-email{background-position: -130px -1040px;} -.icon-email-add{background-position: -130px -1066px;} -.icon-email-attach{background-position: -130px -1092px;} -.icon-email-delete{background-position: -130px -1118px;} -.icon-email-edit{background-position: -130px -1144px;} -.icon-email-error{background-position: -130px -1170px;} -.icon-email-go{background-position: -130px -1196px;} -.icon-email-link{background-position: -130px -1222px;} -.icon-email-open{background-position: -130px -1248px;} -.icon-email-open-image{background-position: -130px -1274px;} -.icon-emoticon-evilgrin{background-position: -130px -1300px;} -.icon-emoticon-grin{background-position: -130px -1326px;} -.icon-emoticon-happy{background-position: -130px -1352px;} -.icon-emoticon-smile{background-position: -130px -1378px;} -.icon-emoticon-surprised{background-position: -130px -1404px;} -.icon-emoticon-tongue{background-position: -130px -1430px;} -.icon-emoticon-unhappy{background-position: -130px -1456px;} -.icon-emoticon-waii{background-position: -130px -1482px;} -.icon-emoticon-wink{background-position: -130px -1508px;} -.icon-error{background-position: -130px -1534px;} -.icon-euro{background-position: -130px -1560px;} -.icon-exclamation{background-position: -130px -1586px;} -.icon-eye{background-position: -130px -1612px;} -.icon-feed{background-position: -130px -1638px;} -.icon-feed-add{background-position: -130px -1664px;} -.icon-feed-delete{background-position: -130px -1690px;} -.icon-feed-disk{background-position: -130px -1716px;} -.icon-feed-edit{background-position: -130px -1742px;} -.icon-feed-error{background-position: -130px -1768px;} -.icon-feed-go{background-position: -130px -1794px;} -.icon-feed-key{background-position: -130px -1820px;} -.icon-feed-link{background-position: -130px -1846px;} -.icon-feed-magnify{background-position: -130px -1872px;} -.icon-female{background-position: -130px -1898px;} -.icon-film{background-position: -130px -1924px;} -.icon-film-add{background-position: -130px -1950px;} -.icon-film-delete{background-position: -130px -1976px;} -.icon-film-edit{background-position: -156px 0;} -.icon-film-error{background-position: -156px -26px;} -.icon-film-go{background-position: -156px -52px;} -.icon-film-key{background-position: -156px -78px;} -.icon-film-link{background-position: -156px -104px;} -.icon-film-save{background-position: -156px -130px;} -.icon-find{background-position: -156px -156px;} -.icon-flag-blue{background-position: -156px -182px;} -.icon-flag-green{background-position: -156px -208px;} -.icon-flag-orange{background-position: -156px -234px;} -.icon-flag-pink{background-position: -156px -260px;} -.icon-flag-purple{background-position: -156px -286px;} -.icon-flag-red{background-position: -156px -312px;} -.icon-flag-yellow{background-position: -156px -338px;} -.icon-folder{background-position: -156px -364px;} -.icon-folder-add{background-position: -156px -390px;} -.icon-folder-bell{background-position: -156px -416px;} -.icon-folder-brick{background-position: -156px -442px;} -.icon-folder-bug{background-position: -156px -468px;} -.icon-folder-camera{background-position: -156px -494px;} -.icon-folder-database{background-position: -156px -520px;} -.icon-folder-delete{background-position: -156px -546px;} -.icon-folder-edit{background-position: -156px -572px;} -.icon-folder-error{background-position: -156px -598px;} -.icon-folder-explore{background-position: -156px -624px;} -.icon-folder-feed{background-position: -156px -650px;} -.icon-folder-find{background-position: -156px -676px;} -.icon-folder-go{background-position: -156px -702px;} -.icon-folder-heart{background-position: -156px -728px;} -.icon-folder-image{background-position: -156px -754px;} -.icon-folder-key{background-position: -156px -780px;} -.icon-folder-lightbulb{background-position: -156px -806px;} -.icon-folder-link{background-position: -156px -832px;} -.icon-folder-magnify{background-position: -156px -858px;} -.icon-folder-page{background-position: -156px -884px;} -.icon-folder-page-white{background-position: -156px -910px;} -.icon-folder-palette{background-position: -156px -936px;} -.icon-folder-picture{background-position: -156px -962px;} -.icon-folder-star{background-position: -156px -988px;} -.icon-folder-table{background-position: -156px -1014px;} -.icon-folder-user{background-position: -156px -1040px;} -.icon-folder-wrench{background-position: -156px -1066px;} -.icon-font{background-position: -156px -1092px;} -.icon-font-add{background-position: -156px -1118px;} -.icon-font-delete{background-position: -156px -1144px;} -.icon-font-go{background-position: -156px -1170px;} -.icon-group{background-position: -156px -1196px;} -.icon-group-add{background-position: -156px -1222px;} -.icon-group-delete{background-position: -156px -1248px;} -.icon-group-edit{background-position: -156px -1274px;} -.icon-group-error{background-position: -156px -1300px;} -.icon-group-gear{background-position: -156px -1326px;} -.icon-group-go{background-position: -156px -1352px;} -.icon-group-key{background-position: -156px -1378px;} -.icon-group-link{background-position: -156px -1404px;} -.icon-heart{background-position: -156px -1430px;} -.icon-heart-add{background-position: -156px -1456px;} -.icon-heart-delete{background-position: -156px -1482px;} -.icon-help{background-position: -156px -1508px;} -.icon-hourglass{background-position: -156px -1534px;} -.icon-hourglass-add{background-position: -156px -1560px;} -.icon-hourglass-delete{background-position: -156px -1586px;} -.icon-hourglass-go{background-position: -156px -1612px;} -.icon-hourglass-link{background-position: -156px -1638px;} -.icon-house{background-position: -156px -1664px;} -.icon-house-go{background-position: -156px -1690px;} -.icon-house-link{background-position: -156px -1716px;} -.icon-html{background-position: -156px -1742px;} -.icon-html-add{background-position: -156px -1768px;} -.icon-html-delete{background-position: -156px -1794px;} -.icon-html-go{background-position: -156px -1820px;} -.icon-html-valid{background-position: -156px -1846px;} -.icon-image{background-position: -156px -1872px;} -.icon-image-add{background-position: -156px -1898px;} -.icon-image-delete{background-position: -156px -1924px;} -.icon-image-edit{background-position: -156px -1950px;} -.icon-image-link{background-position: -156px -1976px;} -.icon-images{background-position: -182px 0;} -.icon-information{background-position: -182px -26px;} -.icon-ipod{background-position: -182px -52px;} -.icon-ipod-cast{background-position: -182px -78px;} -.icon-ipod-cast-add{background-position: -182px -104px;} -.icon-ipod-cast-delete{background-position: -182px -130px;} -.icon-ipod-sound{background-position: -182px -156px;} -.icon-joystick{background-position: -182px -182px;} -.icon-joystick-add{background-position: -182px -208px;} -.icon-joystick-delete{background-position: -182px -234px;} -.icon-joystick-error{background-position: -182px -260px;} -.icon-key{background-position: -182px -286px;} -.icon-key-add{background-position: -182px -312px;} -.icon-key-delete{background-position: -182px -338px;} -.icon-key-go{background-position: -182px -364px;} -.icon-keyboard{background-position: -182px -390px;} -.icon-keyboard-add{background-position: -182px -416px;} -.icon-keyboard-delete{background-position: -182px -442px;} -.icon-keyboard-magnify{background-position: -182px -468px;} -.icon-layers{background-position: -182px -494px;} -.icon-layout{background-position: -182px -520px;} -.icon-layout-add{background-position: -182px -546px;} -.icon-layout-content{background-position: -182px -572px;} -.icon-layout-delete{background-position: -182px -598px;} -.icon-layout-edit{background-position: -182px -624px;} -.icon-layout-error{background-position: -182px -650px;} -.icon-layout-header{background-position: -182px -676px;} -.icon-layout-link{background-position: -182px -702px;} -.icon-layout-sidebar{background-position: -182px -728px;} -.icon-lightbulb{background-position: -182px -754px;} -.icon-lightbulb-add{background-position: -182px -780px;} -.icon-lightbulb-delete{background-position: -182px -806px;} -.icon-lightbulb-off{background-position: -182px -832px;} -.icon-lightning{background-position: -182px -858px;} -.icon-lightning-add{background-position: -182px -884px;} -.icon-lightning-delete{background-position: -182px -910px;} -.icon-lightning-go{background-position: -182px -936px;} -.icon-link{background-position: -182px -962px;} -.icon-link-add{background-position: -182px -988px;} -.icon-link-break{background-position: -182px -1014px;} -.icon-link-delete{background-position: -182px -1040px;} -.icon-link-edit{background-position: -182px -1066px;} -.icon-link-error{background-position: -182px -1092px;} -.icon-link-go{background-position: -182px -1118px;} -.icon-lock{background-position: -182px -1144px;} -.icon-lock-add{background-position: -182px -1170px;} -.icon-lock-break{background-position: -182px -1196px;} -.icon-lock-delete{background-position: -182px -1222px;} -.icon-lock-edit{background-position: -182px -1248px;} -.icon-lock-go{background-position: -182px -1274px;} -.icon-lock-open{background-position: -182px -1300px;} -.icon-lorry{background-position: -182px -1326px;} -.icon-lorry-add{background-position: -182px -1352px;} -.icon-lorry-delete{background-position: -182px -1378px;} -.icon-lorry-error{background-position: -182px -1404px;} -.icon-lorry-flatbed{background-position: -182px -1430px;} -.icon-lorry-go{background-position: -182px -1456px;} -.icon-lorry-link{background-position: -182px -1482px;} -.icon-magifier-zoom-out{background-position: -182px -1508px;} -.icon-magnifier{background-position: -182px -1534px;} -.icon-magnifier-zoom-in{background-position: -182px -1560px;} -.icon-male{background-position: -182px -1586px;} -.icon-map{background-position: -182px -1612px;} -.icon-map-add{background-position: -182px -1638px;} -.icon-map-delete{background-position: -182px -1664px;} -.icon-map-edit{background-position: -182px -1690px;} -.icon-map-go{background-position: -182px -1716px;} -.icon-map-magnify{background-position: -182px -1742px;} -.icon-medal-bronze-1{background-position: -182px -1768px;} -.icon-medal-bronze-2{background-position: -182px -1794px;} -.icon-medal-bronze-3{background-position: -182px -1820px;} -.icon-medal-bronze-add{background-position: -182px -1846px;} -.icon-medal-bronze-delete{background-position: -182px -1872px;} -.icon-medal-gold-1{background-position: -182px -1898px;} -.icon-medal-gold-2{background-position: -182px -1924px;} -.icon-medal-gold-3{background-position: -182px -1950px;} -.icon-medal-gold-add{background-position: -182px -1976px;} -.icon-medal-gold-delete{background-position: -208px 0;} -.icon-medal-silver-1{background-position: -208px -26px;} -.icon-medal-silver-2{background-position: -208px -52px;} -.icon-medal-silver-3{background-position: -208px -78px;} -.icon-medal-silver-add{background-position: -208px -104px;} -.icon-medal-silver-delete{background-position: -208px -130px;} -.icon-money{background-position: -208px -156px;} -.icon-money-add{background-position: -208px -182px;} -.icon-money-delete{background-position: -208px -208px;} -.icon-monitor{background-position: -208px -234px;} -.icon-monitor-add{background-position: -208px -260px;} -.icon-monitor-delete{background-position: -208px -286px;} -.icon-monitor-edit{background-position: -208px -312px;} -.icon-monitor-error{background-position: -208px -338px;} -.icon-monitor-go{background-position: -208px -364px;} -.icon-monitor-lightning{background-position: -208px -390px;} -.icon-monitor-link{background-position: -208px -416px;} -.icon-mouse{background-position: -208px -442px;} -.icon-mouse-add{background-position: -208px -468px;} -.icon-mouse-delete{background-position: -208px -494px;} -.icon-mouse-error{background-position: -208px -520px;} -.icon-music{background-position: -208px -546px;} -.icon-new{background-position: -208px -572px;} -.icon-newspaper{background-position: -208px -598px;} -.icon-newspaper-add{background-position: -208px -624px;} -.icon-newspaper-delete{background-position: -208px -650px;} -.icon-newspaper-go{background-position: -208px -676px;} -.icon-newspaper-link{background-position: -208px -702px;} -.icon-note{background-position: -208px -728px;} -.icon-note-add{background-position: -208px -754px;} -.icon-note-delete{background-position: -208px -780px;} -.icon-note-edit{background-position: -208px -806px;} -.icon-note-error{background-position: -208px -832px;} -.icon-note-go{background-position: -208px -858px;} -.icon-overlays{background-position: -208px -884px;} -.icon-package{background-position: -208px -910px;} -.icon-package-add{background-position: -208px -936px;} -.icon-package-delete{background-position: -208px -962px;} -.icon-package-go{background-po... [truncated message content] |
From: <ma...@us...> - 2012-03-26 20:25:46
|
Revision: 9204 http://xoops.svn.sourceforge.net/xoops/?rev=9204&view=rev Author: mageg Date: 2012-03-26 20:25:40 +0000 (Mon, 26 Mar 2012) Log Message: ----------- test for new formtext Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php 2012-03-26 20:05:51 UTC (rev 9203) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php 2012-03-26 20:25:40 UTC (rev 9204) @@ -44,7 +44,39 @@ */ private $_maxlength; + /** + * class for the imput + * + * @var string + * @access private + */ + private $_class; + /** + * pattern for the imput + * + * @var string + * @access private + */ + private $_pattern; + + /** + * placeholder for the imput + * + * @var string + * @access private + */ + private $_placeholder; + + /** + * required for the imput + * + * @var boolean + * @access private + */ + private $_required; + + /** * Constructor * * @param string $caption Caption @@ -52,14 +84,22 @@ * @param int $size Size * @param int $maxlength Maximum length of text * @param string $value Initial text + * @param string $class Class of input + * @param string $pattern Allows a data verification with regular expressions + * @param string $placeholder Displays information in the imput + * @param string $required Indicate if the input is required */ - public function __construct($caption, $name, $size, $maxlength, $value = '') + public function __construct($caption, $name, $size, $maxlength, $value = '', $class = '', $pattern = '', $placeholder = '', $required = false) { $this->setCaption($caption); $this->setName($name); $this->_size = intval($size); $this->_maxlength = intval($maxlength); $this->setValue($value); + $this->_class = $class; + $this->_pattern = $pattern; + $this->_placeholder = $placeholder; + $this->_required = $required; } /** @@ -83,12 +123,61 @@ } /** + * Get class + * + * @return string + */ + public function getClass() + { + return $this->_class; + } + + /** + * Get pattern + * + * @return string + */ + public function getPattern() + { + if ( $this->_pattern != '') { + return $this->_pattern; + } else { + return '*'; + } + } + + /** + * Get placeholder + * + * @return string + */ + public function getPlaceholder() + { + return $this->_placeholder; + } + + /** + * Get required + * + * @return string + */ + public function getRequired() + { + if ( $this->_required == true) { + return 'required'; + } else { + return ''; + } + } + /** * Prepare HTML for output * * @return string HTML */ public function render() { - return "<input type='text' name='" . $this->getName() . "' title='" . $this->getTitle() . "' id='" . $this->getName() . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "'" . $this->getExtra() . " />"; + return "<input type='text' class='" . $this->getClass() . "' name='" . $this->getName() . "' title='" . $this->getTitle() . "' id='" . $this->getName() . "' + size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "' pattern='" . $this->getPattern() . "' + placeholder='" . $this->getPlaceholder() . "' " . $this->getExtra() . " " . $this->getRequired() . ">\n"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php 2012-03-26 20:05:51 UTC (rev 9203) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php 2012-03-26 20:25:40 UTC (rev 9204) @@ -40,8 +40,8 @@ parent::__construct($title, 'form', 'smilies.php', 'post', true); $this->setExtra('enctype="multipart/form-data"'); - $this->addElement(new XoopsFormText(_AM_SMILIES_CODE, 'code', 26, 25, $obj->getVar('code')), true); - $this->addElement(new XoopsFormText(_AM_SMILIES_DESCRIPTION, 'emotion', 50, 50, $obj->getVar('emotion')), true); + $this->addElement(new XoopsFormText(_AM_SMILIES_CODE, 'code', 26, 25, $obj->getVar('code'), '', '^Code(.*)$', 'Code', true), true); + $this->addElement(new XoopsFormText(_AM_SMILIES_DESCRIPTION, 'emotion', 50, 50, $obj->getVar('emotion'), '', '', '', true), true); $imgtray_img = new XoopsFormElementTray( _AM_SMILIES_FILE, '<br />' ); $imgpath_img = sprintf( _AM_SMILIES_IMAGE_PATH, XOOPS_UPLOAD_PATH . '/smilies/' ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-27 21:49:37
|
Revision: 9392 http://xoops.svn.sourceforge.net/xoops/?rev=9392&view=rev Author: mageg Date: 2012-04-27 21:49:29 +0000 (Fri, 27 Apr 2012) Log Message: ----------- Changing forms. Compatible with HTML5 and bootstrap. Much change (Templates, pattern, placeholder and ...) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbuttontray.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcheckbox.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcolorpicker.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdatetime.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelement.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formpassword.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradio.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradioyn.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselect.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops.css Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -71,7 +71,7 @@ </script>"; $image = $this->loadImage(); $image .= "<br /><a href=\"javascript: xoops_captcha_refresh('" . ($this->config['name']) . "')\">" . _CAPTCHA_REFRESH . "</a>"; - $input = '<input type="text" name="' . $this->config['name'] . '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars'] . '" maxlength="' . $this->config['num_chars'] . '" value="" />'; + $input = '<input type="text" name="' . $this->config['name'] . '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars'] . '" maxlength="' . $this->config['num_chars'] . '" value="" required>'; $rule = _CAPTCHA_RULE_IMAGE; $rule .= '<br />' . (empty($this->config['casesensitive']) ? _CAPTCHA_RULE_CASEINSENSITIVE : _CAPTCHA_RULE_CASESENSITIVE); if (!empty($this->config['maxattempts'])) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -55,11 +55,11 @@ private $_title; /** - * summary for the form (WGAC2 Requirement) + * display for the form * * @var string */ - private $_summary = ''; + private $_display = ''; /** * array of {@link XoopsFormElement} objects @@ -90,15 +90,15 @@ * @param string $action "action" attribute for the <form> tag * @param string $method "method" attribute for the <form> tag * @param bool $addtoken whether to add a security token to the form - * @param string $summary + * @param string $display */ - public function __construct($title, $name, $action, $method = 'post', $addtoken = false, $summary = '') + public function __construct($title, $name, $action, $method = 'post', $addtoken = false, $display = '') { $this->_title = $title; $this->_name = $name; $this->_action = $action; $this->_method = $method; - $this->_summary = $summary; + $this->_display = $display; if ($addtoken != false) { $this->addElement(new XoopsFormHiddenToken()); } @@ -110,9 +110,9 @@ * @param bool $encode To sanitizer the text? * @return string */ - public function getSummary($encode = false) + public function getDisplay($encode = false) { - return $encode ? htmlspecialchars($this->_summary, ENT_QUOTES) : $this->_summary; + return $encode ? htmlspecialchars($this->_display, ENT_QUOTES) : $this->_display; } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -26,7 +26,7 @@ class XoopsFormButton extends XoopsFormElement { - protected $_class; + //protected $_class; /** * Type of the button. This could be either "button", "submit", or "reset" @@ -42,19 +42,19 @@ * @param string $value * @param string $type Type of the button. Potential values: "button", "submit", or "reset" */ - public function __construct($caption, $name, $value = "", $type = "button", $class="formButton") + public function __construct($caption, $name, $value = "", $type = "button") { $this->setCaption($caption); $this->setName($name); $this->_type = $type; $this->setValue($value); - $this->_class = $class; + //$this->_class = $class; } - public function getClass() + /*public function getClass() { return $this->_class; - } + }*/ /** * Get the type @@ -73,6 +73,9 @@ */ public function render() { - return "<input type='" . $this->getType() . "' class='" . $this->getClass() . "' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' title='" . $this->getValue() . "'" . $this->getExtra() . " />"; + $name = $this->getName(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : " class='btn'"); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + return "<input type='" . $this->getType() . "' name='" . $name . "' title='" . $this->getTitle() . "' id='" . $name . "'" . $class . " value='" . $this->getValue() . "'" . $extra . ">"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbuttontray.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbuttontray.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbuttontray.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -69,10 +69,12 @@ public function render() { $ret = ''; + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : " class='btn'"); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); if ($this->_showDelete) { - $ret .= '<input type="submit" class="formbutton" name="delete" id="delete" value="' . _DELETE . '" onclick="this.form.elements.op.value=\'delete\'"> '; + $ret .= '<input type="submit"' . $class . ' name="delete" id="delete" value="' . _DELETE . '" onclick="this.form.elements.op.value=\'delete\'"> '; } - $ret .= '<input type="button" value="' . _CANCEL . '" onClick="history.go(-1);return true;" /> <input type="reset" class="formbutton" name="reset" id="reset" value="' . _RESET . '" /> <input type="' . $this->getType() . '" class="formbutton" name="' . $this->getName() . '" id="' . $this->getName() . '" value="' . $this->getValue() . '"' . $this->getExtra() . ' />'; + $ret .= '<input type="button" ' . $class . ' value="' . _CANCEL . '" onClick="history.go(-1);return true;" /> <input type="reset"' . $class . ' name="reset" id="reset" value="' . _RESET . '" /> <input type="' . $this->getType() . '"' . $class . ' name="' . $this->getName() . '" id="' . $this->getName() . '" value="' . $this->getValue() . '"' . $extra . '/>'; return $ret; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcheckbox.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcheckbox.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcheckbox.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -41,36 +41,30 @@ */ protected $_value = array(); - /** - * HTML to seperate the elements + /** + * position for this element * * @var string + * @access private */ - private $_delimeter; + private $_inline; /** - * Column number for rendering - * - * @var int - */ - public $columns; - - /** * Constructor * * @param string $caption * @param string $name * @param mixed $value Either one value as a string or an array of them. - * @param string $delimeter + * @param bool $inline */ - public function __construct($caption, $name, $value = null, $delimeter = ' ') + public function __construct($caption, $name, $value = null, $inline = true) { $this->setCaption($caption); $this->setName($name); if (isset($value)) { $this->setValue($value); } - $this->_delimeter = $delimeter; + $this->_inline = $inline; } /** @@ -122,14 +116,17 @@ } /** - * Get the delimiter of this group + * Get the position of this group * - * @param bool $encode To sanitizer the text? - * @return string The delimiter + * @return string */ - public function getDelimeter($encode = false) + public function getInline() { - return $encode ? htmlspecialchars(str_replace(' ', ' ', $this->_delimeter)) : $this->_delimeter; + if ($this->_inline == true){ + return ' inline'; + } else { + return ''; + } } /** @@ -139,51 +136,34 @@ */ public function render() { + $ele_options = $this->getOptions(); + $ele_value = $this->getValue(); $ele_name = $this->getName(); - $ele_title = $this->getTitle(); $ele_id = $ele_name; - $ele_value = $this->getValue(); - $ele_options = $this->getOptions(); - $ele_extra = $this->getExtra(); - $ele_delimeter = empty($this->columns) ? $this->getDelimeter() : ''; + $ele_title = $this->getTitle(); + $ele_inline = $this->getInline(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); if (count($ele_options) > 1 && substr($ele_name, -2, 2) != '[]') { $ele_name = $ele_name . '[]'; $this->setName($ele_name); } - $ret = ''; - if (!empty($this->columns)) { - $ret .= '<table><tr>'; - } - $i = 0; + + $ret = ""; $id_ele = 0; foreach ($ele_options as $value => $name) { - $id_ele++; - if (!empty($this->columns)) { - if ($i % $this->columns == 0) { - $ret .= '<tr>'; - } - $ret .= '<td>'; - } - // $name may be a link, should we use $name in the title tag? - $ret .= "<input type='checkbox' name='{$ele_name}' id='{$ele_id}{$id_ele}' title='" . $ele_title . "' value='" . htmlspecialchars($value, ENT_QUOTES) . "'"; if (count($ele_value) > 0 && in_array($value, $ele_value)) { - $ret .= ' checked="checked"'; + $ele_checked = " checked='checked'"; + } else { + $ele_checked = ''; } - $ret .= $ele_extra . ' />' . "<label name='xolb_{$ele_name}' for='{$ele_id}{$id_ele}'>" . $name . "</label>" . $ele_delimeter; - if (!empty($this->columns)) { - $ret .= '</td>'; - if (++$i % $this->columns == 0) { - $ret .= '</tr>'; - } - } + $id_ele++; + $ret .= "<label class='checkbox" . $ele_inline . "'>" . NWLINE; + $ret .= "<input type='checkbox' name='" . $ele_name . "' title='" . $ele_title . "' id='" . $ele_id . $id_ele . "' value='" . $value . "'" . $class . $extra . $ele_checked . ">" . NWLINE; + $ret .= $name . NWLINE; + $ret .= "</label>" . NWLINE; } - if (!empty($this->columns)) { - if ($span = $i % $this->columns) { - $ret .= '<td colspan="' . ($this->columns - $span) . '"></td></tr>'; - } - $ret .= '</table>'; - } return $ret; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcolorpicker.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcolorpicker.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcolorpicker.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -33,7 +33,7 @@ */ public function XoopsFormColorPicker($caption, $name, $value = '#FFFFFF') { - parent::__construct($caption, $name, 9, 7, $value); + parent::__construct($caption, $name, 9, 7, '', $value); } /** @@ -48,7 +48,8 @@ echo '<script type="text/javascript" src="' . XOOPS_URL . '/include/color-picker.js"></script>'; } $this->setExtra(' style="background-color:' . $this->getValue() . ';"'); - return parent::render() . "<input type='reset' value=' ... ' onclick=\"return TCP.popup('" . XOOPS_URL . "/include/',document.getElementById('" . $this->getName() . "'));\">" ; + return parent::render() . "<button class='btn' type='button' onclick=\"return TCP.popup('" . XOOPS_URL . "/include/',document.getElementById('" . $this->getName() . "'));\"> ... </button>"; + } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdatetime.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdatetime.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdatetime.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -34,11 +34,13 @@ */ public function __construct($caption, $name, $size = 15, $value = 0, $showtime = true) { - parent::__construct($caption, ' '); + parent::__construct($caption, ''); $value = intval($value); $value = ($value > 0) ? $value : time(); $datetime = getDate($value); - $this->addElement(new XoopsFormTextDateSelect('', $name . '[date]', $size, $value, $showtime)); + $date = new XoopsFormTextDateSelect('', $name . '[date]', $size, $value, $showtime); + $date->setClass('span2'); + $this->addElement($date); $timearray = array(); for ($i = 0; $i < 24; $i++) { for ($j = 0; $j < 60; $j = $j + 10) { @@ -50,6 +52,7 @@ $timeselect = new XoopsFormSelect('', $name . '[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10)); $timeselect->addOptionArray($timearray); + $timeselect->setClass('span2'); $this->addElement($timeselect); } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -167,16 +167,19 @@ $xoops = Xoops::getInstance(); $xoops->loadLanguage('formdhtmltextarea'); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $required = ($this->isRequired() ? ' required' : ''); $ret = ""; // actions $ret .= $this->codeIcon() . "<br />\n"; // fonts $ret .= $this->fontArray(); // length checker - $ret .= "<input type='button' onclick=\"XoopsCheckLength('" . $this->getName() . "', '" . @$this->configs['maxlength'] . "', '" . _XOOPS_FORM_ALT_LENGTH . "', '" . _XOOPS_FORM_ALT_LENGTH_MAX . "');\" value=' ? ' title='" . _XOOPS_FORM_ALT_CHECKLENGTH . "' />"; + $ret .= "<input type='button' class='btn' onclick=\"XoopsCheckLength('" . $this->getName() . "', '" . @$this->configs['maxlength'] . "', '" . _XOOPS_FORM_ALT_LENGTH . "', '" . _XOOPS_FORM_ALT_LENGTH_MAX . "');\" value=' ? ' title='" . _XOOPS_FORM_ALT_CHECKLENGTH . "' />"; $ret .= "<br />\n"; // the textarea box - $ret .= "<textarea id='" . $this->getName() . "' name='" . $this->getName() . "' title='" . $this->getTitle() . "' onselect=\"xoopsSavePosition('" . $this->getName() . "');\" onclick=\"xoopsSavePosition('" . $this->getName() . "');\" onkeyup=\"xoopsSavePosition('" . $this->getName() . "');\" cols='" . $this->getCols() . "' rows='" . $this->getRows() . "'" . $this->getExtra() . ">" . $this->getValue() . "</textarea><br />\n"; + $ret .= "<textarea" . $class . " id='" . $this->getName() . "' name='" . $this->getName() . "' title='" . $this->getTitle() . "' onselect=\"xoopsSavePosition('" . $this->getName() . "');\" onclick=\"xoopsSavePosition('" . $this->getName() . "');\" onkeyup=\"xoopsSavePosition('" . $this->getName() . "');\" cols='" . $this->getCols() . "' rows='" . $this->getRows() . "'" . $extra . $required . ">" . $this->getValue() . "</textarea><br />\n"; if (empty($this->skipPreview)) { if (empty($xoops->theme)) { @@ -184,7 +187,7 @@ } else { $xoops->theme->addScript('/class/textsanitizer/image/image.js', array('type' => 'text/javascript')); } - $button = "<input id='" . $this->getName() . "_preview_button' " . "type='button' " . "value='" . _PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . intval($this->doHtml) . ", '" . $xoops->security->createToken() . "')\"" . " />"; + $button = "<input id='" . $this->getName() . "_preview_button' " . "type='button' " . "class='btn' value='" . _PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . intval($this->doHtml) . ", '" . $xoops->security->createToken() . "')\"" . " />"; $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $this->getName() . "_hidden_data'>" . _XOOPS_FORM_PREVIEW_CONTENT . "</div>" . "</fieldset>" . "</div>"; } // Load javascript @@ -243,13 +246,13 @@ $hiddentext = $this->_hiddenText; $fontStr = "<script type=\"text/javascript\" language=\"JavaScript\">"; - $fontStr .= "var _editor_dialog = ''" . "+ '<select id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; + $fontStr .= "var _editor_dialog = ''" . "+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; $fontStr .= "+ '<option value=\'SIZE\'>" . _SIZE . "</option>'"; foreach ($GLOBALS["formtextdhtml_sizes"] as $_val => $_name) { $fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'"; } $fontStr .= " + '</select> '"; - $fontStr .= "+ '<select id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; + $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; $fontStr .= "+ '<option value=\'FONT\'>" . _FONT . "</option>'"; $fontarray = !empty($GLOBALS["formtextdhtml_fonts"]) ? $GLOBALS["formtextdhtml_fonts"] : array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler"); @@ -257,7 +260,7 @@ $fontStr .= " + '<option value=\'{$font}\'>{$font}</option>'"; } $fontStr .= " + '</select> '"; - $fontStr .= "+ '<select id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; + $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; $fontStr .= "+ '<option value=\'COLOR\'>" . _COLOR . "</option>';"; $fontStr .= "var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF'); for(var i = 0; i < _color_array.length; i ++) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelement.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelement.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelement.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -67,7 +67,31 @@ */ private $_class = array(); + /** + * pattern for this element + * + * @var string + * @access private + */ + private $_pattern; + /** + * pattern_description for this element + * + * @var string + * @access private + */ + private $_pattern_description; + + /** + * datalist for this element + * + * @var array + * @access private + */ + private $_datalist; + + /** * hidden? * * @var bool @@ -218,9 +242,12 @@ */ public function setClass($class) { - $class = trim($class); - if (!empty($class)) { - $this->_class[] = $class; + if (is_array($class)) { + if (!empty($class)) { + $this->_class = $class; + } + }else{ + $this->_class[] = trim($class); } } @@ -242,6 +269,93 @@ } /** + * set the "pattern" attribute for the element + * + * @param $pattern "pattern" attribute for the element + * @return void + */ + public function setPattern($pattern, $pattern_description = '') + { + $this->_pattern = trim($pattern); + $this->_pattern_description = trim($pattern_description); + } + + /** + * get the "pattern" attribute for the element + * + * @return string "pattern" + */ + public function getPattern() + { + if (empty($this->_pattern)) { + return ''; + } + return $this->_pattern; + } + + /** + * get the "pattern_description" + * + * @return string "pattern_description" + */ + public function getPatternDescription() + { + if (empty($this->_pattern_description)) { + return ''; + } + return $this->_pattern_description; + } + + /** + * set the "datalist" attribute for the element + * + * @param $datalist "datalist" attribute for the element + * @return void + */ + + public function setDatalist($datalist) + { + if (is_array($datalist)) { + if (!empty($datalist)) { + $this->_datalist = $datalist; + } + }else{ + $this->_datalist[] = trim($datalist); + } + } + + /** + * get the "datalist" attribute for the element + * + * @return string "datalist" attribute value + */ + public function getDatalist() + { + if (empty($this->_datalist)) { + return ''; + } + $ret = NWLINE . '<datalist id="list_' . $this->getName() . '">' . NWLINE; + foreach ($this->_datalist as $datalist) { + $ret .= '<option value="' . htmlspecialchars($datalist, ENT_QUOTES) . '">' . NWLINE; + } + $ret .= '</datalist>' . NWLINE; + return $ret; + } + + /** + * get the "datalist" attribute for the element + * + * @return bool "list" + */ + public function isDatalist() + { + if (empty($this->_datalist)) { + return false; + } + return true; + } + + /** * set the caption for the element * * @param string $caption @@ -271,9 +385,9 @@ */ public function getTitle($encode = true) { - if (strlen($this->_description) > 0) { - return $encode ? htmlspecialchars(strip_tags($this->_caption . ' - ' . $this->_description), ENT_QUOTES) - : strip_tags($this->_caption . ' - ' . $this->_description); + if (strlen($this->_pattern_description) > 0) { + return $encode ? htmlspecialchars(strip_tags($this->_caption . ' - ' . $this->_pattern_description), ENT_QUOTES) + : strip_tags($this->_caption . ' - ' . $this->_pattern_description); } else { return $encode ? htmlspecialchars(strip_tags($this->_caption), ENT_QUOTES) : strip_tags($this->_caption); } @@ -368,7 +482,7 @@ public function getExtra($encode = false) { if (!$encode) { - return ' ' . implode(' ', $this->_extra); + return implode(' ', $this->_extra); } $value = array(); foreach ($this->_extra as $val) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -56,7 +56,7 @@ * @param string $delimiter * @param string $name */ - public function __construct($caption, $delimiter = " ", $name = "") + public function __construct($caption, $delimiter = " ", $name = "") { $this->setName($name); $this->setCaption($caption); @@ -158,19 +158,21 @@ { $count = 0; $ret = ""; + //$ret = "<div class='inline'>"; foreach ($this->getElements() as $ele) { /* @var XoopsFormElement $ele */ if ($count > 0) { $ret .= $this->getDelimiter(); } if ($ele->getCaption() != '') { - $ret .= $ele->getCaption() . " "; + $ret .= $ele->getCaption() . " "; } $ret .= $ele->render() . NWLINE; if (!$ele->isHidden()) { $count++; } } + //$ret .= "</div>"; return $ret; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formfile.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formfile.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -66,6 +66,6 @@ */ public function render() { - return '<input type="hidden" name="MAX_FILE_SIZE" value="' . $this->getMaxFileSize() . '" /><input type="file" name="' . $this->getName() . '" id="' . $this->getName() . '" title="' . $this->getTitle() . '" ' . $this->getExtra() . ' /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="' . $this->getName() . '" />'; + return '<input type="hidden" name="MAX_FILE_SIZE" value="' . $this->getMaxFileSize() . '"><input class="input-file" type="file" name="' . $this->getName() . '" id="' . $this->getName() . '" title="' . $this->getTitle() . '" ' . $this->getExtra() . ' /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="' . $this->getName() . '">'; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -50,6 +50,6 @@ */ public function render() { - return '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getName() . '" value="' . $this->getValue() . '" />'; + return '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getName() . '" value="' . $this->getValue() . '" >' . NWLINE; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -50,6 +50,6 @@ */ public function render() { - return $this->getValue(); + return "<label class='text_label'>" . $this->getValue() . "</label>"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formpassword.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formpassword.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formpassword.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -51,6 +51,14 @@ */ public $autoComplete = false; + /** + * placeholder for this element + * + * @var string + * @access private + */ + private $_placeholder; + /** * Constructor * @@ -59,10 +67,11 @@ * @param int $size Size of the field * @param int $maxlength Maximum length of the text * @param string $value Initial value of the field. + * @param string $placeholder placeholder for this element. * <strong>Warning:</strong> this is readable in cleartext in the page's source! * @param bool $autoComplete To enable autoComplete or browser cache */ - public function __construct($caption, $name, $size, $maxlength, $value = '', $autoComplete = false) + public function __construct($caption, $name, $size, $maxlength, $value = '', $autoComplete = false, $placeholder = '') { $this->setCaption($caption); $this->setName($name); @@ -70,6 +79,7 @@ $this->_maxlength = intval($maxlength); $this->setValue($value); $this->autoComplete = !empty($autoComplete); + $this->_placeholder = $placeholder; } /** @@ -93,13 +103,32 @@ } /** + * Get placeholder for this element + * + * @return string + */ + public function getPlaceholder() + { + if (empty($this->_placeholder)) { + return ''; + } + return $this->_placeholder; + } + + /** * Prepare HTML for output * * @return string HTML */ public function render() { - return '<input type="password" name="' . $this->getName() . '" id="' . $this->getName() . '" size="' . $this->getSize() . '" maxlength="' . $this->getMaxlength() . '" value="' . $this->getValue() . '"' . $this->getExtra() . ' ' . ($this->autoComplete - ? '' : 'autocomplete="off" ') . '/>'; + $name = $this->getName(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $pattern = ($this->getPattern() != '' ? " pattern='" . $this->getPattern() . "'" : ''); + $placeholder = ($this->getPlaceholder() != '' ? " placeholder='" . $this->getPlaceholder() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $autocomplete = ($this->autoComplete ? '' : " autocomplete='off'"); + $required = ($this->isRequired() ? ' required' : ''); + return "<input type='password' name='" . $name . "' title='" . $this->getTitle() . "' id='" . $name . "'" . $class ." size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "'" . $pattern . $placeholder . $extra . $autocomplete . $required . ">"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradio.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradio.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradio.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -41,36 +41,30 @@ */ protected $_value = null; - /** - * HTML to seperate the elements + /** + * position for this element * * @var string + * @access private */ - private $_delimeter; + private $_inline; /** - * Column number for rendering - * - * @var int - */ - public $columns; - - /** * Constructor * * @param string $caption Caption * @param string $name "name" attribute * @param string $value Pre-selected value - * @param string $delimeter + * @param bool $inline */ - public function __construct($caption, $name, $value = null, $delimeter = ' ') + public function __construct($caption, $name, $value = null, $inline = true) { $this->setCaption($caption); $this->setName($name); if (isset($value)) { $this->setValue($value); } - $this->_delimeter = $delimeter; + $this->_inline = $inline; } /** @@ -133,14 +127,17 @@ } /** - * Get the delimiter of this group + * Get the position of this group * - * @param bool $encode To sanitizer the text? - * @return string The delimiter + * @return string */ - public function getDelimeter($encode = false) + public function getInline() { - return $encode ? htmlspecialchars(str_replace(' ', ' ', $this->_delimeter)) : $this->_delimeter; + if ($this->_inline == true){ + return ' inline'; + } else { + return ''; + } } /** @@ -150,44 +147,27 @@ */ public function render() { - $ret = ''; + $ele_options = $this->getOptions(); + $ele_value = $this->getValue(); $ele_name = $this->getName(); $ele_title = $this->getTitle(); - $ele_value = $this->getValue(); - $ele_options = $this->getOptions(); - $ele_extra = $this->getExtra(); - $ele_delimeter = empty($this->columns) ? $this->getDelimeter() : ''; - if (!empty($this->columns)) { - $ret .= '<table><tr>'; - } - $i = 0; + $ele_inline = $this->getInline(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $ret = ""; $id_ele = 0; foreach ($ele_options as $value => $name) { - $id_ele++; - if (!empty($this->columns)) { - if ($i % $this->columns == 0) { - $ret .= '<tr>'; - } - $ret .= '<td>'; - } - $ret .= '<input type="radio" name="' . $ele_name . '" id="' . $ele_name . $id_ele . '" title = "' . htmlspecialchars($ele_title, ENT_QUOTES) . '" value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; if (isset($ele_value) && $value == $ele_value) { - $ret .= ' checked="checked"'; + $ele_checked = " checked='checked'"; + } else { + $ele_checked = ''; } - $ret .= $ele_extra . ' />' . "<label name='xolb_{$ele_name}' for='" . $ele_name . $id_ele . "'>" . $name . "</label>" . $ele_delimeter; - if (!empty($this->columns)) { - $ret .= '</td>'; - if (++$i % $this->columns == 0) { - $ret .= '</tr>'; - } - } + $id_ele++; + $ret .= "<label class='radio" . $ele_inline . "'>" . NWLINE; + $ret .= "<input type='radio' name='" . $ele_name . "' title='" . $ele_title . "' id='" . $ele_name . $id_ele . "' value='" . $value . "'" . $class . $extra . $ele_checked . ">" . NWLINE; + $ret .= $name . NWLINE; + $ret .= "</label>" . NWLINE; } - if (!empty($this->columns)) { - if ($span = $i % $this->columns) { - $ret .= '<td colspan="' . ($this->columns - $span) . '"></td></tr>'; - } - $ret .= '</table>'; - } return $ret; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradioyn.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradioyn.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradioyn.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -41,7 +41,7 @@ */ public function __construct($caption, $name, $value = null, $yes = _YES, $no = _NO) { - parent::__construct($caption, $name, $value); + parent::__construct($caption, $name, $value, true); $this->addOption(1, $yes); $this->addOption(0, $no); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselect.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselect.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselect.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -54,6 +54,13 @@ */ protected $_value = array(); + /** + * Optgroup + * + * @var array + */ + private $_optgroup = array(); + /** * Constructor * @@ -123,6 +130,17 @@ } } + /** + * Add multiple optgroup + * + * @param string $name "name" attribute + * @param array $optgroup Associative array of value->name pairs + */ + public function addOptgroup($name = '', $optgroup) + { + $this->_optgroup[$name] = $optgroup; + } + /** * Get an array with all the options * @@ -145,6 +163,14 @@ } /** + * Get an array with all the optgroup + * + */ + public function getOptgroup() + { + return $this->_optgroup; + } + /** * Prepare HTML for output * * @return string HTML @@ -155,20 +181,38 @@ $ele_title = $this->getTitle(); $ele_value = $this->getValue(); $ele_options = $this->getOptions(); - $ret = '<select size="' . $this->getSize() . '"' . $this->getExtra(); + $ele_optgroup = $this->getOptgroup(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $ret = '<select' . $class . ' size="' . $this->getSize() . '"' . $extra; if ($this->isMultiple() != false) { - $ret .= ' name="' . $ele_name . '[]" id="' . $ele_name . '" title="' . $ele_title . '" multiple="multiple">'; + $ret .= ' name="' . $ele_name . '[]" id="' . $ele_name . '" title="' . $ele_title . '" multiple="multiple">' . NWLINE; } else { - $ret .= ' name="' . $ele_name . '" id="' . $ele_name . '" title="' . $ele_title . '">'; + $ret .= ' name="' . $ele_name . '" id="' . $ele_name . '" title="' . $ele_title . '">' . NWLINE; } - foreach ($ele_options as $value => $name) { - $ret .= '<option value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; - if (count($ele_value) > 0 && in_array($value, $ele_value)) { - $ret .= ' selected="selected"'; + + if (empty($ele_optgroup)) { + foreach ($ele_options as $value => $name) { + $ret .= '<option value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; + if (count($ele_value) > 0 && in_array($value, $ele_value)) { + $ret .= ' selected="selected"'; + } + $ret .= '>' . $name . '</option>' . NWLINE; } - $ret .= '>' . $name . '</option>'; + } else { + foreach ($ele_optgroup as $name_optgroup => $value_optgroup) { + $ret .= '<optgroup label="' . $name_optgroup . '">' . NWLINE; + foreach ($value_optgroup as $value => $name) { + $ret .= '<option value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; + if (count($ele_value) > 0 && in_array($value, $ele_value)) { + $ret .= ' selected="selected"'; + } + $ret .= '>' . $name . '</option>' . NWLINE; + } + $ret .= '</optgroup>' . NWLINE; + } } - $ret .= '</select>'; + $ret .= '</select>' . NWLINE; return $ret; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -42,41 +42,18 @@ * @var int * @access private */ + private $_maxlength; /** - * class for the imput + * placeholder for this element * * @var string * @access private */ - private $_class; - - /** - * pattern for the imput - * - * @var string - * @access private - */ - private $_pattern; - - /** - * placeholder for the imput - * - * @var string - * @access private - */ private $_placeholder; /** - * required for the imput - * - * @var boolean - * @access private - */ - private $_required; - - /** * Constructor * * @param string $caption Caption @@ -84,22 +61,16 @@ * @param int $size Size * @param int $maxlength Maximum length of text * @param string $value Initial text - * @param string $class Class of input - * @param string $pattern Allows a data verification with regular expressions - * @param string $placeholder Displays information in the imput - * @param string $required Indicate if the input is required + * @param string $placeholder placeholder for this element. */ - public function __construct($caption, $name, $size, $maxlength, $value = '', $class = '', $pattern = '', $placeholder = '', $required = false) + public function __construct($caption, $name, $size, $maxlength, $value = '', $placeholder = '') { $this->setCaption($caption); $this->setName($name); $this->_size = intval($size); $this->_maxlength = intval($maxlength); $this->setValue($value); - $this->_class = $class; - $this->_pattern = $pattern; $this->_placeholder = $placeholder; - $this->_required = $required; } /** @@ -123,61 +94,32 @@ } /** - * Get class + * Get placeholder for this element * * @return string */ - public function getClass() - { - return $this->_class; - } - - /** - * Get pattern - * - * @return string - */ - public function getPattern() - { - if ( $this->_pattern != '') { - return $this->_pattern; - } else { - return '*'; - } - } - - /** - * Get placeholder - * - * @return string - */ public function getPlaceholder() { + if (empty($this->_placeholder)) { + return ''; + } return $this->_placeholder; } /** - * Get required - * - * @return string - */ - public function getRequired() - { - if ( $this->_required == true) { - return 'required'; - } else { - return ''; - } - } - /** * Prepare HTML for output * * @return string HTML */ public function render() { - return "<input type='text' class='" . $this->getClass() . "' name='" . $this->getName() . "' title='" . $this->getTitle() . "' id='" . $this->getName() . "' - size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "' pattern='" . $this->getPattern() . "' - placeholder='" . $this->getPlaceholder() . "' " . $this->getExtra() . " " . $this->getRequired() . ">\n"; + $name = $this->getName(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $list = ($this->isDatalist() != '' ? " list='list_" . $name . "'" : ''); + $pattern = ($this->getPattern() != '' ? " pattern='" . $this->getPattern() . "'" : ''); + $placeholder = ($this->getPlaceholder() != '' ? " placeholder='" . $this->getPlaceholder() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $required = ($this->isRequired() ? ' required' : ''); + return "<input type='text' name='" . $name . "' title='" . $this->getTitle() . "' id='" . $name . "'" . $class ." size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "'" . $list . $pattern . $placeholder . $extra . $required . ">"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextarea.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextarea.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextarea.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -44,6 +44,15 @@ */ private $_rows; + /** + * placeholder for this element + * + * @var string + * @access private + */ + private $_placeholder; + + /** * Constructor * @@ -52,14 +61,16 @@ * @param string $value initial content * @param int $rows number of rows * @param int $cols number of columns + * @param string $placeholder placeholder for this element. */ - public function __construct($caption, $name, $value = "", $rows = 5, $cols = 50) + public function __construct($caption, $name, $value = "", $rows = 5, $cols = 50, $placeholder = '') { $this->setCaption($caption); $this->setName($name); $this->_rows = intval($rows); $this->_cols = intval($cols); $this->setValue($value); + $this->_placeholder = $placeholder; } /** @@ -83,12 +94,30 @@ } /** + * Get placeholder for this element + * + * @return string + */ + public function getPlaceholder() + { + if (empty($this->_placeholder)) { + return ''; + } + return $this->_placeholder; + } + + /** * prepare HTML for output * * @return string HTML */ public function render() { - return "<textarea name='" . $this->getName() . "' id='" . $this->getName() . "' title='" . $this->getTitle() . "' rows='" . $this->getRows() . "' cols='" . $this->getCols() . "'" . $this->getExtra() . ">" . $this->getValue() . "</textarea>"; + $name = $this->getName(); + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $placeholder = ($this->getPlaceholder() != '' ? " placeholder='" . $this->getPlaceholder() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $required = ($this->isRequired() ? ' required' : ''); + return "<textarea name='" . $name . "' title='" . $this->getTitle() . "' id='" . $name . "'" . $class ." rows='" . $this->getRows() . "' cols='" . $this->getCols() . "'" . $placeholder . $extra . $required . ">" . $this->getValue() . "</textarea>"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextdateselect.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextdateselect.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextdateselect.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -144,6 +144,9 @@ Calendar._TT["WK"] = ""; '); } - return "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $display_value . "'" . $this->getExtra() . " /><input type='reset' value=' ... ' onclick='return showCalendar(\"" . $ele_name . "\");'>"; + $class = ($this->getClass() != '' ? " class='" . $this->getClass() . "'" : ''); + $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); + $required = ($this->isRequired() ? ' required' : ''); + return "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "'" . $class ." size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $display_value . "'" . $extra . $required . " /><button class='btn' type='button' onclick='return showCalendar(\"" . $this->getName() . "\");'> ... </button>" ; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -57,40 +57,54 @@ */ public function render() { - $ele_name = $this->getName(); - $ret = '<form name="' . $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '> - <table width="100%" class="outer" cellspacing="1"> - <thead> - <tr><th colspan="2">' . $this->getTitle() . '</th></tr> - </thead> - <tbody> - '; + $xoops = Xoops::getInstance(); + $xoops->theme->addStylesheet('media/xoops/css/form.css'); + switch ($this->getDisplay()) { + case '': + case 'horizontal': + default: + $xoops->tpl->assign('type', 'horizontal'); + break; + + case 'vertical': + $xoops->tpl->assign('type', 'vertical'); + break; + + case 'inline': + $xoops->tpl->assign('type', 'inline'); + break; + + case 'personalized': + $xoops->tpl->assign('type', 'personalized'); + break; + } + $xoops->tpl->assign('title', $this->getTitle()); + $xoops->tpl->assign('name', $this->getName()); + $xoops->tpl->assign('action', $this->getAction()); + $xoops->tpl->assign('method', $this->getMethod()); + $xoops->tpl->assign('extra', $this->getExtra()); $hidden = ''; - $class = 'even'; foreach ($this->getElements() as $ele) { - /* @var $ele XoopsFormElement */ if (!$ele->isHidden()) { if (!$ele instanceof XoopsFormRaw) { - $ret .= '<tr valign="top" align="left"><td class="head">'; - if (($caption = $ele->getCaption()) != '') { - $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">'; - $ret .= '<span class="caption-text">' . $caption . '</span>'; - $ret .= '<span class="caption-marker">*</span>'; - $ret .= '</div>'; - } - if (($desc = $ele->getDescription()) != '') { - $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>'; - } - $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE; + $input['name'] = $ele->getName(); + $input['caption'] = $ele->getCaption(); + $input['description'] = $ele->getDescription(); + $input['ele'] = $ele->render(); + $input['required'] = $ele->isRequired(); + $input['pattern_description'] = $ele->getPatternDescription(); + $input['datalist'] = $ele->getDatalist(); } else { $ret .= $ele->render(); } + $xoops->tpl->append_by_ref('input', $input); + unset($input); } else { - $hidden .= $ele->render(); + $hidden .= $ele->render(). NWLINE; } } - $ret .= '</tbody></table>' . NWLINE . ' ' . $hidden . '</form>' . NWLINE; - $ret .= $this->renderValidationJS(true); - return $ret; + $xoops->tpl->assign('hidden', $hidden); + $xoops->tpl->assign('validationJS', $this->renderValidationJS(true)); + $xoops->tpl->display('module:system|system_form.html'); } } \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-04-27 21:49:29 UTC (rev 9392) @@ -0,0 +1,62 @@ +<{if $type == 'horizontal'}> +<form class="form-horizontal" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> + <fieldset> + <legend><{$title}></legend> + <{foreach item=input from=$input}> + <{if $input.datalist != ''}> + <{$input.datalist}> + <{/if}> + <div class="control-group"> + <label class="control-label" for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <div class="controls"> + <{$input.ele}> + <span class="dsc_pattern_horizontal"><{$input.pattern_description}></span> + <{if $input.description != ''}> + <p class="help-block"><{$input.description}></p> + <{/if}> + </div> + </div> + <{/foreach}> + <{$hidden}> + </fieldset> +</form> +<{/if}> +<{if $type == 'vertical'}> +<form class="form-vertical" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> + <fieldset> + <legend><{$title}></legend> + <{foreach item=input from=$input}> + <{if $input.datalist != ''}> + <{$input.datalist}> + <{/if}> + <label for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <{$input.ele}> + <{if $input.description != ''}> + <span class="help-inline"><{$input.description}></span> + <{/if}> + <p class="dsc_pattern_vertical"><{$input.pattern_description}></p> + <{/foreach}> + <{$hidden}> + </fieldset> +</form> +<{/if}> + +<{if $type == 'inline'}> +<form class="well form-inline" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> + <fieldset> + <legend><{$title}></legend> + <{foreach item=input from=$input}> + <{if $input.datalist != ''}> + <{$input.datalist}> + <{/if}> + <label for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <{$input.ele}> + <{if $input.description != ''}> + <span class="help-inline"><{$input.description}></span> + <{/if}> + <{/foreach}> + <{$hidden}> + </fieldset> +</form> +<{/if}> +<{$validationJS}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css 2012-04-27 21:49:29 UTC (rev 9392) @@ -123,15 +123,6 @@ text-shadow: 0 1px 0 #FFFFFF; } -/* Form */ -label { - float: none; -} -input[type="submit"], input[type="reset"], input[type="button"], .xo-formbuttons, .formButton, button { - background-color: #D3D2D6; - color: #405A80; - padding: 5px 14px 6px; -} /* Table */ table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-04-27 21:41:52 UTC (rev 9391) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-04-27 21:49:29 UTC (rev 9392) @@ -75,6 +75,7 @@ $modversion['templates'][] = array('file' => 'system_notification_select.html', 'description' => ''); $modversion['templates'][] = array('file' => 'system_block_dummy.html', 'description' => ''); $modversion['templates'][] = array('file' => 'system_homepage.html', 'description' => ''); +$modversion['templates'][] = array('file' => 'system_form.html', 'description' => ''); // Admin Templates /*$modversion['templates'][] = array('file' => 'system_header.html', 'description' => '', ... [truncated message content] |
From: <ma...@us...> - 2012-04-29 16:58:49
|
Revision: 9405 http://xoops.svn.sourceforge.net/xoops/?rev=9405&view=rev Author: mageg Date: 2012-04-29 16:58:43 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Correction in the new forms Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -56,7 +56,7 @@ * @param string $delimiter * @param string $name */ - public function __construct($caption, $delimiter = " ", $name = "") + public function __construct($caption, $delimiter = " ", $name = "") { $this->setName($name); $this->setCaption($caption); @@ -158,21 +158,19 @@ { $count = 0; $ret = ""; - //$ret = "<div class='inline'>"; foreach ($this->getElements() as $ele) { /* @var XoopsFormElement $ele */ if ($count > 0) { $ret .= $this->getDelimiter(); } if ($ele->getCaption() != '') { - $ret .= $ele->getCaption() . " "; + $ret .= $ele->getCaption() . " "; } $ret .= $ele->render() . NWLINE; if (!$ele->isHidden()) { $count++; } } - //$ret .= "</div>"; return $ret; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -50,6 +50,6 @@ */ public function render() { - return '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getName() . '" value="' . $this->getValue() . '" >' . NWLINE; + return '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getName() . rand(1,99) . '" value="' . $this->getValue() . '" >' . NWLINE; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -50,6 +50,6 @@ */ public function render() { - return "<label class='text_label'>" . $this->getValue() . "</label>"; + return "<span>" . $this->getValue() . "</span>"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -86,25 +86,23 @@ $hidden = ''; foreach ($this->getElements() as $ele) { if (!$ele->isHidden()) { - if (!$ele instanceof XoopsFormRaw) { - $input['name'] = $ele->getName(); - $input['caption'] = $ele->getCaption(); - $input['description'] = $ele->getDescription(); - $input['ele'] = $ele->render(); - $input['required'] = $ele->isRequired(); - $input['pattern_description'] = $ele->getPatternDescription(); - $input['datalist'] = $ele->getDatalist(); - } else { - $ret .= $ele->render(); - } - $xoops->tpl->append_by_ref('input', $input); + $input['name'] = $ele->getName(); + $input['caption'] = $ele->getCaption(); + $input['description'] = $ele->getDescription(); + $input['ele'] = $ele->render(); + $input['required'] = $ele->isRequired(); + $input['pattern_description'] = $ele->getPatternDescription(); + $input['datalist'] = $ele->getDatalist(); + $xoops->tpl->append_by_ref('xo_input', $input); unset($input); } else { $hidden .= $ele->render(). NWLINE; } + } $xoops->tpl->assign('hidden', $hidden); $xoops->tpl->assign('validationJS', $this->renderValidationJS(true)); $xoops->tpl->display('module:system|system_form.html'); + $xoops->tpl->clear_assign('xo_input'); } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css 2012-04-29 16:58:43 UTC (rev 9405) @@ -19,6 +19,4 @@ color: #b94a48; } -.text_label{margin-top: 5px;} - .caption-required{color: #b94a48;} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-04-29 16:58:43 UTC (rev 9405) @@ -2,12 +2,12 @@ <form class="form-horizontal" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> <fieldset> <legend><{$title}></legend> - <{foreach item=input from=$input}> + <{foreach item=input from=$xo_input}> <{if $input.datalist != ''}> <{$input.datalist}> <{/if}> <div class="control-group"> - <label class="control-label" for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <label class="control-label"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> <div class="controls"> <{$input.ele}> <span class="dsc_pattern_horizontal"><{$input.pattern_description}></span> @@ -29,7 +29,7 @@ <{if $input.datalist != ''}> <{$input.datalist}> <{/if}> - <label for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <label><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> <{$input.ele}> <{if $input.description != ''}> <span class="help-inline"><{$input.description}></span> @@ -49,7 +49,7 @@ <{if $input.datalist != ''}> <{$input.datalist}> <{/if}> - <label for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <label><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> <{$input.ele}> <{if $input.description != ''}> <span class="help-inline"><{$input.description}></span> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -117,9 +117,18 @@ $form->addElement(new XoopsFormCaptcha('Captcha', 'captcha', false), true); -$testtray = new XoopsFormElementTray('Test tray', '<br>' ); -$testtray ->addElement($password); -$testtray ->addElement($code); +$testtray = new XoopsFormElementTray('Test tray'); +$select_tray = new XoopsFormSelect('Select_tray', 'select_tray', '', 4, true); +$select_tray->addOption(1, 'Select_tray 1'); +$select_tray->addOption(2, 'Select_tray 2'); +$select_tray->addOption(3, 'Select_tray 3'); +$select_tray->addOption(4, 'Select_tray 4'); +$select_tray->addOption(5, 'Select_tray 5'); +$select_tray->addOption(6, 'Select_tray 6'); +$select_tray->setDescription('Description Select_tray'); +$select_tray->setClass('span2'); +$testtray ->addElement($select_tray); +$testtray ->addElement($select_tray); $form->addElement($testtray); $button = new XoopsFormButton('', 'submit', _SUBMIT, 'submit'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-05-05 17:23:42
|
Revision: 9437 http://xoops.svn.sourceforge.net/xoops/?rev=9437&view=rev Author: mageg Date: 2012-05-05 17:23:35 +0000 (Sat, 05 May 2012) Log Message: ----------- bugfixes in moduladmin Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/default.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-05-05 11:40:48 UTC (rev 9436) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-05-05 17:23:35 UTC (rev 9437) @@ -345,7 +345,7 @@ { $xoops = Xoops::getInstance(); - $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; + $path = XOOPS_URL . "/media/xoops/images/icons/32/"; $this->_obj->loadAdminMenu(); foreach (array_keys($this->_obj->adminmenu) as $i) { if ($this->_obj->adminmenu[$i]['link'] == "admin/" . $menu) { @@ -418,10 +418,10 @@ $xoops->tpl->assign('module', $this->_obj); $this->addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO, 'info', 'id="xo-about"'); - $this->addInfoBoxLine('<label>' . _AM_MODULEADMIN_ABOUT_DESCRIPTION . '</label><text>' . $this->_obj->getInfo("description") . '</text><br />', 'info'); - $this->addInfoBoxLine('<label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"), "m") . '</text><br />', 'info'); - $this->addInfoBoxLine('<label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="' . $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> - ' . $this->_obj->getInfo("module_website_name") . '</a></text>', 'info'); + $this->addInfoBoxLine(_AM_MODULEADMIN_ABOUT_DESCRIPTION . ' ' . $this->_obj->getInfo("description"), 'info'); + $this->addInfoBoxLine(_AM_MODULEADMIN_ABOUT_UPDATEDATE . ' <span class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"), "m") . '</span>', 'info'); + $this->addInfoBoxLine(_AM_MODULEADMIN_ABOUT_WEBSITE . ' <a class="xo-tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="' . $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> + ' . $this->_obj->getInfo("module_website_name") . '</a>', 'info'); $xoops->tpl->assign('xoops_logo', $logo_xoops); $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/default.png =================================================================== (Binary files differ) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html 2012-05-05 11:40:48 UTC (rev 9436) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html 2012-05-05 17:23:35 UTC (rev 9437) @@ -32,7 +32,7 @@ <div class="xo-moduleadmin-infobox outer"> <div class="xo-window"> <div class="xo-window-title"> - <span class="icon icon-page-white-gear"></span> <{$smarty.const._AM_MODULEADMIN_ABOUT_CHANGELOG}> + <span class="ico ico-page-white-gear"></span> <{$smarty.const._AM_MODULEADMIN_ABOUT_CHANGELOG}> </div> <div class="xo-window-data"> <div class="txtchangelog"> @@ -46,6 +46,7 @@ </tr> </table> <{if $xoops_logo}> +<br /> <div align="center"> <a href="http://www.xoops.org" target="_blank"> <img src="<{$xoops_url}>/media/xoops/images/xoopsmicrobutton.gif" alt="XOOPS" title="XOOPS"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-05-06 20:37:40
|
Revision: 9442 http://xoops.svn.sourceforge.net/xoops/?rev=9442&view=rev Author: mageg Date: 2012-05-06 20:37:34 +0000 (Sun, 06 May 2012) Log Message: ----------- add template for xoops confirm Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-05-06 11:09:46 UTC (rev 9441) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-05-06 20:37:34 UTC (rev 9442) @@ -1158,25 +1158,25 @@ public function confirm($hiddens, $action, $msg, $submit = '', $addtoken = true) { $submit = ($submit != '') ? trim($submit) : _SUBMIT; - echo '<div class="confirmMsg">' . $msg . '<br /> - <form method="post" action="' . $action . '">'; + $this->tpl->assign('msg', $msg); + $this->tpl->assign('action', $action); + $this->tpl->assign('submit', $submit); + $str_hiddens = ''; foreach ($hiddens as $name => $value) { if (is_array($value)) { foreach ($value as $caption => $newvalue) { - echo '<input type="radio" name="' . $name . '" value="' . htmlspecialchars($newvalue) . '" /> ' . $caption; + $str_hiddens .= '<input type="radio" name="' . $name . '" value="' . htmlspecialchars($newvalue) . '" > ' . $caption . NWLINE; } - echo '<br />'; + $str_hiddens .= '<br />' . NWLINE; } else { - echo '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />'; + $str_hiddens .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />' . NWLINE; } } if ($addtoken != false) { - echo $this->security->getTokenHTML(); + $this->tpl->assign('token', $this->security->getTokenHTML()); } - echo '<input type="submit" name="confirm_submit" value="' . $submit . '" title="' . $submit . '"/> - <input type="button" name="confirm_back" value="' . _CANCEL . '" onclick="javascript:history.go(-1);" title="' . _CANCEL . '" /> - </form> - </div>'; + $this->tpl->assign('hiddens', $str_hiddens); + $this->tpl->display('module:system|system_confirm.html'); } /** Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html 2012-05-06 20:37:34 UTC (rev 9442) @@ -0,0 +1,11 @@ +<div class="confirmMsg"> + <{$msg}> + <br /> + <form name="confirm" id="confirm" action="<{$action}>" method="post"> + <{$hiddens}> + <{$token}> + <input class="btn btn-danger" type="submit" name="confirm_submit" value="<{$submit}>" title="<{$submit}>"> + <input class="btn" type="button" name="confirm_back" value="<{$smarty.const._CANCEL}>" onclick="javascript:history.go(-1);" title="<{$smarty.const._CANCEL}>"> + + </form> +</div> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-05-06 11:09:46 UTC (rev 9441) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-05-06 20:37:34 UTC (rev 9442) @@ -76,6 +76,7 @@ $modversion['templates'][] = array('file' => 'system_block_dummy.html', 'description' => ''); $modversion['templates'][] = array('file' => 'system_homepage.html', 'description' => ''); $modversion['templates'][] = array('file' => 'system_form.html', 'description' => ''); +$modversion['templates'][] = array('file' => 'system_confirm.html', 'description' => ''); // Admin Templates /*$modversion['templates'][] = array('file' => 'system_header.html', 'description' => '', 'type' => 'admin'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2012-05-08 11:28:29
|
Revision: 9457 http://xoops.svn.sourceforge.net/xoops/?rev=9457&view=rev Author: forxoops Date: 2012-05-08 11:28:18 +0000 (Tue, 08 May 2012) Log Message: ----------- Change mailuser as plugin Correct an error in new form Remove some error for PHP5.3 STRICT Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -52,10 +52,9 @@ /** * create HTML to output the form as a theme-enabled table with validation. - * - * @return string + * @param bool $template */ - public function render($template = true) + public function render($template = false) { $xoops = Xoops::getInstance(); $xoops->theme->addStylesheet('media/xoops/css/form.css'); @@ -85,6 +84,7 @@ $xoops->tpl->assign('extra', $this->getExtra()); $hidden = ''; foreach ($this->getElements() as $ele) { + /* @var $ele XoopsFormElement */ if (!$ele->isHidden()) { $input['name'] = $ele->getName(); $input['caption'] = $ele->getCaption(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * avatars module + * Avatars plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * avatars module + * avatars plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * mail user plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -20,19 +20,16 @@ * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; - $adminmenu = array(); $i = 1; $adminmenu[$i]['title'] = _MI_MAILUSERS_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'home.png'; +$adminmenu[$i]['icon'] = 'home.png'; $i++; $adminmenu[$i]['title'] = _MI_MAILUSERS_SENDMAIL; $adminmenu[$i]['link'] = "admin/send_mails.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'mail_country.png'; +$adminmenu[$i]['icon'] = 'mail_country.png'; $i++; $adminmenu[$i]['title'] = _MI_MAILUSERS_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; - +$adminmenu[$i]['icon'] = 'about.png'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/send_mails.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * Mailusers Manager + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -45,6 +45,8 @@ // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addScript('media/jquery/jquery.js'); +// Add Scripts +$xoops->theme->addScript('media/xoops/xoops.js'); $xoops->theme->addScript('modules/system/js/admin.js'); @@ -57,9 +59,8 @@ case 'list': default: - $display_criteria = 1; - $form = new XoopsThemeForm(_AM_MAILUSERS_LIST, "mailusers", "send_mails.php?", 'post', true); + $form = new XoopsThemeForm(_AM_MAILUSERS_LIST, "mailusers", "send_mails.php", 'post', true); //---------------------------------------- if (!empty($_POST['memberslist_id'])) { $user_count = count($_POST['memberslist_id']); @@ -153,7 +154,7 @@ $form->setRequired($subject_text); $form->setRequired($body_text); // Assign form - $xoops->tpl->assign('form', $form->render()); + $xoops->tpl->assign('form_mail', $form->render()); break; // Send Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/admin.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -27,24 +27,8 @@ define("_AM_MAILUSERS_MAILER_MAIL", ""); define("_AM_MAILUSERS_MAILER_SENDMAIL", ""); define("_AM_MAILUSERS_MAILER_", ""); -define("_AM_MAILUSERS_MAILFROM", "FROM address"); -define("_AM_MAILUSERS_MAILFROMDESC", ""); -define("_AM_MAILUSERS_MAILFROMNAME", "FROM name"); -define("_AM_MAILUSERS_MAILFROMNAMEDESC", ""); // RMV-NOTIFY -define("_AM_MAILUSERS_MAILFROMUID", "FROM user"); -define("_AM_MAILUSERS_MAILFROMUIDDESC", "When the system sends a private message, which user should appear to have sent it?"); -define("_AM_MAILUSERS_MAILERMETHOD", "Mail delivery method"); -define("_AM_MAILUSERS_MAILERMETHODDESC", "Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); -define("_AM_MAILUSERS_SMTPHOST", "SMTP host(s)"); -define("_AM_MAILUSERS_SMTPHOSTDESC", "List of SMTP servers to try to connect to."); -define("_AM_MAILUSERS_SMTPUSER", "SMTPAuth username"); -define("_AM_MAILUSERS_SMTPUSERDESC", "Username to connect to an SMTP host with SMTPAuth."); -define("_AM_MAILUSERS_SMTPPASS", "SMTPAuth password"); -define("_AM_MAILUSERS_SMTPPASSDESC", "Password to connect to an SMTP host with SMTPAuth."); -define("_AM_MAILUSERS_SENDMAILPATH", "Path to sendmail"); -define("_AM_MAILUSERS_SENDMAILPATHDESC", "Path to the sendmail program (or substitute) on the webserver."); define("_AM_MAILUSERS_THEMEOK", "Selectable themes"); define("_AM_MAILUSERS_THEMEOKDSC", "Choose themes that users can select as the default theme"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -24,9 +24,24 @@ define("_MI_MAILUSERS_NAME", "Mail users"); define("_MI_MAILUSERS_DESC", "Module for managing mails"); define("_MI_MAILUSERS_SENDMAIL", "Send Mail"); - // Menu define("_MI_MAILUSERS_INDEX", "Home"); define("_MI_MAILUSERS_MAILUSER_MANAGER", "Mail users manager"); define("_MI_MAILUSERS_ABOUT", "About"); - +// Preferences +define("_AM_MAILUSERS_MAILFROM", "FROM address"); +define("_AM_MAILUSERS_MAILFROMDESC", ""); +define("_AM_MAILUSERS_MAILFROMNAME", "FROM name"); +define("_AM_MAILUSERS_MAILFROMNAMEDESC", ""); +define("_AM_MAILUSERS_MAILFROMUID", "FROM user"); +define("_AM_MAILUSERS_MAILFROMUIDDESC", "When the system sends a private message, which user should appear to have sent it?"); +define("_AM_MAILUSERS_MAILERMETHOD", "Mail delivery method"); +define("_AM_MAILUSERS_MAILERMETHODDESC", "Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); +define("_AM_MAILUSERS_SENDMAILPATH", "Path to sendmail"); +define("_AM_MAILUSERS_SENDMAILPATHDESC", "Path to the sendmail program (or substitute) on the webserver."); +define("_AM_MAILUSERS_SMTPHOST", "SMTP host(s)"); +define("_AM_MAILUSERS_SMTPHOSTDESC", "List of SMTP servers to try to connect to."); +define("_AM_MAILUSERS_SMTPUSER", "SMTPAuth username"); +define("_AM_MAILUSERS_SMTPUSERDESC", "Username to connect to an SMTP host with SMTPAuth."); +define("_AM_MAILUSERS_SMTPPASS", "SMTPAuth password"); +define("_AM_MAILUSERS_SMTPPASSDESC", "Password to connect to an SMTP host with SMTPAuth."); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/templates/admin/mailusers_admin_send_mail.html 2012-05-08 11:28:18 UTC (rev 9457) @@ -9,4 +9,4 @@ <{includeq file="admin:system|admin_buttons.html"}> -<{$form}> \ No newline at end of file +<{$form_mail}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -10,7 +10,7 @@ */ /** - * smiles module + * Mailusers Plugin * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -51,6 +51,12 @@ // Set to 1 if you want to display menu generated by system module $modversion['system_menu'] = 1; +/* + Manage plugin + */ +$modversion['plugin'] = 1; +$modversion['plugin_module'][] = 'system'; + // Admin things $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -161,9 +161,9 @@ if (round($module->getInfo('version'), 2) != $plugin->getVar('version')) { $module->setInfo('warning_update', true); } - $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoops->user->getGroups()); + $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getInfo('mid'), $xoops->user->getGroups()); if ($sadmin && ($module->getVar('hasnotification') || is_array($module->getInfo('config')) || is_array($module->getInfo('comments')))) { - $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getVar('mid')); + $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getInfo('mid')); } } else { $module->setInfo('install', false); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-05-08 08:19:13 UTC (rev 9456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-05-08 11:28:18 UTC (rev 9457) @@ -60,7 +60,7 @@ XoopsLoad::load('module', 'system'); $system_module = new SystemModule(); - + $adminmenu = null; include dirname(__FILE__) . '/menu.php'; if (!$xoops->isModule() || 'system' == $xoops->module->getVar('dirname', 'n')) { $modpath = XOOPS_URL . '/admin.php'; @@ -159,6 +159,7 @@ $xoops->module->loadAdminMenu(); // Get menu tab handler + /* @var $menu_handler SystemMenuHandler */ $menu_handler = $xoops->getModuleHandler('menu', 'system'); // Define top navigation $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoops->module->getVar('mid', 'e'), _AM_SYSTEM_PREF); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2012-05-08 15:35:06
|
Revision: 9458 http://xoops.svn.sourceforge.net/xoops/?rev=9458&view=rev Author: forxoops Date: 2012-05-08 15:34:54 +0000 (Tue, 08 May 2012) Log Message: ----------- Rename moduleadmin function Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -86,7 +86,7 @@ * @param string $link * @param bool $home */ - public function addBreadLink($title = '', $link = '', $home = false) + public function addBreadcrumbLink($title = '', $link = '', $home = false) { if ($title != '') { $this->_bread[] = array( Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -77,9 +77,9 @@ $xoops->theme->addScript('modules/system/js/blocks.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_MANAGMENT); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_MANAGMENT); $admin_page->renderBreadcrumb(); $admin_page->addItemButton(_AM_SYSTEM_BLOCKS_ADD, 'admin.php?fct=blocksadmin&op=add', 'add'); $admin_page->renderButton(); @@ -192,9 +192,9 @@ $xoops->theme->addScript('modules/system/js/blocks.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_ADDBLOCK); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_ADDBLOCK); $admin_page->renderBreadcrumb(); // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); @@ -393,9 +393,9 @@ $xoops->theme->addScript('modules/system/js/admin.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_EDITBLOCK); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_EDITBLOCK); $admin_page->renderBreadcrumb(); $block = $block_handler->get($block_id); /* @var $form SystemBlockForm */ @@ -416,9 +416,9 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_BLOCKS_DELETEBLOCK); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_ADMIN, $system->adminVersion('blocksadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_BLOCKS_DELETEBLOCK); $admin_page->renderBreadcrumb(); // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -95,9 +95,9 @@ case 'comments_form_purge': // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_COMMENTS_NAV_MANAGER, $system->adminVersion('comments', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_COMMENTS_NAV_PURGE); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_COMMENTS_NAV_MANAGER, $system->adminVersion('comments', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_COMMENTS_NAV_PURGE); $admin_page->renderBreadcrumb(); //Affichage du formulaire de purge @@ -201,9 +201,9 @@ default: // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_COMMENTS_NAV_MANAGER, $system->adminVersion('comments', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_COMMENTS_NAV_MAIN); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_COMMENTS_NAV_MANAGER, $system->adminVersion('comments', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_COMMENTS_NAV_MAIN); $admin_page->renderBreadcrumb(); $admin_page->addTips(_AM_SYSTEM_COMMENTS_NAV_TIPS); $admin_page->renderTips(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -53,9 +53,9 @@ $xoops->theme->addScript('modules/system/js/admin.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_MAIN); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_MAIN); $admin_page->addItemButton(_AM_SYSTEM_GROUPS_ADD, 'admin.php?fct=groups&op=groups_add', 'add'); $admin_page->addTips(_AM_SYSTEM_GROUPS_NAV_TIPS_1); $admin_page->renderBreadcrumb(); @@ -115,9 +115,9 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_ADD); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_ADD); $admin_page->addTips(_AM_SYSTEM_GROUPS_NAV_TIPS_2); $admin_page->renderBreadcrumb(); $admin_page->renderTips(); @@ -135,9 +135,9 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_EDIT); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_EDIT); $admin_page->addTips(_AM_SYSTEM_GROUPS_NAV_TIPS_2); $admin_page->renderBreadcrumb(); $admin_page->renderTips(); @@ -305,9 +305,9 @@ case 'groups_delete': // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_GROUPS_NAV_DELETE); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, $system->adminVersion('groups', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_GROUPS_NAV_DELETE); $admin_page->renderBreadcrumb(); $groups_id = $system->cleanVars($_REQUEST, 'groups_id', 0, 'int'); if ($groups_id > 0) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -85,9 +85,9 @@ $xoops->theme->addScript('modules/system/js/admin.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_IMAGES_MANAGER, $system->adminVersion('images', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_IMAGES_MANAGER); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_IMAGES_MANAGER, $system->adminVersion('images', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_IMAGES_MANAGER); $admin_page->renderBreadcrumb(); $admin_page->addTips(_AM_SYSTEM_IMAGES_TIPS); $admin_page->renderTips(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -60,9 +60,9 @@ $xoops->theme->addScript('modules/system/js/module.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_MAIN); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_MAIN); $admin_page->addTips(_AM_SYSTEM_MODULES_TIPS); $admin_page->renderBreadcrumb(); $admin_page->renderTips(); @@ -176,9 +176,9 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_INSTALL); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_INSTALL); $admin_page->renderBreadcrumb(); $ret = array(); @@ -211,9 +211,9 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_UNINSTALL); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_UNINSTALL); $admin_page->renderBreadcrumb(); $ret = array(); @@ -241,9 +241,9 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_MODULES_UPDATE); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_ADMIN, $system->adminVersion('modulesadmin', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_MODULES_UPDATE); $admin_page->renderBreadcrumb(); $ret = array(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -52,7 +52,7 @@ $xoops->theme->addScript('modules/system/js/module.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_MAIN); $admin_page->addTips(_AM_SYSTEM_PLUGINS_TIPS); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -56,8 +56,8 @@ // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_TEMPLATES_NAV_MANAGER, $system->adminVersion('tplsets', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_TEMPLATES_NAV_MANAGER, $system->adminVersion('tplsets', 'adminpath')); $admin_page->renderBreadcrumb(); $admin_page->addTips(_AM_SYSTEM_TEMPLATES_NAV_TIPS); $admin_page->renderTips(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -61,9 +61,9 @@ case 'users_edit': // Assign Breadcrumb menu $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_EDIT_USER); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_EDIT_USER); $admin_page->renderBreadcrumb(); $uid = $system->cleanVars($_GET, 'uid', 0); $member_handler = $xoops->getHandlerMember(); @@ -76,9 +76,9 @@ case 'users_add': // Assign Breadcrumb menu $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_ADD_USER); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_ADD_USER); $admin_page->renderBreadcrumb(); $member_handler = $xoops->getHandlerMember(); $user = $member_handler->createUser(); @@ -90,9 +90,9 @@ case 'users_delete': // Assign Breadcrumb menu $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_DELETE_USER); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_DELETE_USER); $admin_page->renderBreadcrumb(); $system_breadcrumb->render(); $user = $member_handler->getUser($uid); @@ -355,9 +355,9 @@ if (isset($_REQUEST['complet_search'])) { // Assign Breadcrumb menu $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_ADVANCED_SEARCH); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_ADVANCED_SEARCH); $admin_page->renderBreadcrumb(); $acttotal = $member_handler->getUserCount(new Criteria('level', 0, '>')); @@ -475,9 +475,9 @@ //Display data // Assign Breadcrumb menu $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_USERS_NAV_LIST); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_MAIN, $system->adminVersion('users', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_USERS_NAV_LIST); $admin_page->renderBreadcrumb(); $admin_page->addTips(_AM_SYSTEM_USERS_NAV_TIPS); $admin_page->renderTips(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2012-05-08 11:28:18 UTC (rev 9457) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2012-05-08 15:34:54 UTC (rev 9458) @@ -104,8 +104,8 @@ $xoops->theme->addScript('modules/system/js/admin.js'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_CONFIG); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CONFIG); $admin_page->renderBreadcrumb(); $admin_page->addTips(_AM_SYSTEM_TIPS_MAIN); $admin_page->renderTips(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2012-05-10 10:00:14
|
Revision: 9472 http://xoops.svn.sourceforge.net/xoops/?rev=9472&view=rev Author: forxoops Date: 2012-05-10 10:00:07 +0000 (Thu, 10 May 2012) Log Message: ----------- Manage plugins link in admin area for each module Add some change to admin theme Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/mailuser_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2012-05-10 10:00:07 UTC (rev 9472) @@ -102,6 +102,10 @@ vertical-align: middle; width: 68px !important; } +.moduleadmin-icon a:hover { + background-color: #D2E2F9; + border: 1px solid #A4C3EF; +} .moduleadmin-icon a img { margin: 6px 0; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/language/english/modinfo.php 2012-05-10 10:00:07 UTC (rev 9472) @@ -22,7 +22,7 @@ // Info module define("_MI_MAILUSERS_NAME", "Mail users"); -define("_MI_MAILUSERS_DESC", "Module for managing mails"); +define("_MI_MAILUSERS_DESC", "Plugin for managing mails"); define("_MI_MAILUSERS_SENDMAIL", "Send Mail"); // Menu define("_MI_MAILUSERS_INDEX", "Home"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php 2012-05-10 10:00:07 UTC (rev 9472) @@ -53,15 +53,15 @@ // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_MAIN); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_MAIN); $admin_page->addTips(_AM_SYSTEM_PLUGINS_TIPS); $admin_page->renderBreadcrumb(); $admin_page->renderTips(); - $system_module = new SystemModule(); + $system_plugin = new SystemPlugin(); - $plugin = $system_module->getPlugin(); + $plugin = $system_plugin->getPluginList(); $xoops->tpl->assign('xoops', $xoops); $xoops->tpl->assign('plugin_list', $plugin); @@ -77,24 +77,24 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_INSTALL); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_INSTALL); $admin_page->renderBreadcrumb(); $ret = array(); - $system_module = new SystemModule(); - $ret = $system_module->install($module); + $system_plugin = new SystemPlugin(); + $ret = $system_plugin->install($module); if ($ret) { $xoops->tpl->assign('install', 1); $xoops->tpl->assign('module', $ret); $xoops->tpl->assign('from_title', _AM_SYSTEM_PLUGINS_ADMIN); $xoops->tpl->assign('from_link', $system->adminVersion('plugins', 'adminpath')); $xoops->tpl->assign('title', _AM_SYSTEM_PLUGINS_INSTALL); - $xoops->tpl->assign('log', $system_module->trace); + $xoops->tpl->assign('log', $system_plugin->trace); } else { - print_r($system_module->error); - //print_r($system_module->trace); + print_r($system_plugin->error); + //print_r($system_plugin->trace); } //Set active modules in cache folder $xoops->setActiveModules(); @@ -112,20 +112,20 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_UNINSTALL); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_UNINSTALL); $admin_page->renderBreadcrumb(); $ret = array(); - $system_module = new SystemModule(); - $ret = $system_module->uninstall($module->getVar('dirname')); + $system_plugin = new SystemPlugin(); + $ret = $system_plugin->uninstall($module->getVar('dirname')); $xoops->tpl->assign('module', $ret); if ($ret) { $xoops->tpl->assign('from_title', _AM_SYSTEM_PLUGINS_ADMIN); $xoops->tpl->assign('from_link', $system->adminVersion('plugins', 'adminpath')); $xoops->tpl->assign('title', _AM_SYSTEM_PLUGINS_UNINSTALL); - $xoops->tpl->assign('log', $system_module->trace); + $xoops->tpl->assign('log', $system_plugin->trace); } // Call Footer $xoops->footer(); @@ -142,21 +142,21 @@ $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); - $admin_page->addBreadLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); - $admin_page->addBreadLink(_AM_SYSTEM_PLUGINS_UPDATE); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_ADMIN, $system->adminVersion('plugins', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PLUGINS_UPDATE); $admin_page->renderBreadcrumb(); $ret = array(); - $system_module = new SystemModule(); - $ret = $system_module->update($module->getVar('dirname')); + $system_plugin = new SystemPlugin(); + $ret = $system_plugin->update($module->getVar('dirname')); $xoops->tpl->assign('module', $ret); if ($ret) { $xoops->tpl->assign('install', 1); $xoops->tpl->assign('from_title', _AM_SYSTEM_PLUGINS_ADMIN); $xoops->tpl->assign('from_link', $system->adminVersion('plugins', 'adminpath')); $xoops->tpl->assign('title', _AM_SYSTEM_PLUGINS_UPDATE); - $xoops->tpl->assign('log', $system_module->trace); + $xoops->tpl->assign('log', $system_plugin->trace); } // Call Footer $xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-05-10 10:00:07 UTC (rev 9472) @@ -15,7 +15,7 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Andricq Nicolas (AKA MusS) - * @package + * @package System * @version $Id$ */ @@ -26,11 +26,11 @@ public $trace = array(); - private $_list = array(); + protected $_list = array(); - private $_mods = array(); + protected $_mods = array(); - private $_reservedTables = array( + protected $_reservedTables = array( 'avatar', 'avatar_users_link', 'block_module_link', 'xoopscomments', 'config', 'configcategory', 'configoption', 'image', 'imagebody', 'imagecategory', 'imgset', 'imgset_tplset_link', 'imgsetimg', 'groups', 'groups_users_link', 'group_permission', 'online', 'bannerclient', 'banner', 'bannerfinish', 'priv_msgs', @@ -134,58 +134,6 @@ } /** - * @return array - */ - public function getPlugin() - { - // Get main instance - $xoops = Xoops::getInstance(); - $module_handler = $xoops->getHandlerModule(); - $moduleperm_handler = $xoops->getHandlerGroupperm(); - - $ret = array(); - $i = 0; - foreach ($this->_list as $file) { - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $file . '/xoops_version.php')) { - clearstatcache(); - $file = trim($file); - /* @var $module XoopsModule */ - $module = $module_handler->create(); - $module->loadInfo($file); - if ($module->getInfo('plugin')) { - if (in_array($file, $this->_mods)) { - $module->setInfo('install', true); - $plugin = $module_handler->getByDirname($module->getInfo('dirname')); - $module->setInfo('mid', $plugin->getVar('mid')); - $module->setInfo('update', XoopsLocal::formatTimestamp($plugin->getVar('last_update'), 's')); - if (round($module->getInfo('version'), 2) != $plugin->getVar('version')) { - $module->setInfo('warning_update', true); - } - $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getInfo('mid'), $xoops->user->getGroups()); - if ($sadmin && ($module->getVar('hasnotification') || is_array($module->getInfo('config')) || is_array($module->getInfo('comments')))) { - $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getInfo('mid')); - } - } else { - $module->setInfo('install', false); - } - $module->setInfo('version', round($module->getInfo('version'), 2)); - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getInfo('dirname') . '/icons/logo_small.png')) { - $module->setInfo('logo_small', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/icons/logo_small.png'); - } else { - $module->setInfo('logo_small', XOOPS_URL . '/media/xoops/images/icons/16/default.png'); - } - $module->setInfo('link_admin', XOOPS_URL . '/modules/' .$module->getInfo('dirname') . '/' . $module->getInfo('adminindex')); - $module->setInfo('options', $module->getAdminMenu()); - $ret[] = $module; - unset($module); - $i++; - } - } - } - return $ret; - } - - /** * @param string $mod * @return bool|XoopsModule|XoopsObject */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php 2012-05-10 10:00:07 UTC (rev 9472) @@ -25,6 +25,7 @@ XoopsLoad::load('system', 'system'); XoopsLoad::load('module', 'system'); +XoopsLoad::load('plugin', 'system'); $system = System::getInstance(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2012-05-10 10:00:07 UTC (rev 9472) @@ -4,7 +4,7 @@ <div class="xo-window-data"> <div class="moduleadmin-icon"> <{foreach item=menu from=$xo_admin_index_menu}> - <a href="../<{$menu.link}>" title="<{$menu.title}>"> + <a class="xo-tooltip" href="../<{$menu.link}>" title="<{$menu.title}>"> <img src="<{$menu.icon}>" alt="<{$menu.title}>" /> <span><{$menu.title}></span> </a> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css 2012-05-10 10:00:07 UTC (rev 9472) @@ -82,6 +82,10 @@ vertical-align: middle; width: 68px !important; } +.cp-icon a:hover { + background-color: #D2E2F9; + border: 1px solid #A4C3EF; +} .cp-icon a img { margin: 6px 0; } @@ -91,12 +95,24 @@ font-weight: bold; line-height: 1; } +.cp-cat { + border-bottom: 1px solid #ccc; + margin-right: 6px; + padding: 4px 0 6px; + text-align: left; +} .mod-icons { float: right; width: 32%; } +.mod-icons .mod-link { + border-top: 1px solid #ccc; + margin: 10px 5px 0 0; + padding: 5px; +} + ul.breadcrumb { text-shadow: 0 0 2px #000; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-05-10 10:00:07 UTC (rev 9472) @@ -45,7 +45,7 @@ $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); $xoops->theme->addScript($xoops->url('/media/jquery/plugins/jquery.ui.js')); $xoops->theme->addScript($xoops->url('/media/bootstrap/js/bootstrap.min.js')); - //ddsmoothmenu + // ddsmoothmenu $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/ddsmoothmenu.js'); $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tooltip.js'); @@ -58,7 +58,9 @@ $xoops->tpl->assign('quick_menu', $quick); XoopsLoad::load('module', 'system'); + XoopsLoad::load('plugin', 'system'); $system_module = new SystemModule(); + $system_plugin = new SystemPlugin(); $adminmenu = null; include dirname(__FILE__) . '/menu.php'; @@ -77,6 +79,7 @@ : XOOPS_ADMINTHEME_URL . '/default/' . $mod_options[$item]['icon']; unset($mod_options[$item]['icon_small']); } + } else { $moddir = $xoops->module->getVar('dirname', 'n'); $modpath = XOOPS_URL . '/modules/' . $moddir; @@ -103,10 +106,13 @@ unset($module_list); // Plugins list - $plugin_list = $system_module->getPlugin(); + $plugin_list = $system_plugin->getPluginList(); $xoops->tpl->assign('plugin_menu', $plugin_list); - unset($module_list); + unset($plugin_list); + $plugin_mod = $system_plugin->getPlugin( $moddir ); + $xoops->tpl->assign('plugin_mod', $plugin_mod); + // add preferences menu $menu = array(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/mailuser_small.png =================================================================== (Binary files differ) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php 2012-05-10 10:00:07 UTC (rev 9472) @@ -26,8 +26,8 @@ define("_DEFAULT_DASHBORD","Dashboard"); define("_DEFAULT_DASHBORD_DESC","Control and manage your site"); -define("_DEFAULT_INSTALLEDMODULES","Modules"); -define("_DEFAULT_INSTALLEDPLUGINS","Plugins"); +define("_DEFAULT_INSTALLEDMODULES","Installed modules"); +define("_DEFAULT_INSTALLEDPLUGINS","Installed plugins"); define("_DEFAULT_XOOPSTHEMES","XOOPS Themes"); define("_DEFAULT_XOOPSMODULES","XOOPS Modules"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html 2012-05-10 10:00:07 UTC (rev 9472) @@ -1,127 +1,37 @@ <!DOCTYPE html> <html lang="<{$xoops_langcode}>"> - <head> - <{includeq file="$theme_tpl/head.html"}> - </head> - <body id="<{$xoops_dirname}>" class="<{$xoops_langcode}>"> - <div class="navbar navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container-fluid"> - <{includeq file="$theme_tpl/menu.html"}> - </div> - </div> - </div> - <div class="subnav subnav-fixed"> - <{includeq file="$theme_tpl/icons.html"}> - </div> - <div class="clear"></div> +<head> + <{includeq file="$theme_tpl/head.html"}> +</head> +<body id="<{$xoops_dirname}>" class="<{$xoops_langcode}>"> +<div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> <div class="container-fluid"> - <div class="dashboard-content"> - <{if !$xoops_contents}> - - <section id="panel"> - <div class="page-header"> - <h1><{$smarty.const._DEFAULT_DASHBORD}> <small><{$smarty.const._DEFAULT_DASHBORD_DESC}></small></h1> - </div> - <{if !$error_msg}> - <{foreach item=msg from=$error_msg}> - <div class="row"> - <div class="span16 alert-message error"> - <p><{$msg}></p> - </div> - </div> - <{/foreach}> - <{/if}> - - <div class="card-icons outer"> - <div class="xo-window"> - <div class="xo-window-title"><span class="ico ico-wrench-5"></span> <{$smarty.const._DEFAULT_CPHOME}></div> - <div class="xo-window-data"> - <div class="cp-icon"> - <{foreach item=op from=$mod_options}> - <a class="xo-tooltip" href="<{$op.link}>" title="<{$op.desc}>"> - <img src='<{$op.icon|default:"$theme_icons/icon_options.png"}>' alt="<{$op.desc}>" /> - <span><{$op.title}></span> - </a> - <{/foreach}> - <a class="xo-tooltip" href="<{xoAppUrl modules/system/admin.php}>" title="<{$smarty.const._AM_SYSTEM_CONFIG}>"> - <img src='<{"$theme_icons/configuration.png"}>' /> - <span><{$smarty.const._AM_SYSTEM_CONFIG}></span> - </a> - <a class="xo-tooltip" href="<{xoAppUrl modules/system/help.php}>" title="<{$smarty.const._AM_SYSTEM_HELP}>"> - <img src='<{"$theme_icons/help.png"}>' /> - <span><{$smarty.const._AM_SYSTEM_HELP}></span> - </a> - </div> - </div> - </div> - </div> - <div class="mod-icons"> - <div class="outer"> - <div class="xo-window"> - <div class="xo-window-title"> - <span class="ico ico-box"></span> <{$smarty.const._DEFAULT_INSTALLEDMODULES}> - <a class="down" href="javascript:;"> </a> - </div> - <div class="xo-window-data"> - <table class="condensed-table"> - <{foreach item=mod_list from=$module_menu}> - <{if $mod_list->getInfo(dirname) != 'system'}> - <tr> - <td class="span1"><img src="<{$mod_list->getInfo('logo_small')}>" alt="" /></td> - <td><a href="<{$mod_list->getInfo('link_admin')}>"><{$mod_list->getVar(name)}></a></td> - </tr> - <{/if}> - <{/foreach}> - </table> - </div> - </div> - <div class="clear"></div> - </div> - <br /> - <div class="outer"> - <div class="xo-window"> - <div class="xo-window-title"> - <span class="ico ico-plugin"></span> <{$smarty.const._DEFAULT_INSTALLEDPLUGINS}> - <a class="down" href="javascript:;"> </a> - </div> - <div class="xo-window-data"> - <table class="condensed-table"> - <{foreach item=plug_list from=$plugin_menu}> - <{if $plug_list->getInfo(install)}> - <tr> - <td class="span1"><img src="<{$plug_list->getInfo('logo_small')}>" alt="" /></td> - <td><a href="<{$plug_list->getInfo('link_admin')}>"><{$plug_list->getInfo(name)}></a></td> - </tr> - <{/if}> - <{/foreach}> - </table> - </div> - </div> - <div class="clear"></div> - </div> - </div> - <div class="clear"></div> - </section> - <{else}> - <!-- Display Admin menu --> - <{includeq file="admin:system|admin_tabs.html"}> - <div class="xo-module-content <{if $xoops_dirname != 'system'}>modules<{/if}>"><{$xoops_contents}></div> - <{/if}> - </div> + <{includeq file="$theme_tpl/menu.html"}> </div> - <div class="center"> - <a href="<{$xoops_url}>/modules/system/testform.php">Test new form</a> - </div> - <div class="footer"> - <p class="pull-right"><a href="#">Back to top</a></p> - <p class="txtcenter"> - Powered by <a href="http://sourceforge.net/projects/xoops/" rel="external" title="Xoops Project"><{$xoops_version}></a> © 2001-<{$smarty.now|date_format:"%Y"}> - </p> - <!--{xo-logger-output}--> - </div> - <script type="text/javascript"> - ddsmoothmenu.init({mainmenuid: "xo-menu-modules", orientation: 'h', classname: 'ddsmoothmenu', contentsource: "markup"}) - </script> - </body> + </div> +</div> +<div class="subnav subnav-fixed"> + <{includeq file="$theme_tpl/icons.html"}> +</div> +<div class="clear"></div> +<div class="container-fluid"> + <{includeq file="$theme_tpl/dashboard.html"}> +</div> +<div class="center"> + <a href="<{$xoops_url}>/modules/system/testform.php">Test new form</a> +</div> +<div class="footer"> + <p class="pull-right"><a href="#">Back to top</a></p> + + <p class="txtcenter"> + Powered by <a href="http://sourceforge.net/projects/xoops/" rel="external" title="Xoops Project"><{$xoops_version}></a> © + 2001-<{$smarty.now|date_format:"%Y"}> + </p> + <!--{xo-logger-output}--> +</div> +<script type="text/javascript"> + ddsmoothmenu.init({mainmenuid:"xo-menu-modules", orientation:'h', classname:'ddsmoothmenu', contentsource:"markup"}) +</script> +</body> </html> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html 2012-05-09 17:59:30 UTC (rev 9471) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html 2012-05-10 10:00:07 UTC (rev 9472) @@ -2,18 +2,35 @@ <ul class="nav nav-pills pull-right"> <{foreach item=op from=$mod_options}> <li> - <a class="" href="<{$op.link}>" title="<{$op.title}>"> - <img src='<{$op.icon|default:"$theme_icons/icon_options.png"}>' alt="<{$op.title}>" /> - </a></li> + <a class="xo-tooltip" href="<{$op.link}>" title="<{$op.title}>"> + <img src='<{$op.icon|default:"$theme_icons/icon_options.png"}>' alt="<{$op.title}>"/> + </a></li> <{/foreach}> - <{if $moddir !='system' && $mod_options}> + <{foreach item=plug from=$plugin_mod}> <li> - <a class="" href="<{$xoops_url}>/modules/system/admin.php?fct=preferences&op=showmod&mod=<{$modid}>" title="<{$smarty.const._OXYGEN_SITEPREF}>"> - <img src="<{$theme_icons}>/prefs.png" alt="<{$smarty.const._OXYGEN_SITEPREF}>" /> - </a></li> + <a class="xo-tooltip" href="<{$xoops_url}>/modules/<{$plug->getInfo('dirname')}>/<{$plug->getInfo('adminindex')}>" title="<{$plug->getInfo('name')}>"> + <img src="<{$plug->getInfo('logo_large')}>" alt="<{$plug->getInfo('name')}>"/> + </a></li> + <{/foreach}> + <{if $moddir != 'system' && $mod_options}> + <li> + <a class="xo-tooltip" + href="<{$xoops_url}>/modules/system/admin.php?fct=preferences&op=showmod&mod=<{$modid}>" + title="<{$smarty.const._OXYGEN_SITEPREF}>"> + <img src="<{$theme_icons}>/prefs.png" alt="<{$smarty.const._OXYGEN_SITEPREF}>"/> + </a> + </li> <{/if}> + <{if $moddir == 'system' && $mod_options}> <li> - <a class="" href="<{xoAppUrl modules/system/help.php}>" title="<{$smarty.const._AM_SYSTEM_HELP}>"> - <img src='<{"$theme_icons/help.png"}>' alt="<{$smarty.const._AM_SYSTEM_HELP}>" /> - </a></li> + <a class="xo-tooltip" href="<{xoAppUrl modules/system/admin.php}>" title="<{$smarty.const._AM_SYSTEM_CONFIG}>"> + <img src='<{"$theme_icons/configuration.png"}>' alt="<{$smarty.const._AM_SYSTEM_CONFIG}>"/> + </a> + </li> + <{/if}> + <li> + <a class="xo-tooltip" href="<{xoAppUrl modules/system/help.php}>" title="<{$smarty.const._AM_SYSTEM_HELP}>"> + <img src='<{"$theme_icons/help.png"}>' alt="<{$smarty.const._AM_SYSTEM_HELP}>"/> + </a> + </li> </ul> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-05-12 17:27:00
|
Revision: 9490 http://xoops.svn.sourceforge.net/xoops/?rev=9490&view=rev Author: mageg Date: 2012-05-12 17:26:48 +0000 (Sat, 12 May 2012) Log Message: ----------- add maintenance plugin Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/dump.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/maintenance.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/dump/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/dump/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/icons/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_center.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/admin/maintenance_dump.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/xoops_version.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/dump.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/dump.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/maintenance.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/maintenance.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,28 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; +$xoops->header(); +$aboutAdmin = new XoopsModuleAdmin(); +$aboutAdmin->renderNavigation('about.php'); +$aboutAdmin->renderabout('6KJ7RW5DR3VTJ', true); +$xoops->footer(); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,164 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; +// Get main instance +$system = System::getInstance(); +// Check users rights +if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { + exit(_NOPERM); +} +$system = System::getInstance(); +// Get Action type +$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); + +// Call Header +$xoops->header('maintenance_center.html'); + +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('center.php'); + +switch ($op) { + + case 'list': + default: + // Define tips + $admin_page->addTips(_AM_MAINTENANCE_CENTER_TIPS); + $admin_page->renderTips(); + $form = $xoops->getModuleForm(null, 'maintenance'); + $form->getMaintenance(); + $form->render(); + break; + + case 'maintenance_save': + $admin_page->addItemButton(_AM_MAINTENANCE_CENTER_RETURN, 'center.php', 'application-view-detail'); + $admin_page->renderButton(); + + $session = $system->cleanVars($_REQUEST, 'session', 1, 'int'); + $cache = $system->cleanVars($_REQUEST, 'cache', array(), 'array'); + $tables = $system->cleanVars($_REQUEST, 'tables', array(), 'array'); + $tables_op = $system->cleanVars($_REQUEST, 'maintenance', array(), 'array'); + $db = XoopsDatabaseFactory::getDatabaseConnection(); + //Cache + if (!empty($cache)) { + for ($i = 0; $i < count($cache); $i++) { + switch ($cache[$i]) { + case 1: + $files = glob(XOOPS_VAR_PATH . '/caches/smarty_cache/*.*'); + $total_smarty_cache = 0; + foreach ($files as $filename) { + if (basename(strtolower($filename)) != 'index.html') { + unlink($filename); + $total_smarty_cache++; + } + } + $xoops->tpl->assign('smarty_cache', true); + $xoops->tpl->assign('result_smarty_cache', sprintf(_AM_MAINTENANCE_CENTER_RESULT_SMARTY_CACHE, $total_smarty_cache)); + break; + + case 2: + $files = glob(XOOPS_VAR_PATH . '/caches/smarty_compile/*.*'); + $total_smarty_compile = 0; + foreach ($files as $filename) { + if (basename(strtolower($filename)) != 'index.html') { + unlink($filename); + $total_smarty_compile++; + } + } + $xoops->tpl->assign('smarty_compile', true); + $xoops->tpl->assign('result_smarty_compile', sprintf(_AM_MAINTENANCE_CENTER_RESULT_SMARTY_COMPILE, $total_smarty_compile)); + break; + + case 3: + $files = glob(XOOPS_VAR_PATH . '/caches/xoops_cache/*.*'); + $total_xoops_cache = 0; + foreach ($files as $filename) { + if (basename(strtolower($filename)) != 'index.html') { + unlink($filename); + $total_xoops_cache++; + } + } + $xoops->tpl->assign('xoops_cache', true); + $xoops->tpl->assign('result_xoops_cache', sprintf(_AM_MAINTENANCE_CENTER_RESULT_XOOPS_CACHE, $total_xoops_cache)); + break; + } + } + } + //Session + if ($session == 1) { + $result = $db->queryF('TRUNCATE TABLE ' . $db->prefix('session')); + $result ? $result_session = true : $result_session = false; + $xoops->tpl->assign('result_session', $result_session); + $xoops->tpl->assign('session', true); + } + //Maintenance tables + if (!empty($tables) && !empty($tables_op)) { + $tab = array(); + for ($i = 0; $i < 4; $i++) { + $tab[$i] = $i + 1; + } + $tab1 = array(); + for ($i = 0; $i < 4; $i++) { + if (in_array($tab[$i], $tables_op)) { + $tab1[$i] = $tab[$i]; + } else { + $tab1[$i] = '0'; + } + } + unset($tab); + for ($i = 0; $i < count($tables); $i++) { + $result_arr['table'] = $db->prefix . $tables[$i]; + for ($j = 0; $j < 4; $j++) { + switch ($tab1[$j]) { + case 1: + //Optimize + $result = $db->queryF('OPTIMIZE TABLE ' . $db->prefix . $tables[$i]); + $result ? $result_arr['optimize'] = true : $result_arr['optimize'] = false; + break; + + case 2: + //Tables + $result = $db->queryF('CHECK TABLE ' . $db->prefix . $tables[$i]); + $result ? $result_arr['check'] = true : $result_arr['check'] = false; + break; + + case 3: + //Repair + $result = $db->queryF('REPAIR TABLE ' . $db->prefix . $tables[$i]); + $result ? $result_arr['repair'] = true : $result_arr['repair'] = false; + break; + + case 4: + //Analyze + $result = $db->queryF('ANALYZE TABLE ' . $db->prefix . $tables[$i]); + $result ? $result_arr['analyse'] = true : $result_arr['analyse'] = false; + break; + } + } + $xoops->tpl->append_by_ref('result_arr', $result_arr); + unset($result_arr); + } + $xoops->tpl->assign('maintenance', true); + } + break; +} +$xoops->footer(); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,162 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; +// Get main instance +$system = System::getInstance(); +// Check users rights +if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { + exit(_NOPERM); +} +$system = System::getInstance(); +// Get Action type +$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); + +// Call Header +$xoops->header('maintenance_dump.html'); + +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('dump.php'); + +switch ($op) { + + case 'list': + default: + $files = glob(XOOPS_ROOT_PATH . '/modules/maintenance/dump/*.*'); + $count = 0; + foreach ($files as $filename_path) { + $filename = basename(strtolower($filename_path)); + if ($filename != 'index.html') { + $file_arr[$count]['name'] = $filename; + $stat = stat($filename_path); + $file_arr[$count]['size'] = number_format($stat['size']/1024); + $count++; + unset($filename); + } + } + $xoops->tpl->assign('file_arr', array_reverse($file_arr)); + if ($count == 0 && $op == 'list') { + $form = $xoops->getModuleForm(null, 'maintenance'); + $form->getDump(); + $form->render(); + } else { + $admin_page->addItemButton(_AM_MAINTENANCE_DUMP_FORM, 'dump.php?op=dump', 'cd'); + $admin_page->renderButton(); + $xoops->tpl->assign('files', true); + } + break; + + case 'dump_save': + $admin_page->addItemButton(_AM_MAINTENANCE_DUMP_LIST, 'dump.php', 'application-view-detail'); + $admin_page->addItemButton(_AM_MAINTENANCE_DUMP_FORM, 'dump.php?op=dump', 'cd'); + $admin_page->renderButton(); + $dump_modules = isset($_REQUEST['dump_modules']) ? $_REQUEST['dump_modules'] : false; + $dump_tables = isset($_REQUEST['dump_tables']) ? $_REQUEST['dump_tables'] : false; + $drop = $system->cleanVars($_REQUEST, 'drop', 1, 'int'); + + if (($dump_tables == true && $dump_modules == true) || ($dump_tables == false && $dump_modules == false)) { + $xoops->redirect("dump.php", 2, _AM_MAINTENANCE_DUMP_ERROR_TABLES_OR_MODULES); + } + $db = XoopsDatabaseFactory::getDatabaseConnection(); + $dump = new Maintenance(); + $sql_text = "# \n"; + $sql_text .= "# Dump SQL, Generate by Xoops \n"; + $sql_text .= "# Date : " . date('d-m-Y / H:i') . " \n"; + $sql_text .= "# \n\n"; + if ($dump_tables != false) { + $result_module = array(); + for ($i = 0; $i < count($dump_tables); $i++) { + //structure + $result_tables[$i]['name'] = $db->prefix . '_' . $dump_tables[$i]; + $result_structure = $dump->dump_table_structure($db->prefix . '_' . $dump_tables[$i], $drop); + $sql_text .= $result_structure['sql_text']; + $result_tables[$i]['structure'] = $result_structure['structure']; + //data + $result_data = $dump->dump_table_datas($db->prefix . '_' . $dump_tables[$i]); + $sql_text .= $result_data['sql_text']; + $result_tables[$i]['records'] = $result_data['records']; + } + $xoops->tpl->assign('result_t', $result_tables); + } + if ($dump_modules != false) { + $result_module = array(); + for ($i = 0; $i < count($dump_modules); $i++) { + $module_handler = $xoops->getHandlerModule(); + $module = $module_handler->getByDirname($dump_modules[$i]); + $result_module[$i]['name'] = ucfirst($dump_modules[$i]); + $modtables = $module->getInfo('tables'); + if ($modtables != false && is_array($modtables)) { + $count = 0; + foreach ($modtables as $table) { + //structure + $result_tables[$count]['name'] = $db->prefix . '_' . $table; + $result_structure = $dump->dump_table_structure($db->prefix . '_' . $table, $drop); + $sql_text .= $result_structure['sql_text']; + $result_tables[$count]['structure'] = $result_structure['structure']; + + //data + $result_data = $dump->dump_table_datas($db->prefix . '_' . $table); + $sql_text .= $result_data['sql_text']; + $result_tables[$count]['records'] = $result_data['records']; + $count++; + } + $result_module[$i]['table'] = $result_tables; + } else { + $result_module[$i]['table'] = false; + } + unset($result_tables); + } + $xoops->tpl->assign('result_m', $result_module); + } + $xoops->tpl->assign('result_write', true); + $result_write = $dump->dump_write($sql_text); + $xoops->tpl->assign('write', $result_write['write']); + $xoops->tpl->assign('file_name', $result_write['file_name']); + break; + + case 'dump_delete': + $filename = $system->cleanVars($_REQUEST, 'filename', '', 'string'); + if ($filename == '') { + $xoops->redirect("dump.php", 2, _AM_MAINTENANCE_DUMP_NOFILE); + } + unlink(XOOPS_ROOT_PATH . '/modules/maintenance/dump/' . $filename); + $xoops->redirect("dump.php", 2, _AM_MAINTENANCE_DUMP_DELETED); + break; + + case 'dump_deleteall': + $files = glob(XOOPS_ROOT_PATH . '/modules/maintenance/dump/*.*'); + $count = 0; + foreach ($files as $filename_path) { + if (basename(strtolower($filename_path)) != 'index.html') { + unlink($filename_path); + } + } + $xoops->redirect("dump.php", 2, _AM_MAINTENANCE_DUMP_DELETEDALL); + break; + + case 'dump': + $form = $xoops->getModuleForm(null, 'maintenance'); + $form->getDump(); + $form->render(); + break; +} +$xoops->footer(); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,27 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +require_once dirname(dirname(__FILE__)) . '/class/maintenance.php'; + +$xoops = Xoops::getInstance(); +XoopsLoad::load('system', 'system'); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.html 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,46 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; + +$xoops->header(); + +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('index.php'); + +// folder path +$folder_path = XOOPS_ROOT_PATH . '/modules/maintenance/dump'; + +// files +$files = glob(XOOPS_ROOT_PATH . '/modules/maintenance/dump/*.*'); +$count = 0; +foreach ($files as $filename_path) { + if (basename(strtolower($filename_path)) != 'index.html') { + $count++; + } +} +$admin_page->addConfigBoxLine($folder_path, 'folder'); +$admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); +$admin_page->addInfoBox(_MI_MAINTENANCE_DUMP); +$admin_page->addInfoBoxLine(sprintf(_AM_MAINTENANCE_NBFILES, $count)); +$admin_page->renderIndex(); +$xoops->footer(); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,39 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +$adminmenu = array(); +$i = 1; +$adminmenu[$i]['title'] = _MI_MAINTENANCE_INDEX; +$adminmenu[$i]['link'] = "admin/index.php"; +$adminmenu[$i]['icon'] = 'home.png'; +$i++; +$adminmenu[$i]['title'] = _MI_MAINTENANCE_CENTER; +$adminmenu[$i]['link'] = "admin/center.php"; +$adminmenu[$i]['icon'] = 'maintenance.png'; +$i++; +$adminmenu[$i]['title'] = _MI_MAINTENANCE_DUMP; +$adminmenu[$i]['link'] = "admin/dump.php"; +$adminmenu[$i]['icon'] = 'dump.png'; +$i++; +$adminmenu[$i]['title'] = _MI_SMILIES_ABOUT; +$adminmenu[$i]['link'] = 'admin/about.php'; +$adminmenu[$i]['icon'] = 'about.png'; \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/index.html 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,97 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class MaintenanceMaintenanceForm extends XoopsThemeForm +{ + /** + * @param null $obj + */ + public function __construct($obj = null) + { + } + + /** + * Maintenance Form + * @return void + */ + public function getMaintenance() + { + $maintenance = new Maintenance(); + parent::__construct('', "form_maintenance", "center.php", 'post', true); + + $cache = new XoopsFormSelect(_AM_MAINTENANCE_CENTER_CACHE, "cache", '', 3, true); + $cache->setDescription(XOOPS_VAR_PATH . "/cache/smarty_cache/<br />" . XOOPS_VAR_PATH . "/cache/smarty_compile/<br />" . XOOPS_VAR_PATH . "/cache/xoops_cache/"); + $cache_arr = array(1 => _AM_MAINTENANCE_CENTER_SMARTY_CACHE, 2 => _AM_MAINTENANCE_CENTER_SMARTY_COMPILE, 3 => _AM_MAINTENANCE_CENTER_XOOPS_CACHE); + $cache->addOptionArray($cache_arr); + $this->addElement($cache); + + $this->addElement(new XoopsFormRadioYN(_AM_MAINTENANCE_CENTER_SESSION, 'session', '', _YES, _NO)); + + $tables_tray = new XoopsFormElementTray(_AM_MAINTENANCE_CENTER_TABLES, ' '); + $tables_tray->setDescription(_AM_MAINTENANCE_CENTER_TABLES_DESC); + $select_tables = new XoopsFormSelect('', "tables", '', 7, true); + $select_tables->addOptionArray($maintenance->displayTables(true)); + $tables_tray->addElement($select_tables, false); + $choice = new XoopsFormSelect(' ' . _AM_MAINTENANCE_AND . ' ', "maintenance", '', 4, true); + $options = array( + '1' => _AM_MAINTENANCE_CENTER_CHOICE1, '2' => _AM_MAINTENANCE_CENTER_CHOICE2, + '3' => _AM_MAINTENANCE_CENTER_CHOICE3, '4' => _AM_MAINTENANCE_CENTER_CHOICE4 + ); + $choice->addOptionArray($options); + $tables_tray->addElement($choice, false); + $this->addElement($tables_tray); + + $this->addElement(new XoopsFormHidden("op", "maintenance_save")); + $this->addElement(new XoopsFormButton("", "maintenance_save", _SEND, "submit")); + } + + /** + * @return void + */ + public function getDump() + { + $xoops = Xoops::getInstance(); + $maintenance = new Maintenance(); + parent::__construct('', "form_dump", "dump.php", 'post', true); + + $dump_tray = new XoopsFormElementTray(_AM_MAINTENANCE_DUMP_TABLES_OR_MODULES, ''); + $select_tables1 = new XoopsFormSelect('', "dump_tables", '', 7, true); + $select_tables1->addOptionArray($maintenance->displayTables(true)); + $dump_tray->addElement($select_tables1, false); + $ele = new XoopsFormSelect(' ' . _AM_MAINTENANCE_OR . ' ', 'dump_modules', '', 7, true); + /* @var $module_handler XoopsModuleHandler */ + $module_handler = $xoops->getHandlerModule(); + $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + $moduleslist = $module_handler->getNameList($criteria, true); + $ele->addOptionArray($moduleslist); + $dump_tray->addElement($ele); + $this->addElement($dump_tray); + + $this->addElement(new XoopsFormRadioYN(_AM_MAINTENANCE_DUMP_DROP, 'drop', 1, _YES, _NO)); + + $this->addElement(new XoopsFormHidden("op", "dump_save")); + $this->addElement(new XoopsFormButton("", "dump_save", _SEND, "submit")); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/index.html 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,178 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * maintenance plugins + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package maintenance + * @since 2.6.0 + * @author Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * System Maintenance + * + * @copyright copyright (c) 2000 XOOPS.org + * @package system + */ +class Maintenance +{ + var $db; + var $prefix; + + /** + * Constructor + */ + function Maintenance() + { + $db = XoopsDatabaseFactory::getDatabaseConnection(); + $this->db = $db; + $this->prefix = $this->db->prefix . '_'; + } + + /** + * Display Tables + * + * @param array + * @return + */ + function displayTables($array = true) + { + $tables = array(); + $result = $this->db->queryF('SHOW TABLES'); + while ($myrow = $this->db->fetchArray($result)) { + $value = array_values($myrow); + $value = substr($value[0], 5); + $tables[$value] = $value; + } + if ($array = true) { + return $tables; + } else { + return join(',', $tables); + } + } + + /** + * Dump table structure + * + * @param string table + * @param int drop + * @return array 'ret[sql_text] = dump, ret[structure] = display structure + */ + function dump_table_structure($table, $drop) + { + $sql_text = ''; + $verif = false; + $result = $this->db->queryF('SHOW create table `' . $table . '`;'); + if ($result) { + if ($row = $this->db->fetchArray($result)) { + $sql_text .= "# Table structure for table `" . $table . "` \n\n"; + if ($drop == 1) { + $sql_text .= "DROP TABLE IF EXISTS `" . $table . "`;\n\n"; + } + $verif = true; + $sql_text .= $row['Create Table'] . ";\n\n"; + } + } + $this->db->freeRecordSet($result); + $ret['sql_text'] = $sql_text; + $ret['structure'] = $verif; + return $ret; + } + + /** + * Dump table data + * + * @param string table + * @return array 'ret[sql_text] = dump, ret[records] = display records + */ + function dump_table_datas($table) + { + $sql_text = ''; + $count = 0; + $result = $this->db->queryF('SELECT * FROM ' . $table . ';'); + if ($result) { + $num_rows = $this->db->getRowsNum($result); + $num_fields = $this->db->getFieldsNum($result); + + if ($num_rows > 0) { + $field_type = array(); + $i = 0; + while ($i < $num_fields) { + $meta = mysql_fetch_field($result, $i); + array_push($field_type, $meta->type); + $i++; + } + + $sql_text .= "INSERT INTO `" . $table . "` values\n"; + $index = 0; + while ($row = $this->db->fetchRow($result)) { + $count++; + $sql_text .= "("; + for ($i = 0; $i < $num_fields; $i++) { + if (is_null($row[$i])) { + $sql_text .= "null"; + } else { + switch ($field_type[$i]) { + case 'int': + $sql_text .= $row[$i]; + break; + default: + $sql_text .= "'" . mysql_real_escape_string($row[$i]) . "'"; + } + } + if ($i < $num_fields - 1) { + $sql_text .= ","; + } + } + $sql_text .= ")"; + + if ($index < $num_rows - 1) { + $sql_text .= ","; + } else { + $sql_text .= ";"; + } + $sql_text .= "\n"; + $index++; + } + } + } + $this->db->freeRecordSet($result); + $ret['sql_text'] = $sql_text . "\n\n"; + $ret['records'] = $count; + return $ret; + } + + /** + * Dump Write + * + * @param string + * @return array 'ret[file_name] = file name, ret[write] = write + */ + function dump_write($sql_text) + { + $file_name = "dump_" . date("Y.m.d") . "_" . date("H.i.s") . ".sql"; + $path_file = "../dump/" . $file_name; + if (file_put_contents($path_file, $sql_text)) { + $write = true; + } else { + $write = false; + } + $ret['file_name'] = $file_name; + $ret['write'] = $write; + return $ret; + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,3 @@ +Version 0.1 +------------------- +Create maintenance plugin \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/credits.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/credits.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/credits.txt 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,3 @@ +Credits +------------------- + Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/index.html 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/install.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/install.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/install.txt 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,6 @@ +INSTALL/UNISTALL +------------------- + +No special measures necessary, follow the standard installation process extract the module folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual (http://goo.gl/adT2i) \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/lang_diff.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/lang_diff.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/lang_diff.txt 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,7 @@ +LANGUAGE DIFFERENCES +------------------- + +Below are language differences from a version to next version. + +Release xxx +------------------- Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/licence.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/licence.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/licence.txt 2012-05-12 17:26:48 UTC (rev 9490) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these... [truncated message content] |
From: <ma...@us...> - 2012-05-15 19:21:19
|
Revision: 9516 http://xoops.svn.sourceforge.net/xoops/?rev=9516&view=rev Author: mageg Date: 2012-05-15 19:21:13 +0000 (Tue, 15 May 2012) Log Message: ----------- update forms Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-15 19:04:39 UTC (rev 9515) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-15 19:21:13 UTC (rev 9516) @@ -54,7 +54,7 @@ * create HTML to output the form as a theme-enabled table with validation. * @param bool $template */ - public function render($template = false) + public function render($template = true) { $xoops = Xoops::getInstance(); $xoops->theme->addStylesheet('media/xoops/css/form.css'); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/index.html 2012-05-15 19:21:13 UTC (rev 9516) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-05-15 19:04:39 UTC (rev 9515) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-05-15 19:21:13 UTC (rev 9516) @@ -1,7 +1,9 @@ <{if $type == 'horizontal'}> <form class="form-horizontal" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> <fieldset> + <{if $title != ''}> <legend><{$title}></legend> + <{/if}> <{foreach item=input from=$xo_input}> <{if $input.datalist != ''}> <{$input.datalist}> @@ -24,7 +26,9 @@ <{if $type == 'vertical'}> <form class="form-vertical" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> <fieldset> + <{if $title != ''}> <legend><{$title}></legend> + <{/if}> <{foreach item=input from=$input}> <{if $input.datalist != ''}> <{$input.datalist}> @@ -44,7 +48,9 @@ <{if $type == 'inline'}> <form class="well form-inline" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> <fieldset> + <{if $title != ''}> <legend><{$title}></legend> + <{/if}> <{foreach item=input from=$input}> <{if $input.datalist != ''}> <{$input.datalist}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2012-05-17 12:59:29
|
Revision: 9539 http://xoops.svn.sourceforge.net/xoops/?rev=9539&view=rev Author: forxoops Date: 2012-05-17 12:59:18 +0000 (Thu, 17 May 2012) Log Message: ----------- Add forms style in main style Change login template with bootstrap Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_login.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/img/required.png Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css 2012-05-17 11:53:10 UTC (rev 9538) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css 2012-05-17 12:59:18 UTC (rev 9539) @@ -4,6 +4,28 @@ */ @import url(bootstrap.min.css); +/* Forms style */ +input:required, textarea:required{ + background:url(../img/required.png) right center no-repeat; +} +input:focus:invalid, textarea:focus:invalid{ + background-image:none; +} + +.dsc_pattern_vertical{display:none;} + +input:focus:invalid + span + .dsc_pattern_vertical{ + display:block; + color: #b94a48; +} +.dsc_pattern_horizontal{display:none;} +input:focus:invalid + .dsc_pattern_horizontal{ + display:inline; + color: #b94a48; +} +.caption-required{color: #b94a48;} + + .clear { clear: both; } Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/img/required.png (from rev 9532, XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/required.png) =================================================================== (Binary files differ) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_login.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_login.html 2012-05-17 11:53:10 UTC (rev 9538) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_login.html 2012-05-17 12:59:18 UTC (rev 9539) @@ -22,7 +22,7 @@ </div> <{if isset($block.lang_rememberme)}> <label class="checkbox"> - <input type="checkbox" name="rememberme" value="On" class="formButton"/><{$block.lang_rememberme}> + <input type="checkbox" name="rememberme" value="On" class="formButton" checked><{$block.lang_rememberme}> </label> <{/if}> <br/> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html 2012-05-17 11:53:10 UTC (rev 9538) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userform.html 2012-05-17 12:59:18 UTC (rev 9539) @@ -1,27 +1,52 @@ -<fieldset class="pad10"> - <legend class="bold"><{$lang_login}></legend> - <form action="user.php" method="post"> - <{$lang_username}> <input type="text" name="uname" size="26" maxlength="25" value="<{$usercookie}>" /><br /><br /> - <{$lang_password}> <input type="password" name="pass" size="21" maxlength="32" /><br /><br /> - <{if isset($lang_rememberme)}> - <input type="checkbox" name="rememberme" value="On" checked /> <{$lang_rememberme}><br /><br /> - <{/if}> - - <input type="hidden" name="op" value="login" /> - <input type="hidden" name="xoops_redirect" value="<{$redirect_page}>" /> - <input type="submit" value="<{$lang_login}>" /> - </form> - <br /> - <a name="lost"></a> - <div><{$lang_notregister}><br /></div> -</fieldset> - -<br /> - -<fieldset class="pad10"> - <legend class="bold"><{$lang_lostpassword}></legend> - <div><br /><{$lang_noproblem}></div> - <form action="lostpass.php" method="post"> - <{$lang_youremail}> <input type="text" name="email" size="26" maxlength="60" /> <input type="hidden" name="op" value="mailpasswd" /><input type="hidden" name="t" value="<{$mailpasswd_token}>" /><input type="submit" value="<{$lang_sendpassword}>" /> - </form> +<form class="form-horizontal" action="user.php" method="post"> + <fieldset> + <legend class="bold"><{$lang_login}></legend> + <div class="control-group"> + <label for="xo-sys-uname" class="control-label"><{$lang_username}><span class="caption-required">*</span></label> + <div class="controls"> + <input type="text" name="uname" id="xo-sys-uname" class="span2" value="<{$usercookie}>" required=""> + </div> + </div> + <div class="control-group"> + <label for="xo-sys-pass" class="control-label"><{$lang_password}><span class="caption-required">*</span></label> + <div class="controls"> + <input type="password" name="pass" id="xo-sys-pass" class="span2" required=""> + </div> + </div> + <{if isset($lang_rememberme)}> + <div class="control-group"> + <div class="controls"> + <label class="checkbox"> + <input type="checkbox" name="rememberme" value="On" checked> + <{$lang_rememberme}> + </label> + </div> + </div> + <{/if}> + <input type="hidden" name="op" value="login"> + <input type="hidden" name="xoops_redirect" value="<{$redirect_page}>"> + <div class="form-actions"> + <button class="btn btn-primary" type="submit"><{$lang_login}></button> + </div> + </fieldset> +</form> +<p><{$lang_notregister}></p> +<fieldset name="lost"> + <legend class="bold"><{$lang_lostpassword}></legend> + <form class="form-horizontal" action="lostpass.php" method="post"> + <p><{$lang_noproblem}></p> + <div class="control-group"> + <label for="xo-sys-uname" class="control-label"><{$lang_youremail}><span class="caption-required">*</span></label> + <div class="controls"> + <div class="input-prepend"> + <span class="add-on">@</span><input type="text" name="email" id="xo-sys-email" class="span3" value="<{$usercookie}>" required=""> + </div> + </div> + </div> + <input type="hidden" name="op" value="mailpasswd"> + <input type="hidden" name="t" value="<{$mailpasswd_token}>"> + <div class="form-actions"> + <button class="btn btn-primary" type="submit"><{$lang_sendpassword}></button> + </div> + </form> </fieldset> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-05-20 19:28:13
|
Revision: 9567 http://xoops.svn.sourceforge.net/xoops/?rev=9567&view=rev Author: mageg Date: 2012-05-20 19:28:06 +0000 (Sun, 20 May 2012) Log Message: ----------- Update insertBreak in themform.php and modification in the system module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-20 18:45:14 UTC (rev 9566) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-05-20 19:28:06 UTC (rev 9567) @@ -37,14 +37,14 @@ */ public function insertBreak($extra = '', $class = '') { - $class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : ''; + $class = ($class != '' ? " class='" . $class . "'" : ''); // Fix for $extra tag not showing if ($extra) { - $value = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>'; + $value = '<div' . $class . '>' . $extra . '</div>'; $ele = new XoopsFormRaw($value); $this->addElement($ele); } else { - $value = '<tr><td colspan="2" ' . $class . '> </td></tr>'; + $value = '<div' . $class . '> </div>'; $ele = new XoopsFormRaw($value); $this->addElement($ele); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2012-05-20 18:45:14 UTC (rev 9566) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2012-05-20 19:28:06 UTC (rev 9567) @@ -120,7 +120,7 @@ $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; $dirlist = XoopsLists::getDirListAsArray($admin_dir); - $inactive_section = array('blocksadmin', 'groups', 'modulesadmin', 'preferences', 'tplsets'); + $inactive_section = array('blocksadmin', 'groups', 'modulesadmin', 'preferences', 'tplsets', 'plugins'); foreach ($dirlist as $directory) { if (file_exists($file = $admin_dir . '/' . $directory . '/xoops_version.php')) { require $file; @@ -150,19 +150,8 @@ $menu['used'] = true; } switch ($directory) { - case 'avatars': - $avatar_handler = $xoops->getHandlerAvatar(); - $avatar = $avatar_handler->getCount(); - $menu['infos'] = sprintf(_AM_SYSTEM_AVATAR_INFO, $avatar); - break; - case 'banners': - $banner_handler = $xoops->getHandlerBanner(); - $banner = $banner_handler->getCount(); - $menu['infos'] = sprintf(_AM_SYSTEM_BANNER_INFO, $banner); - break; case 'comments': $comment_handler = $xoops->getHandlerComment(); - ; $comment = $comment_handler->getCount(); $menu['infos'] = sprintf(_AM_SYSTEM_COMMENT_INFO, $comment); break; @@ -176,16 +165,6 @@ $img = $imgcat_handler->getCount(); $menu['infos'] = sprintf(_AM_SYSTEM_IMG_INFO, $img); break; - case 'smilies': - $smilies_Handler = $xoops->getHandlerSmilies(); - $smilies = $smilies_Handler->getCount(); - $menu['infos'] = sprintf(_AM_SYSTEM_SMILIES_INFO, $smilies); - break; - case 'userrank': - $userrank_Handler = $xoops->getHandlerRanks(); - $userrank = $userrank_Handler->getCount(); - $menu['infos'] = sprintf(_AM_SYSTEM_RANKS_INFO, $userrank); - break; case 'users': $member_handler = $xoops->getHandlerUser(); $member = $member_handler->getCount(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php 2012-05-20 18:45:14 UTC (rev 9566) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preference.php 2012-05-20 19:28:06 UTC (rev 9567) @@ -343,7 +343,7 @@ case 'line_break': $myts = MyTextSanitizer::getInstance(); - $this->insertBreak('<center>' . $title . '</center>', $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); + $this->insertBreak($title, $myts->htmlspecialchars($obj[$i]->getConfValueForOutput())); break; case 'textbox': Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php 2012-05-20 18:45:14 UTC (rev 9566) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php 2012-05-20 19:28:06 UTC (rev 9567) @@ -51,32 +51,23 @@ define("_MI_SYSTEM_PREFERENCE_BREADCRUMB","Breadcrumb"); define("_MI_SYSTEM_PREFERENCE_BREAK_ACTIVE","Active Section"); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_AVATARS","Active Avatars"); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_BANNERS","Active Banners"); + define("_MI_SYSTEM_PREFERENCE_ACTIVE_BLOCKSADMIN",""); define("_MI_SYSTEM_PREFERENCE_ACTIVE_COMMENTS","Active Comments"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_FILEMANAGER","Active File Manager"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_GROUPS",""); define("_MI_SYSTEM_PREFERENCE_ACTIVE_IMAGES","Active Images Manager"); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_MAILUSERS","Active Mail Users"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_MODULESADMIN",""); define("_MI_SYSTEM_PREFERENCE_ACTIVE_PREFERENCES",""); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_SMILIES","Active Smilies"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_TPLSETS",""); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_USERRANK","Active User Ranks"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_USERS","Active Users"); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_MAINTENANCE","Active Maintenance"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_PLUGINS","Plugins"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_THEMES","Themes"); define("_MI_SYSTEM_PREFERENCE_BREAK_PAGER","Number of rows to display in the administration"); -define("_MI_SYSTEM_PREFERENCE_AVATARS_PAGER","Number of avatars to display per page"); -define("_MI_SYSTEM_PREFERENCE_BANNERS_PAGER","Number of banners to display per page"); define("_MI_SYSTEM_PREFERENCE_COMMENTS_PAGER","Number of comments to display per page"); define("_MI_SYSTEM_PREFERENCE_GROUPS_PAGER","Number of groups to display per page"); define("_MI_SYSTEM_PREFERENCE_IMAGES_PAGER","Number of images to display per page"); -define("_MI_SYSTEM_PREFERENCE_SMILIES_PAGER","Number of smilies to display per page"); -define("_MI_SYSTEM_PREFERENCE_USERRANKS_PAGER","Number of ranks to display per page"); define("_MI_SYSTEM_PREFERENCE_USERS_PAGER","Number of users to display per page"); define("_MI_SYSTEM_PREFERENCE_BREAK_EDITOR","Editor Settings"); @@ -89,5 +80,4 @@ define("_MI_SYSTEM_PREFERENCE_ANONPOST",""); define("_MI_SYSTEM_PREFERENCE_REDIRECT",""); -define("_MI_SYSTEM_PREFERENCE_JQUERY_THEME", "jQuery theme"); -?> \ No newline at end of file +define("_MI_SYSTEM_PREFERENCE_JQUERY_THEME", "jQuery theme"); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-05-20 18:45:14 UTC (rev 9566) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-05-20 19:28:06 UTC (rev 9567) @@ -197,7 +197,7 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; +$modversion['config'][$i]['default'] = 'textcenter'; $i++; $modversion['config'][$i]['name'] = 'usetips'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_TIPS'; @@ -241,22 +241,8 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; +$modversion['config'][$i]['default'] = 'txtcenter'; $i++; -$modversion['config'][$i]['name'] = 'active_avatars'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_AVATARS'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; -$i++; -$modversion['config'][$i]['name'] = 'active_banners'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_BANNERS'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; -$i++; $modversion['config'][$i]['name'] = 'active_blocksadmin'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_BLOCKSADMIN'; $modversion['config'][$i]['description'] = ''; @@ -292,20 +278,6 @@ $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = '1'; $i++; -$modversion['config'][$i]['name'] = 'active_mailusers'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_MAILUSERS'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; -$i++; -$modversion['config'][$i]['name'] = 'active_maintenance'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_MAINTENANCE'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; -$i++; $modversion['config'][$i]['name'] = 'active_modulesadmin'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_MODULESADMIN'; $modversion['config'][$i]['description'] = ''; @@ -320,13 +292,6 @@ $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 1; $i++; -$modversion['config'][$i]['name'] = 'active_smilies'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_SMILIES'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; -$i++; $modversion['config'][$i]['name'] = 'active_tplsets'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_TPLSETS'; $modversion['config'][$i]['description'] = ''; @@ -334,13 +299,6 @@ $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 1; $i++; -$modversion['config'][$i]['name'] = 'active_userrank'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_USERRANK'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; -$i++; $modversion['config'][$i]['name'] = 'active_users'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_USERS'; $modversion['config'][$i]['description'] = ''; @@ -351,9 +309,9 @@ $modversion['config'][$i]['name'] = 'active_plugins'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_PLUGINS'; $modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'yesno'; +$modversion['config'][$i]['formtype'] = 'hidden'; $modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = '1'; +$modversion['config'][$i]['default'] = 1; $i++; $modversion['config'][$i]['name'] = 'active_themes'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_THEMES'; @@ -367,22 +325,8 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; +$modversion['config'][$i]['default'] = 'txtcenter'; $i++; -$modversion['config'][$i]['name'] = 'avatars_pager'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_AVATARS_PAGER'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'textbox'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 10; -$i++; -$modversion['config'][$i]['name'] = 'banners_pager'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_BANNERS_PAGER'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'textbox'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 10; -$i++; $modversion['config'][$i]['name'] = 'comments_pager'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_COMMENTS_PAGER'; $modversion['config'][$i]['description'] = ''; @@ -404,20 +348,6 @@ $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 15; $i++; -$modversion['config'][$i]['name'] = 'smilies_pager'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_SMILIES_PAGER'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'textbox'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 20; -$i++; -$modversion['config'][$i]['name'] = 'userranks_pager'; -$modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_USERRANKS_PAGER'; -$modversion['config'][$i]['description'] = ''; -$modversion['config'][$i]['formtype'] = 'textbox'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 20; -$i++; $modversion['config'][$i]['name'] = 'users_pager'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_USERS_PAGER'; $modversion['config'][$i]['description'] = ''; @@ -430,7 +360,7 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'head'; +$modversion['config'][$i]['default'] = 'txtcenter'; $i++; $editors = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); $modversion['config'][$i]['name'] = 'blocks_editor'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-06-19 21:05:14
|
Revision: 9676 http://xoops.svn.sourceforge.net/xoops/?rev=9676&view=rev Author: mageg Date: 2012-06-19 21:05:06 +0000 (Tue, 19 Jun 2012) Log Message: ----------- Moving sql tables in the module banner Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/mysql.sql Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -72,10 +72,6 @@ $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",15,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",16,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",17,1,'system_admin')"); - // data for table 'banner' - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); // default theme $time = time(); $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', " . $time . ")"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-06-19 21:05:06 UTC (rev 9676) @@ -10,12 +10,6 @@ # -# Dumping data for table `bannerclient` -# - -INSERT INTO bannerclient VALUES (1,0, 'XOOPS', 'XOOPS Dev Team'); - -# # Dumping data for table `comments` # Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-06-19 21:05:06 UTC (rev 9676) @@ -28,43 +28,6 @@ # -------------------------------------------------------- # -# Table structure for table `banner` -# - -CREATE TABLE banner ( - bid smallint(5) unsigned NOT NULL auto_increment, - cid tinyint(3) unsigned NOT NULL default '0', - imptotal int(10) unsigned NOT NULL default '0', - impmade mediumint(8) unsigned NOT NULL default '0', - clicks mediumint(8) unsigned NOT NULL default '0', - imageurl varchar(255) NOT NULL default '', - clickurl varchar(255) NOT NULL default '', - datestart int(10) NOT NULL default '0', - dateend int(10) NOT NULL default '0', - htmlbanner tinyint(1) NOT NULL default '0', - htmlcode text, - status tinyint(1) NOT NULL default '0', - PRIMARY KEY (bid), - KEY idxbannercid (cid), - KEY idxbannerbidcid (bid,cid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `bannerclient` -# - -CREATE TABLE bannerclient ( - cid smallint(5) unsigned NOT NULL auto_increment, - uid mediumint(8) unsigned NOT NULL default '0', - name varchar(60) NOT NULL default '', - extrainfo text, - PRIMARY KEY (cid), - KEY name (name) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# # Table structure for table `block_module_link` # Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -1,57 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * XOOPS Kernel Class - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel - * @since 2.6.0 - * @author Gregory Mage (AKA Mage) - * @author trabis <lus...@gm...> - * @version $Id$ - */ - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -class XoopsBanner extends XoopsObject -{ - /** - * Constructor - */ - public function __construct() - { - $this->initVar('bid', XOBJ_DTYPE_INT, null, false, 5); - $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 3); - $this->initVar('imptotal', XOBJ_DTYPE_INT, null, false, 8); - $this->initVar('impmade', XOBJ_DTYPE_INT, null, false, 8); - $this->initVar('clicks', XOBJ_DTYPE_INT, null, false, 8); - $this->initVar('imageurl', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('clickurl', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('datestart', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('dateend', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('htmlbanner', XOBJ_DTYPE_INT, null, false, 1); - $this->initVar('htmlcode', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('status', XOBJ_DTYPE_INT, null, false, 1); - } -} - -class XoopsBannerHandler extends XoopsPersistableObjectHandler -{ - /** - * @param null|XoopsDatabase $db - */ - public function __construct(XoopsDatabase $db = null) - { - parent::__construct($db, 'banner', 'XoopsBanner', 'bid', 'imageurl'); - } -} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -1,49 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * XOOPS Kernel Class - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel - * @since 2.6.0 - * @author Gregory Mage (AKA Mage) - * @author trabis <lus...@gm...> - * @version $Id$ - */ - -defined('XOOPS_ROOT_PATH') or die('XOOPS root path not defined'); - -class XoopsBannerclient extends XoopsObject -{ - /** - * Constructor - */ - public function __construct() - { - $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 5); - $this->initVar('uid', XOBJ_DTYPE_INT, 0, true); - $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('extrainfo', XOBJ_DTYPE_TXTAREA, null, false); - } -} - -class XoopsBannerclientHandler extends XoopsPersistableObjectHandler -{ - /** - * @param null|XoopsDatabase $db - */ - public function __construct(XoopsDatabase $db = null) - { - parent::__construct($db, 'bannerclient', 'XoopsBannerclient', 'cid', 'name'); - } -} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -33,8 +33,8 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); // Get banners handler -$banner_Handler = $xoops->getHandlerBanner(); -$client_Handler = $xoops->getHandlerBannerclient(); +$banner_Handler = $xoops->getModuleHandler('banner'); +$client_Handler = $xoops->getModuleHandler('bannerclient'); // Call header $xoops->header('banners_admin_banners.html'); @@ -197,24 +197,26 @@ case 'new': $admin_page->addTips(sprintf(_AM_BANNERS_TIPS_BANNERS_FORM1, implode(', ', $mimetypes)) . sprintf(_AM_BANNERS_TIPS_BANNERS_FORM2, $upload_size / 1000)); - $admin_page->addItemButton(_AM_BANNERS_BANNERS_LIST, 'banners.php', 'list'); + $admin_page->addItemButton(_AM_BANNERS_BANNERS_LIST, 'banners.php', 'application-view-detail'); $admin_page->renderTips(); $admin_page->renderButton(); $obj = $banner_Handler->create(); $form = $xoops->getModuleForm($obj, 'banner'); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); break; case 'edit': $admin_page->addTips(sprintf(_AM_BANNERS_TIPS_BANNERS_FORM1, implode(', ', $mimetypes)) . sprintf(_AM_BANNERS_TIPS_BANNERS_FORM2, $upload_size / 1000)); - $admin_page->addItemButton(_AM_BANNERS_BANNERS_LIST, 'banners.php', 'list'); + $admin_page->addItemButton(_AM_BANNERS_BANNERS_LIST, 'banners.php', 'application-view-detail'); $admin_page->renderTips(); $admin_page->renderButton(); $bid = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($bid > 0) { $obj = $banner_Handler->get($bid); $form = $xoops->getModuleForm($obj, 'banner'); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); } else { $xoops->redirect('banners.php', 1, _AM_SYSTEM_DBERROR); } @@ -264,12 +266,13 @@ } $xoops->error($obj->getHtmlErrors()); $form = $xoops->getModuleForm($obj, 'banner'); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); break; case 'delete': $admin_page->addItemButton(_AM_BANNERS_BANNERS_ADD, 'banners.php?op=new', 'add'); - $admin_page->addItemButton(_AM_BANNERS_BANNERS_LIST, 'banners.php', 'list'); + $admin_page->addItemButton(_AM_BANNERS_BANNERS_LIST, 'banners.php', 'application-view-detail'); $admin_page->renderButton(); $bid = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($bid > 0) { @@ -291,6 +294,8 @@ $xoops->error($obj->getHtmlErrors()); } } else { + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); $img = ''; $imageurl = $obj->getVar("imageurl"); if ($obj->getVar("htmlbanner")) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/clients.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -32,8 +32,8 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); // Get banners handler -$banner_Handler = $xoops->getHandlerBanner(); -$client_Handler = $xoops->getHandlerBannerclient(); +$banner_Handler = $xoops->getModuleHandler('banner'); +$client_Handler = $xoops->getModuleHandler('bannerclient'); // Get member handler $member_handler = $xoops->getHandlerMember(); // Call header @@ -109,24 +109,26 @@ case 'new': $admin_page->addTips(_AM_BANNERS_TIPS_CLIENTS_ADDEDIT); - $admin_page->addItemButton(_AM_BANNERS_CLIENTS_LIST, 'clients.php', 'list'); + $admin_page->addItemButton(_AM_BANNERS_CLIENTS_LIST, 'clients.php', 'application-view-detail'); $admin_page->renderTips(); $admin_page->renderButton(); $obj = $client_Handler->create(); $form = $xoops->getModuleForm($obj, 'bannerclient'); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); break; case 'edit': $admin_page->addTips(_AM_BANNERS_TIPS_CLIENTS_ADDEDIT); - $admin_page->addItemButton(_AM_BANNERS_CLIENTS_LIST, 'clients.php', 'list'); + $admin_page->addItemButton(_AM_BANNERS_CLIENTS_LIST, 'clients.php', 'application-view-detail'); $admin_page->renderTips(); $admin_page->renderButton(); $cid = $system->cleanVars($_REQUEST, 'cid', 0, 'int'); if ($cid > 0) { $obj = $client_Handler->get($cid); $form = $xoops->getModuleForm($obj, 'bannerclient'); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); } else { $xoops->redirect('clients.php', 1, _AM_SYSTEM_DBERROR); } @@ -154,12 +156,13 @@ } $xoops->error($obj->getHtmlErrors()); $form = $xoops->getModuleForm($obj, 'bannerclient'); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); break; case 'delete': $admin_page->addItemButton(_AM_BANNERS_CLIENTS_ADD, 'clients.php?op=new', 'add'); - $admin_page->addItemButton(_AM_BANNERS_CLIENTS_LIST, 'clients.php', 'list'); + $admin_page->addItemButton(_AM_BANNERS_CLIENTS_LIST, 'clients.php', 'application-view-detail'); $admin_page->renderButton(); $cid = $system->cleanVars($_REQUEST, 'cid', 0, 'int'); if ($cid > 0) { @@ -190,7 +193,9 @@ $xoops->error($obj->getHtmlErrors()); } } else { - $xoops->confirm(array("ok" => 1, "cid" => $cid, "op" => "delete"), 'clients.php', sprintf(_AM_BANNERS_CLIENTS_SUREDEL, $obj->getVar("name"))); + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + $xoops->confirm(array("ok" => 1, "cid" => $cid, "op" => "delete"), 'clients.php', sprintf(_AM_BANNERS_CLIENTS_SUREDEL, $obj->getVar("name")) . '<br />'); } } else { $xoops->redirect('clients.php', 1, _AM_SYSTEM_DBERROR); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/index.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -21,21 +21,21 @@ */ include dirname(__FILE__) . '/header.php'; // Get banners handler -$banners_Handler = $xoops->getHandlerBanner(); -$banners_client_Handler = $xoops->getHandlerBannerclient(); +$banner_Handler = $xoops->getModuleHandler('banner'); +$client_Handler = $xoops->getModuleHandler('bannerclient'); // heaser $xoops->header(); // banners $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0, '!=')); -$banners_banner = $banners_Handler->getCount($criteria); +$banners_banner = $banner_Handler->getCount($criteria); // banner clients $criteria = new CriteriaCompo(); -$banners_client = $banners_client_Handler->getCount($criteria); +$banners_client = $client_Handler->getCount($criteria); // banner finish $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0)); -$banners_finish = $banners_Handler->getCount($criteria); +$banners_finish = $banner_Handler->getCount($criteria); // folder path $folder_path = XOOPS_ROOT_PATH . '/uploads/banners'; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/banner.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/banner.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/banner.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -0,0 +1,56 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * banners module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package banners + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class BannersBanner extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('bid', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 3); + $this->initVar('imptotal', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('impmade', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('clicks', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('imageurl', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('clickurl', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('datestart', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('dateend', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('htmlbanner', XOBJ_DTYPE_INT, null, false, 1); + $this->initVar('htmlcode', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('status', XOBJ_DTYPE_INT, null, false, 1); + } +} + +class BannersBannerHandler extends XoopsPersistableObjectHandler +{ + /** + * @param null|XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'banner', 'bannersbanner', 'bid', 'imageurl'); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/banner.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/bannerclient.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/bannerclient.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/bannerclient.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -0,0 +1,48 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * banners module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package banners + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('XOOPS root path not defined'); + +class BannersBannerclient extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('uid', XOBJ_DTYPE_INT, 0, true); + $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('extrainfo', XOBJ_DTYPE_TXTAREA, null, false); + } +} + +class BannersBannerclientHandler extends XoopsPersistableObjectHandler +{ + /** + * @param null|XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'bannerclient', 'bannersbannerclient', 'cid', 'name'); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/bannerclient.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -27,7 +27,7 @@ /** * @param XoopsBanner|XoopsObject $obj */ - public function __construct(XoopsBanner &$obj) + public function __construct(BannersBanner &$obj) { $xoops = Xoops::getInstance(); @@ -53,7 +53,7 @@ parent::__construct($title, 'form', 'banners.php', 'post', true); $this->setExtra('enctype="multipart/form-data"'); - $client_Handler = $xoops->getHandlerBannerclient(); + $client_Handler = $xoops->getModuleHandler('bannerclient'); $client_select = new XoopsFormSelect( _AM_BANNERS_CLIENTS_NAME, 'cid', $obj->getVar('cid') ); $client_select->addOptionArray($client_Handler->getList()); $this->addElement($client_select, true); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/bannerclient.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/bannerclient.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/bannerclient.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -27,7 +27,7 @@ /** * @param XoopsBannerClient|XoopsObject $obj */ - public function __construct(XoopsBannerClient &$obj) + public function __construct(BannersBannerClient &$obj) { $title = $obj->isNew() ? sprintf( _AM_BANNERS_CLIENTS_ADD ) : sprintf( _AM_BANNERS_CLIENTS_EDIT ); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -91,6 +91,13 @@ $banner_Handler->insert($obj); } } + // data for table 'banner' + /*$sql = "DELETE FROM " . $xoops->db->prefix("config") . " WHERE `conf_name` = 'banners'";*/ + $dbm = new XoopsDatabaseManager(); + //$xoops->db->queryF($sql); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); return true; } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -27,8 +27,8 @@ // Get main instance $system = System::getInstance(); // Get banners handler -$banner_Handler = $xoops->getHandlerBanner(); -$client_Handler = $xoops->getHandlerBannerclient(); +$banner_Handler = $xoops->getModuleHandler('banner'); +$client_Handler = $xoops->getModuleHandler('bannerclient'); // Get member handler $member_handler = $xoops->getHandlerMember(); // Parameters Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/index.html 2012-06-19 21:05:06 UTC (rev 9676) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/mysql.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/mysql.sql (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/sql/mysql.sql 2012-06-19 21:05:06 UTC (rev 9676) @@ -0,0 +1,42 @@ +# +# Table structure for table `banner` +# + +CREATE TABLE banner ( + bid smallint(5) unsigned NOT NULL auto_increment, + cid tinyint(3) unsigned NOT NULL default '0', + imptotal int(10) unsigned NOT NULL default '0', + impmade mediumint(8) unsigned NOT NULL default '0', + clicks mediumint(8) unsigned NOT NULL default '0', + imageurl varchar(255) NOT NULL default '', + clickurl varchar(255) NOT NULL default '', + datestart int(10) NOT NULL default '0', + dateend int(10) NOT NULL default '0', + htmlbanner tinyint(1) NOT NULL default '0', + htmlcode text, + status tinyint(1) NOT NULL default '0', + PRIMARY KEY (bid), + KEY idxbannercid (cid), + KEY idxbannerbidcid (bid,cid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `bannerclient` +# + +CREATE TABLE bannerclient ( + cid smallint(5) unsigned NOT NULL auto_increment, + uid mediumint(8) unsigned NOT NULL default '0', + name varchar(60) NOT NULL default '', + extrainfo text, + PRIMARY KEY (cid), + KEY name (name) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Dumping data for table `bannerclient` +# + +INSERT INTO bannerclient VALUES (1,0, 'XOOPS', 'XOOPS Dev Team'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-06-19 21:05:06 UTC (rev 9676) @@ -101,5 +101,5 @@ <{/if}> <!-- Display form (add,edit) --> <{if $form}> -<div class="spacer"><{$form}></div> +<{includeq file="module:system|system_form.html"}> <{/if}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html 2012-06-19 21:05:06 UTC (rev 9676) @@ -76,5 +76,5 @@ <{/if}> <!-- Display form (add,edit) --> <{if $form}> -<div class="spacer"><{$form}></div> +<{includeq file="module:system|system_form.html"}> <{/if}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -32,6 +32,7 @@ $modversion['help'] = 'page=help'; $modversion['image'] = 'images/logo.png'; $modversion['dirname'] = 'banners'; + //about $modversion['release_date'] = '2011/01/02'; $modversion['module_website_url'] = 'http://www.xoops.org/'; @@ -62,10 +63,13 @@ // Templates $modversion['templates'][] = array( 'file' => 'banners_client.html', 'description' => '' ); -// Admin Templates -$modversion['templates'][] = array('file' => 'banners_admin_banners.html', 'description' => '', 'type' => 'admin'); -$modversion['templates'][] = array('file' => 'banners_admin_clients.html', 'description' => '', 'type' => 'admin'); +// Mysql file +$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; +// Tables created by sql file (without prefix!) +$modversion['tables'][1] = "banner"; +$modversion['tables'][2] = "bannerclient"; + // blocks $i = 0; $modversion['blocks'][$i]['file'] = 'banners_blocks.php'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-06-19 20:38:24 UTC (rev 9675) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-06-19 21:05:06 UTC (rev 9676) @@ -33,9 +33,9 @@ protected $_reservedTables = array( 'avatar', 'avatar_users_link', 'block_module_link', 'xoopscomments', 'config', 'configcategory', 'configoption', 'image', 'imagebody', 'imagecategory', 'imgset', 'imgset_tplset_link', 'imgsetimg', 'groups', - 'groups_users_link', 'group_permission', 'online', 'bannerclient', 'banner', 'bannerfinish', 'priv_msgs', + 'groups_users_link', 'group_permission', 'online', 'priv_msgs', 'ranks', 'session', 'smiles', 'users', 'newblocks', 'modules', 'tplfile', 'tplset', 'tplsource', - 'xoopsnotifications', 'banner', 'bannerclient', 'bannerfinish' + 'xoopsnotifications', ); public function __construct() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-06-24 16:14:40
|
Revision: 9702 http://xoops.svn.sourceforge.net/xoops/?rev=9702&view=rev Author: mageg Date: 2012-06-24 16:14:34 +0000 (Sun, 24 Jun 2012) Log Message: ----------- Adding preloads for banner management Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/renderbanner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-06-24 15:44:53 UTC (rev 9701) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-06-24 16:14:34 UTC (rev 9702) @@ -581,26 +581,6 @@ /** * @param mixed $optional * - * @return XoopsBannerHandler - */ - public function getHandlerBanner($optional = false) - { - return $this->getHandler('banner', $optional); - } - - /** - * @param mixed $optional - * - * @return XoopsBannerclientHandler - */ - public function getHandlerBannerclient($optional = false) - { - return $this->getHandler('bannerclient', $optional); - } - - /** - * @param mixed $optional - * * @return XoopsBlockHandler */ public function getHandlerBlock($optional = false) @@ -1298,80 +1278,13 @@ /** * Function to get banner html tags for use in templates * - * @param int $nb_banner - * @param string $align - * @param array $client - * @param string $ids - * * @return string */ - public function getBanner($nb_banner = 1, $align = 'H', $client = array(), $ids = '') + public function getBanner() { - if ($this->isActiveModule('banners')) { - // Get banners handler - $banner_Handler = $this->getHandlerBanner(); - // Display banner - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('status', 0, '!=')); - $criteria->setSort('RAND()'); - if (!empty($client)) { - if (!in_array(0,$client)) { - $criteria->add(new Criteria('cid', '(' . implode(',', $client) . ')','IN')); - } - } - if ($ids == '') { - $criteria->setLimit($nb_banner); - $criteria->setStart(0); - } else { - $criteria->add(new Criteria('bid', '(' . $ids . ')','IN')); - } - $banner_arr = $banner_Handler->getall($criteria); - $numrows = count($banner_arr); - $bannerobject = ''; - if ($numrows > 0) { - foreach (array_keys($banner_arr) as $i) { - $imptotal = $banner_arr[$i]->getVar("imptotal"); - $impmade = $banner_arr[$i]->getVar("impmade"); - $htmlbanner = $banner_arr[$i]->getVar("htmlbanner"); - $htmlcode = $banner_arr[$i]->getVar("htmlcode"); - $imageurl = $banner_arr[$i]->getVar("imageurl"); - $bid = $banner_arr[$i]->getVar("bid"); - $clickurl = $banner_arr[$i]->getVar("clickurl"); - /** - * Print the banner - */ - if ($htmlbanner) { - $bannerobject .= $htmlcode; - } else { - if (stristr($imageurl, '.swf')) { - $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; - } else { - $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; - } - } - if ($align == 'V') { - $bannerobject .= '<br /><br />'; - } else { - $bannerobject .= ' '; - } - if ($this->getModuleConfig('banners_myip', 'banners') == $this->getEnv('REMOTE_ADDR')) { - // EMPTY - } else { - /** - * Check if this impression is the last one - */ - $impmade = $impmade + 1; - if ($imptotal > 0 && $impmade >= $imptotal) { - $this->db->queryF(sprintf('UPDATE %s SET status = %u, dateend = %u WHERE bid = %u', $this->db->prefix('banner'), 0, time(), $bid)); - }else{ - $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); - } - } - } - return $bannerobject; - } - } - return ''; + $options = ''; + $this->preload->triggerEvent('core.banner.display', array(&$options)); + return $options; } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-06-24 15:44:53 UTC (rev 9701) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/banners.php 2012-06-24 16:14:34 UTC (rev 9702) @@ -202,7 +202,7 @@ $admin_page->renderButton(); $obj = $banner_Handler->create(); $form = $xoops->getModuleForm($obj, 'banner'); - $form->render(); + $form->render(); $xoops->tpl->assign('form', true); break; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php 2012-06-24 15:44:53 UTC (rev 9701) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php 2012-06-24 16:14:34 UTC (rev 9702) @@ -22,7 +22,8 @@ function banners_blocks_show($options) { $block = array(); $xoops = Xoops::getInstance(); - //echo $options[3] . ' - ' . $options[3]; + require_once dirname(dirname(__FILE__)) . '/class/renderbanner.php'; + $render = new RenderBanner(); switch ($options[0]) { case 'random': $nb_display = $options[1]; @@ -31,13 +32,13 @@ array_shift($options); array_shift($options); $client = $options; - $block['banners'] = $xoops->getBanner($nb_display, $align, $client); + $block['banners'] = $render->displayBanner($nb_display, $align, $client); break; case 'id': $ids = $options[1]; $align = $options[2]; - $block['banners'] = $xoops->getBanner(1, $align, 0, $ids); + $block['banners'] = $render->displayBanner(1, $align, 0, $ids); break; } return $block; @@ -69,7 +70,7 @@ array_shift($options); $form .= _MB_BANNERS_CLIENTSTODISPLAY . "<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">\n"; $xoops = Xoops::getInstance(); - $client_Handler = $xoops->getHandlerBannerclient(); + $client_Handler = $xoops->getModuleHandler('bannerclient','banners'); $criteria = new CriteriaCompo(); $criteria->setSort('name'); $criteria->setOrder('ASC'); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/renderbanner.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/renderbanner.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/renderbanner.php 2012-06-24 16:14:34 UTC (rev 9702) @@ -0,0 +1,111 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * banners module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package banners + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class RenderBanner +{ + /** + * Constructor + */ + public function __construct() + { + + } + + /** + * Display banner + * @param $nb_banner + * @param $align + * @param $client + * @param $ids + * @return string + */ + public function displayBanner($nb_banner = 1, $align = 'H', $client = array(), $ids = '') + { + $xoops = Xoops::getInstance(); + if ($xoops->isActiveModule('banners')) { + // Get banners handler + $banner_Handler = $xoops->getModuleHandler('banner','banners'); + // Display banner + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('status', 0, '!=')); + $criteria->setSort('RAND()'); + if (!empty($client)) { + if (!in_array(0,$client)) { + $criteria->add(new Criteria('cid', '(' . implode(',', $client) . ')','IN')); + } + } + if ($ids == '') { + $criteria->setLimit($nb_banner); + $criteria->setStart(0); + } else { + $criteria->add(new Criteria('bid', '(' . $ids . ')','IN')); + } + $banner_arr = $banner_Handler->getall($criteria); + $numrows = count($banner_arr); + $bannerobject = ''; + if ($numrows > 0) { + foreach (array_keys($banner_arr) as $i) { + $imptotal = $banner_arr[$i]->getVar("imptotal"); + $impmade = $banner_arr[$i]->getVar("impmade"); + $htmlbanner = $banner_arr[$i]->getVar("htmlbanner"); + $htmlcode = $banner_arr[$i]->getVar("htmlcode"); + $imageurl = $banner_arr[$i]->getVar("imageurl"); + $bid = $banner_arr[$i]->getVar("bid"); + $clickurl = $banner_arr[$i]->getVar("clickurl"); + /** + * Print the banner + */ + if ($htmlbanner) { + $bannerobject .= $htmlcode; + } else { + if (stristr($imageurl, '.swf')) { + $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + } else { + $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + } + } + if ($align == 'V') { + $bannerobject .= '<br /><br />'; + } else { + $bannerobject .= ' '; + } + if ($xoops->getModuleConfig('banners_myip', 'banners') == $xoops->getEnv('REMOTE_ADDR')) { + // EMPTY + } else { + /** + * Check if this impression is the last one + */ + $impmade = $impmade + 1; + if ($imptotal > 0 && $impmade >= $imptotal) { + $xoops->db->queryF(sprintf('UPDATE %s SET status = %u, dateend = %u WHERE bid = %u', $this->db->prefix('banner'), 0, time(), $bid)); + }else{ + $xoops->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); + } + } + } + return $bannerobject; + } + } + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/renderbanner.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-06-24 15:44:53 UTC (rev 9701) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-06-24 16:14:34 UTC (rev 9702) @@ -269,7 +269,8 @@ $form->addElement(new XoopsFormHidden('op', 'save')); $form->addElement(new XoopsFormHidden('bid', $obj->getVar('bid'))); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); - $xoops->tpl->assign('form', $form->render()); + $form->render(); + $xoops->tpl->assign('form', true); $xoops->footer(); } else { $xoops->redirect(XOOPS_URL, 1, _MD_BANNERS_INDEX_DBERROR); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/core.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/core.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/core.php 2012-06-24 16:14:34 UTC (rev 9702) @@ -0,0 +1,45 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * banners module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package banners + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * Banners core preloads + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Mage Gr\xE9gory (AKA Mage) + */ +class BannersCorePreload extends XoopsPreloadItem +{ + /** + * @static + * @param array $args + * @return void + */ + static public function eventCoreBannerDisplay($args) + { + require_once dirname(dirname(__FILE__)) . '/class/renderbanner.php'; + $render = new RenderBanner(); + $args[0] = $render->displayBanner(); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/core.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/preloads/index.html 2012-06-24 16:14:34 UTC (rev 9702) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-06-24 15:44:53 UTC (rev 9701) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-06-24 16:14:34 UTC (rev 9702) @@ -4,7 +4,7 @@ <!--Banner--> <{if $banner_count == true}> <h4><{$smarty.const._AM_BANNERS_BANNERS_CURRENT}></h4> -<table id="xo-bannerslist-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-bannerslist-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter"><{$smarty.const._AM_BANNERS_BANNERS_IMPRESSIONS}></th> @@ -52,7 +52,7 @@ <!--Banner Finish--> <{if $banner_finish_count == true}> <h4><{$smarty.const._AM_BANNERS_BANNERS_FINISH}></h4> -<table id="xo-bannersfinish-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-bannersfinish-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter"><{$smarty.const._AM_BANNERS_BANNERS_IMPRESSIONS}></th> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html 2012-06-24 15:44:53 UTC (rev 9701) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html 2012-06-24 16:14:34 UTC (rev 9702) @@ -1,6 +1,6 @@ <{if $banner_count == true}> <h4><{$smarty.const._AM_BANNERS_BANNERS_CURRENT}></h4> -<table id="xo-bannerslist-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-bannerslist-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter width5"><{$smarty.const._MD_BANNERS_INDEX_ID}></th> @@ -54,7 +54,7 @@ <!--Banner Finish--> <{if $banner_finish_count == true}> <h4><{$smarty.const._AM_BANNERS_BANNERS_FINISH}></h4> -<table id="xo-bannersfinish-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-bannersfinish-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter width5"><{$smarty.const._MD_BANNERS_INDEX_ID}></th> @@ -109,5 +109,5 @@ <{/if}> <!-- Display form (edit) --> <{if $form}> -<div class="spacer"><{$form}></div> +<{includeq file="module:system|system_form.html"}> <{/if}> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-06-24 21:17:51
|
Revision: 9707 http://xoops.svn.sourceforge.net/xoops/?rev=9707&view=rev Author: mageg Date: 2012-06-24 21:17:44 +0000 (Sun, 24 Jun 2012) Log Message: ----------- modified ligne_break Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-06-24 20:24:10 UTC (rev 9706) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-06-24 21:17:44 UTC (rev 9707) @@ -37,7 +37,7 @@ */ public function insertBreak($extra = '', $class = '') { - $class = ($class != '' ? " class='" . $class . "'" : ''); + $class = ($class != '' ? " class='" . $class . "'" : " class='break'"); // Fix for $extra tag not showing if ($extra) { $value = '<div' . $class . '>' . $extra . '</div>'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css 2012-06-24 20:24:10 UTC (rev 9706) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css 2012-06-24 21:17:44 UTC (rev 9707) @@ -20,3 +20,8 @@ } .caption-required{color: #b94a48;} + +.break{ + font-size: 1.2em; + font-weight: bold; +} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-06-24 20:24:10 UTC (rev 9706) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-06-24 21:17:44 UTC (rev 9707) @@ -197,7 +197,7 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'textcenter'; +$modversion['config'][$i]['default'] = 'break'; $i++; $modversion['config'][$i]['name'] = 'usetips'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_TIPS'; @@ -241,7 +241,7 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'txtcenter'; +$modversion['config'][$i]['default'] = 'break'; $i++; $modversion['config'][$i]['name'] = 'active_blocksadmin'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_ACTIVE_BLOCKSADMIN'; @@ -325,7 +325,7 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'txtcenter'; +$modversion['config'][$i]['default'] = 'break'; $i++; $modversion['config'][$i]['name'] = 'comments_pager'; $modversion['config'][$i]['title'] = '_MI_SYSTEM_PREFERENCE_COMMENTS_PAGER'; @@ -360,7 +360,7 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'line_break'; $modversion['config'][$i]['valuetype'] = 'textbox'; -$modversion['config'][$i]['default'] = 'txtcenter'; +$modversion['config'][$i]['default'] = 'break'; $i++; $editors = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); $modversion['config'][$i]['name'] = 'blocks_editor'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-07-07 17:50:49
|
Revision: 9798 http://xoops.svn.sourceforge.net/xoops/?rev=9798&view=rev Author: beckmi Date: 2012-07-07 17:50:40 +0000 (Sat, 07 Jul 2012) Log Message: ----------- Renaming system "plugins" to "extensions" Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/dashboard.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/extension.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/extension.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/extensions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/extensions.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_extensions.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/extensions.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/extensions_small.png Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/plugin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/plugins.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_plugins.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/plugins.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/plugins_small.png Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css 2012-07-07 17:50:40 UTC (rev 9798) @@ -784,14 +784,14 @@ .ico-pill-add{background-position: -234px -1924px;} .ico-pill-delete{background-position: -234px -1950px;} .ico-pill-go{background-position: -234px -1976px;} -.ico-plugin{background-position: -260px 0;} -.ico-plugin-add{background-position: -260px -26px;} -.ico-plugin-delete{background-position: -260px -52px;} -.ico-plugin-disabled{background-position: -260px -78px;} -.ico-plugin-edit{background-position: -260px -104px;} -.ico-plugin-error{background-position: -260px -130px;} -.ico-plugin-go{background-position: -260px -156px;} -.ico-plugin-link{background-position: -260px -182px;} +.ico-extension{background-position: -260px 0;} +.ico-extension-add{background-position: -260px -26px;} +.ico-extension-delete{background-position: -260px -52px;} +.ico-extension-disabled{background-position: -260px -78px;} +.ico-extension-edit{background-position: -260px -104px;} +.ico-extension-error{background-position: -260px -130px;} +.ico-extension-go{background-position: -260px -156px;} +.ico-extension-link{background-position: -260px -182px;} .ico-pound{background-position: -260px -208px;} .ico-printer{background-position: -260px -234px;} .ico-printer-add{background-position: -260px -260px;} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/docs/changelog.txt 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/docs/changelog.txt 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,3 +1,3 @@ Version 0.1 ------------------- -Create avatars plugin \ No newline at end of file +Create avatars extension \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/modinfo.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * Avatars plugin + * Avatars extension * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -21,7 +21,7 @@ */ // Info module define("_MI_AVATARS_NAME", "Avatars"); -define("_MI_AVATARS_DESC", "Plugin for managing avatars"); +define("_MI_AVATARS_DESC", "Extension for managing avatars"); // Menu define("_MI_AVATARS_INDEX", "Home"); define("_MI_AVATARS_SYSTEM", "System avatars"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/xoops_version.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * avatars plugin + * avatars extension * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -46,10 +46,10 @@ $modversion['system_menu'] = 1; /* - Manage plugin + Manage extension */ -$modversion['plugin'] = 1; -$modversion['plugin_module'][] = 'system'; +$modversion['extension'] = 1; +$modversion['extension_module'][] = 'system'; // Admin things $modversion['hasAdmin'] = 1; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/docs/changelog.txt 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/docs/changelog.txt 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,4 +1,4 @@ Version 0.1 ------------------- -Create banners plugin +Create banners extension Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/admin/menu.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * mail user plugin + * mail user extension * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/mailusers/xoops_version.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * Mailusers Plugin + * Mailusers Extension * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -52,10 +52,10 @@ $modversion['system_menu'] = 1; /* - Manage plugin + Manage extension */ -$modversion['plugin'] = 1; -$modversion['plugin_module'][] = 'system'; +$modversion['extension'] = 1; +$modversion['extension_module'][] = 'system'; // Admin things $modversion['hasAdmin'] = 1; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/about.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/center.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/dump.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/header.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/index.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/admin/menu.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/form/maintenance.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/class/maintenance.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/docs/changelog.txt 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,3 +1,3 @@ Version 0.1 ------------------- -Create maintenance plugin \ No newline at end of file +Create maintenance extension \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/admin.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/admin.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/modinfo.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/language/english/modinfo.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -22,7 +22,7 @@ // Info module define("_MI_MAINTENANCE_NAME", "Maintenance"); -define("_MI_MAINTENANCE_DESC", "Plugins for maintenance"); +define("_MI_MAINTENANCE_DESC", "Extensions for maintenance"); // Menu define("_MI_MAINTENANCE_INDEX", "Home"); define("_MI_MAINTENANCE_CENTER", "Maintenance"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/xoops_version.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/maintenance/xoops_version.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -10,7 +10,7 @@ */ /** - * maintenance plugins + * maintenance extensions * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) @@ -55,10 +55,10 @@ $modversion['system_menu'] = 1; /* - Manage plugin + Manage extension */ -$modversion['plugin'] = 1; -$modversion['plugin_module'][] = 'system'; +$modversion['extension'] = 1; +$modversion['extension_module'][] = 'system'; /* Admin things Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -55,10 +55,10 @@ $modversion['system_menu'] = 1; /* - Manage plugin + Manage extension */ -$modversion['plugin'] = 1; -$modversion['plugin_module'][] = 'system'; +$modversion['extension'] = 1; +$modversion['extension_module'][] = 'system'; /* Mysql and tables Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,3 +1,3 @@ Version 0.1 ------------------- -Create smilies plugin \ No newline at end of file +Create smilies extension \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -55,10 +55,10 @@ $modversion['system_menu'] = 1; /* - Manage plugin + Manage extension */ -$modversion['plugin'] = 1; -$modversion['plugin_module'][] = 'system'; +$modversion['extension'] = 1; +$modversion['extension_module'][] = 'system'; /* Admin things Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/index.html 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,170 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Plugins Manager + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Andricq Nicolas (AKA MusS) + * @package system + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +// Get main instance +$xoops = Xoops::getInstance(); +$system = System::getInstance(); + +// Check users rights +if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { + exit(_NOPERM); +} + +if (isset($_POST)) { + foreach ($_POST as $k => $v) { + ${$k} = $v; + } +} +$system->loadLanguage('modulesadmin','system'); +// Get Action type +$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); + +switch ($op) { + + case 'list': + // Call Header + $xoops->header('system_extensions.html'); + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + // Define scripts + $xoops->theme->addScript('media/jquery/plugins/jquery.jeditable.js'); + $xoops->theme->addScript('modules/system/js/admin.js'); + $xoops->theme->addScript('modules/system/js/module.js'); + // Define Breadcrumb and tips + $admin_page = new XoopsModuleAdmin(); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_ADMIN, $system->adminVersion('extensions', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_MAIN); + $admin_page->addTips(_AM_SYSTEM_EXTENSIONS_TIPS); + $admin_page->renderBreadcrumb(); + $admin_page->renderTips(); + + $system_extension = new SystemExtension(); + + $extension = $system_extension->getExtensionList(); + + $xoops->tpl->assign('xoops', $xoops); + $xoops->tpl->assign('extension_list', $extension); + // Call Footer + $xoops->footer(); + break; + + case 'install': + $module = $system->cleanVars($_POST, 'dirname', '', 'string'); + // Call Header + $xoops->header('system_modules_logger.html'); + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + // Define Breadcrumb and tips + $admin_page = new XoopsModuleAdmin(); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_ADMIN, $system->adminVersion('extensions', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_INSTALL); + $admin_page->renderBreadcrumb(); + + $ret = array(); + $system_extension = new SystemExtension(); + $ret = $system_extension->install($module); + if ($ret) { + $xoops->tpl->assign('install', 1); + $xoops->tpl->assign('module', $ret); + $xoops->tpl->assign('from_title', _AM_SYSTEM_EXTENSIONS_ADMIN); + $xoops->tpl->assign('from_link', $system->adminVersion('extensions', 'adminpath')); + $xoops->tpl->assign('title', _AM_SYSTEM_EXTENSIONS_INSTALL); + $xoops->tpl->assign('log', $system_extension->trace); + } else { + print_r($system_extension->error); + //print_r($system_extension->trace); + } + //Set active modules in cache folder + $xoops->setActiveModules(); + // Call Footer + $xoops->footer(); + break; + + case 'uninstall': + $mid = $system->cleanVars($_POST, 'mid', 0, 'int'); + $module_handler = $xoops->getHandlerModule(); + $module = $module_handler->getById($mid); + // Call Header + $xoops->header('system_modules_logger.html'); + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + // Define Breadcrumb and tips + $admin_page = new XoopsModuleAdmin(); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_ADMIN, $system->adminVersion('extensions', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_UNINSTALL); + $admin_page->renderBreadcrumb(); + + $ret = array(); + $system_extension = new SystemExtension(); + $ret = $system_extension->uninstall($module->getVar('dirname')); + $xoops->tpl->assign('module', $ret); + if ($ret) { + $xoops->tpl->assign('from_title', _AM_SYSTEM_EXTENSIONS_ADMIN); + $xoops->tpl->assign('from_link', $system->adminVersion('extensions', 'adminpath')); + $xoops->tpl->assign('title', _AM_SYSTEM_EXTENSIONS_UNINSTALL); + $xoops->tpl->assign('log', $system_extension->trace); + } + $folder = array(1, 3); + $system->CleanCache($folder); + // Call Footer + $xoops->footer(); + break; + + case 'update': + $mid = $system->cleanVars($_POST, 'mid', 0, 'int'); + $module_handler = $xoops->getHandlerModule(); + $block_handler = $xoops->getHandlerBlock(); + $module = $module_handler->getById($mid); + // Call Header + $xoops->header('system_modules_logger.html'); + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + // Define Breadcrumb and tips + $admin_page = new XoopsModuleAdmin(); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_ADMIN, $system->adminVersion('extensions', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_EXTENSIONS_UPDATE); + $admin_page->renderBreadcrumb(); + + $ret = array(); + $system_extension = new SystemExtension(); + $ret = $system_extension->update($module->getVar('dirname')); + $xoops->tpl->assign('module', $ret); + if ($ret) { + $xoops->tpl->assign('install', 1); + $xoops->tpl->assign('from_title', _AM_SYSTEM_EXTENSIONS_ADMIN); + $xoops->tpl->assign('from_link', $system->adminVersion('extensions', 'adminpath')); + $xoops->tpl->assign('title', _AM_SYSTEM_EXTENSIONS_UPDATE); + $xoops->tpl->assign('log', $system_extension->trace); + } + $folder = array(1, 3); + $system->CleanCache($folder); + //Set active modules in cache folder + $xoops->setActiveModules(); + // Call Footer + $xoops->footer(); + break; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/main.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/xoops_version.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/xoops_version.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,35 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Plugin manager config + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Andricq Nicolas (AKA MusS) + * @package system + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +$modversion['name'] = _AM_SYSTEM_EXTENSIONS; +$modversion['version'] = '1.0'; +$modversion['description'] = _AM_SYSTEM_EXTENSIONS_DESC; +$modversion['author'] = ''; +$modversion['credits'] = 'The XOOPS Project; Andricq Nicolas (AKA MusS)'; +$modversion['help'] = 'page=extension'; +$modversion['license'] = "GPL see LICENSE"; +$modversion['official'] = 1; +$modversion['image'] = 'extensions.png'; +$modversion['hasAdmin'] = 1; +$modversion['adminpath'] = 'admin.php?fct=extensions'; +$modversion['category'] = XOOPS_SYSTEM_MODULE; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/extensions/xoops_version.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -99,7 +99,7 @@ // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, $system->adminVersion('plugins', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, $system->adminVersion('extensions', 'adminpath')); $admin_page->addBreadcrumbLink($module->getVar('name')); $admin_page->renderBreadcrumb(); @@ -182,7 +182,7 @@ // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); $admin_page->addBreadcrumbLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true); - $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, $system->adminVersion('plugins', 'adminpath')); + $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, $system->adminVersion('extensions', 'adminpath')); $admin_page->addBreadcrumbLink(_AM_SYSTEM_PREFERENCES_MAIN); $admin_page->addTips(_AM_SYSTEM_PREFERENCES_NAV_TIPS); $admin_page->renderBreadcrumb(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -120,7 +120,7 @@ $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; $dirlist = XoopsLists::getDirListAsArray($admin_dir); - $inactive_section = array('blocksadmin', 'groups', 'modulesadmin', 'preferences', 'tplsets', 'plugins'); + $inactive_section = array('blocksadmin', 'groups', 'modulesadmin', 'preferences', 'tplsets', 'extensions'); foreach ($dirlist as $directory) { if (file_exists($file = $admin_dir . '/' . $directory . '/xoops_version.php')) { require $file; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/extension.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/extension.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/extension.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,104 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Andricq Nicolas (AKA MusS) + * @package System + * @version $Id$ + */ + +class SystemExtension extends SystemModule +{ + + public function getExtension( $mod = '' ) + { + $ret = array(); + $extension = $this->getExtensionList(); + foreach( $extension as $list ) { + /* @var $list XoopsModule */ + if ( $list->getInfo('install') ) { + if ( !is_array( $list->getInfo('extension_module') ) ) { + $ret[] = $list; + } else { + if ( array_search( $mod, $list->getInfo('extension_module')) !== false ){ + $ret[] = $list; + //echo $list->getInfo('name') . is_array( $list->getInfo('extension_module') ); + } + } + unset($list); + } + } + + return $ret; + } + + /** + * Return all extensions + * @return array + */ + public function getExtensionList() + { + // Get main instance + $xoops = Xoops::getInstance(); + $module_handler = $xoops->getHandlerModule(); + $moduleperm_handler = $xoops->getHandlerGroupperm(); + + $ret = array(); + $i = 0; + foreach ($this->_list as $file) { + if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $file . '/xoops_version.php')) { + clearstatcache(); + $file = trim($file); + /* @var $module XoopsModule */ + $module = $module_handler->create(); + $module->loadInfo($file); + if ($module->getInfo('extension')) { + if (in_array($file, $this->_mods)) { + $module->setInfo('install', true); + $extension = $module_handler->getByDirname($module->getInfo('dirname')); + $module->setInfo('mid', $extension->getVar('mid')); + $module->setInfo('update', XoopsLocal::formatTimestamp($extension->getVar('last_update'), 's')); + if (round($module->getInfo('version'), 2) != $extension->getVar('version')) { + $module->setInfo('warning_update', true); + } + $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getInfo('mid'), $xoops->user->getGroups()); + if ($sadmin && ($module->getVar('hasnotification') || is_array($module->getInfo('config')) || is_array($module->getInfo('comments')))) { + $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getInfo('mid')); + } + } else { + $module->setInfo('install', false); + } + $module->setInfo('version', round($module->getInfo('version'), 2)); + if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getInfo('dirname') . '/icons/logo_small.png')) { + $module->setInfo('logo_small', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/icons/logo_small.png'); + } else { + $module->setInfo('logo_small', XOOPS_URL . '/media/xoops/images/icons/16/default.png'); + } + if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getInfo('dirname') . '/icons/logo_large.png')) { + $module->setInfo('logo_large', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/icons/logo_large.png'); + } else { + $module->setInfo('logo_large', XOOPS_URL . '/media/xoops/images/icons/32/default.png'); + } + $module->setInfo('link_admin', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/' . $module->getInfo('adminindex')); + $module->setInfo('options', $module->getAdminMenu()); + $ret[] = $module; + unset($module); + $i++; + } + } + } + return $ret; + } +} Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/extension.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -68,7 +68,7 @@ $ret = $module_handler->getObjects($criteria, true); $list = array(); foreach (array_keys($ret) as $i) { - if (!$ret[$i]->getInfo('plugin')) { + if (!$ret[$i]->getInfo('extension')) { if ($ret[$i]->getInfo('dirname') == 'system') { $ret[$i]->setInfo('can_delete', false); $ret[$i]->setInfo('can_disable', false); @@ -120,7 +120,7 @@ /* @var $module XoopsModule */ $module = $module_handler->create(); $module->loadInfo($file); - if (!$module->getInfo('plugin')) { + if (!$module->getInfo('extension')) { $module->setInfo('mid', $i); $module->setInfo('version', round($module->getInfo('version'), 2)); $ret[] = $module; Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,104 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @author Andricq Nicolas (AKA MusS) - * @package System - * @version $Id$ - */ - -class SystemPlugin extends SystemModule -{ - - public function getPlugin( $mod = '' ) - { - $ret = array(); - $plugin = $this->getPluginList(); - foreach( $plugin as $list ) { - /* @var $list XoopsModule */ - if ( $list->getInfo('install') ) { - if ( !is_array( $list->getInfo('plugin_module') ) ) { - $ret[] = $list; - } else { - if ( array_search( $mod, $list->getInfo('plugin_module')) !== false ){ - $ret[] = $list; - //echo $list->getInfo('name') . is_array( $list->getInfo('plugin_module') ); - } - } - unset($list); - } - } - - return $ret; - } - - /** - * Return all plugins - * @return array - */ - public function getPluginList() - { - // Get main instance - $xoops = Xoops::getInstance(); - $module_handler = $xoops->getHandlerModule(); - $moduleperm_handler = $xoops->getHandlerGroupperm(); - - $ret = array(); - $i = 0; - foreach ($this->_list as $file) { - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $file . '/xoops_version.php')) { - clearstatcache(); - $file = trim($file); - /* @var $module XoopsModule */ - $module = $module_handler->create(); - $module->loadInfo($file); - if ($module->getInfo('plugin')) { - if (in_array($file, $this->_mods)) { - $module->setInfo('install', true); - $plugin = $module_handler->getByDirname($module->getInfo('dirname')); - $module->setInfo('mid', $plugin->getVar('mid')); - $module->setInfo('update', XoopsLocal::formatTimestamp($plugin->getVar('last_update'), 's')); - if (round($module->getInfo('version'), 2) != $plugin->getVar('version')) { - $module->setInfo('warning_update', true); - } - $sadmin = $moduleperm_handler->checkRight('module_admin', $module->getInfo('mid'), $xoops->user->getGroups()); - if ($sadmin && ($module->getVar('hasnotification') || is_array($module->getInfo('config')) || is_array($module->getInfo('comments')))) { - $module->setInfo('link_pref', XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getInfo('mid')); - } - } else { - $module->setInfo('install', false); - } - $module->setInfo('version', round($module->getInfo('version'), 2)); - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getInfo('dirname') . '/icons/logo_small.png')) { - $module->setInfo('logo_small', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/icons/logo_small.png'); - } else { - $module->setInfo('logo_small', XOOPS_URL . '/media/xoops/images/icons/16/default.png'); - } - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getInfo('dirname') . '/icons/logo_large.png')) { - $module->setInfo('logo_large', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/icons/logo_large.png'); - } else { - $module->setInfo('logo_large', XOOPS_URL . '/media/xoops/images/icons/32/default.png'); - } - $module->setInfo('link_admin', XOOPS_URL . '/modules/' . $module->getInfo('dirname') . '/' . $module->getInfo('adminindex')); - $module->setInfo('options', $module->getAdminMenu()); - $ret[] = $module; - unset($module); - $i++; - } - } - } - return $ret; - } -} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,7 +1,7 @@ @import url(button.css); @import url(help.css); @import url(module.css); -@import url(plugin.css); +@import url(extension.css); a {outline:none} Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/extension.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/extension.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/extension.css 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,4 @@ + +.xo-extension-detail { + margin: 0 0 0 25px; +} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/plugin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/plugin.css 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/plugin.css 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,4 +0,0 @@ - -.xo-plugin-detail { - margin: 0 0 0 25px; -} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -25,7 +25,7 @@ XoopsLoad::load('system', 'system'); XoopsLoad::load('module', 'system'); -XoopsLoad::load('plugin', 'system'); +XoopsLoad::load('extension', 'system'); $system = System::getInstance(); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/extensions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/extensions.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/extensions.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,45 @@ +<?php +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * _LANGCODE en + * _CHARSET UTF-8 + * @version $Id$ + */ + +// Navigation +define("_AM_SYSTEM_EXTENSIONS_ADMIN", "Extensions Administration"); +define("_AM_SYSTEM_EXTENSIONS_MAIN", "Main"); + +// Messages +define("_AM_SYSTEM_EXTENSIONS_MSG_INSTALL", "Install extension"); +define("_AM_SYSTEM_EXTENSIONS_MSG_UPDATE", "Update extension"); +define("_AM_SYSTEM_EXTENSIONS_MSG_UNINSTALL", "Uninstall extension"); + +define("_AM_SYSTEM_EXTENSIONS_MENUADMIN","Manage Extensions"); + +// Table +define("_AM_SYSTEM_EXTENSIONS_NAME","Name"); +define("_AM_SYSTEM_EXTENSIONS_VERSION","Version"); +define("_AM_SYSTEM_EXTENSIONS_DETAIL","Detail"); +define("_AM_SYSTEM_EXTENSIONS_ACTIONS","Actions"); + +// Buttons +define("_AM_SYSTEM_EXTENSIONS_INSTALL", "Install"); +define("_AM_SYSTEM_EXTENSIONS_UNINSTALL","Uninstall"); +define("_AM_SYSTEM_EXTENSIONS_UPDATE","Update"); + +// Other +define("_AM_SYSTEM_EXTENSIONS_VERSION2","Version:"); +define("_AM_SYSTEM_EXTENSIONS_AUTHOR","Author:"); +define("_AM_SYSTEM_EXTENSIONS_DESCRIPTION","Description:"); +define("_AM_SYSTEM_EXTENSIONS_LICENSE","License:"); +define("_AM_SYSTEM_EXTENSIONS_LASTUP","Last Update:"); +define("_AM_SYSTEM_EXTENSIONS_WEB","Web:"); + +// Tips +define("_AM_SYSTEM_EXTENSIONS_TIPS", +"<ul> +<li>If you install a new extension, remember to setup module preferences and users permissions!</li> +<li>Delete unused extension files from your server to avoid security issues and keep your website safe.</li> +</ul>"); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/extensions.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/plugins.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/plugins.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/plugins.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,45 +0,0 @@ -<?php -/** - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * _LANGCODE en - * _CHARSET UTF-8 - * @version $Id$ - */ - -// Navigation -define("_AM_SYSTEM_PLUGINS_ADMIN", "Plugins Administration"); -define("_AM_SYSTEM_PLUGINS_MAIN", "Main"); - -// Messages -define("_AM_SYSTEM_PLUGINS_MSG_INSTALL", "Install plugin"); -define("_AM_SYSTEM_PLUGINS_MSG_UPDATE", "Update plugin"); -define("_AM_SYSTEM_PLUGINS_MSG_UNINSTALL", "Uninstall plugin"); - -define("_AM_SYSTEM_PLUGINS_MENUADMIN","Manage Plugins"); - -// Table -define("_AM_SYSTEM_PLUGINS_NAME","Name"); -define("_AM_SYSTEM_PLUGINS_VERSION","Version"); -define("_AM_SYSTEM_PLUGINS_DETAIL","Detail"); -define("_AM_SYSTEM_PLUGINS_ACTIONS","Actions"); - -// Buttons -define("_AM_SYSTEM_PLUGINS_INSTALL", "Install"); -define("_AM_SYSTEM_PLUGINS_UNINSTALL","Uninstall"); -define("_AM_SYSTEM_PLUGINS_UPDATE","Update"); - -// Other -define("_AM_SYSTEM_PLUGINS_VERSION2","Version:"); -define("_AM_SYSTEM_PLUGINS_AUTHOR","Author:"); -define("_AM_SYSTEM_PLUGINS_DESCRIPTION","Description:"); -define("_AM_SYSTEM_PLUGINS_LICENSE","License:"); -define("_AM_SYSTEM_PLUGINS_LASTUP","Last Update:"); -define("_AM_SYSTEM_PLUGINS_WEB","Web:"); - -// Tips -define("_AM_SYSTEM_PLUGINS_TIPS", -"<ul> -<li>If you install a new plugin, remember to setup module preferences and users permissions!</li> -<li>Delete unused plugin files from your server to avoid security issues and keep your website safe.</li> -</ul>"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -40,9 +40,9 @@ define("_AM_SYSTEM_BLOCKS","Blocks"); define("_AM_SYSTEM_BLOCKS_DESC","With blocks you can <br /> add many thing for <br /> your users"); define("_AM_SYSTEM_MODULES","Modules"); -define("_AM_SYSTEM_MODULES_DESC","At here you can install <br /> and unistall your xoops <br /> modules. Do you know <br /> what module is ?"); -define("_AM_SYSTEM_PLUGINS","Plugins"); -define("_AM_SYSTEM_PLUGINS_DESC","At here you can install <br /> and uninstall your xoops <br /> plugins."); +define("_AM_SYSTEM_MODULES_DESC","At here you can install <br /> and unistall your XOOPS <br /> modules. Do you know <br /> what module is ?"); +define("_AM_SYSTEM_EXTENSIONS","Extensions"); +define("_AM_SYSTEM_EXTENSIONS_DESC","At here you can install <br /> and uninstall your XOOPS <br /> extensions."); define("_AM_SYSTEM_THEME","Themes"); define("_AM_SYSTEM_THEME_DESC","You can manage themes"); define("_AM_SYSTEM_USER","Users"); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/extensions.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/extensions.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/extensions.html 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,8 @@ +<h1 class="head">Help: Plugins</h1> + +<h4>Description</h4> +<p> + +Empty... + +</p> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html 2012-07-07 17:50:40 UTC (rev 9798) @@ -1,8 +0,0 @@ -<h1 class="head">Help: Plugins</h1> - -<h4>Description</h4> -<p> - -Empty... - -</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php 2012-07-07 17:47:15 UTC (rev 9797) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php 2012-07-07 17:50:40 UTC (rev 9798) @@ -61,7 +61,7 @@ define("_MI_SYSTEM_PREFERENCE_ACTIVE_PREFERENCES",""); define("_MI_SYSTEM_PREFERENCE_ACTIVE_TPLSETS",""); define("_MI_SYSTEM_PREFERENCE_ACTIVE_USERS","Active Users"); -define("_MI_SYSTEM_PREFERENCE_ACTIVE_PLUGINS","Plugins"); +define("_MI_SYSTEM_PREFERENCE_ACTIVE_EXTENSIONS","Extensions"); define("_MI_SYSTEM_PREFERENCE_ACTIVE_THEMES","Themes"); define("_MI_SYSTEM_PREFERENCE_BREAK_PAGER","Number of rows to display in the administration"); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_extensions.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_extensions.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_extensions.html 2012-07-07 17:50:40 UTC (rev 9798) @@ -0,0 +1,178 @@ +<{includeq file="admin:system|admin_breadcrumb.html"}> +<{includeq file="admin:system|admin_tips.html"}> + +<table class="outer"> + <thead> + <tr> + <th>#</th> + <th><{$smarty.const._AM_SYSTEM_EXTENSIONS_NAME}></th> + <th><{$smarty.const._AM_SYSTEM_EXTENSIONS_VERSION}></th> + <th><{$smarty.const._AM_SYSTEM_EXTENSIONS_DETAIL}></th> + <th><{$smarty.const._AM_SYSTEM_EXTENSIONS_ACTIONS}></th> + </tr> + </thead> + <tbody> + <{foreach item=extension from=$extension_list}> + <tr> + <td class="span1"> + <{if $extension->getInfo('install')}> + <a href="<{$xoops_url}>/modules/<{$extension->getInfo('dirname')}>/<{$extension->getInfo('adminindex')}>"> + <img class="xo-tooltip" src="<{$extension->getInfo('logo_small')}>" alt="<{$extension->getInfo('name')}>" title="<{$extension->getInfo('name')}>" /> + </a> + <{else}> + <img class="xo-tooltip" src="<{$extension->getInfo('logo_small')}>" alt="<{$extension->getInfo('name')}>" title="<{$extension->getInfo('name')}>" /> + <{/if}> + </td> + <td class="span4"> + <{if $extension->getInfo('install')}> + <a href="<{$xoops_url}>/modules/<{$extension->getInfo('dirname')}>/<{$extension->getInfo('adminindex')}>"> + <{$extension->getInfo('name')}> + </a> + <{else}> + <{$extension->getInfo('name')}> + <{/if}> + </td> + <td class="span2"> + <{$extension->getInfo('version')}> + </td> + <td> + <ul class="xo-extension-detail"> + <li><span class="bold"><{$smarty.const._AM_SYSTEM_EXTENSIONS_AUTHOR}></span> <{$extension->getInfo('author')}></li> + <li class="hide detail-<{$extension->getInfo(dirname)}>"><span class="bold"><{$smarty.const._AM_SYSTEM_EXTENSIONS_LICENSE}></span> <{$extension->getInfo('license')}></li> + <li class="hide detail-<{$extension->getInfo(dirname)}>"><span class="bold"><{$smarty.const._AM_SYSTEM_EXTENSIONS_DESCRIPTION}></span> <{$extension->getInfo(description)}></li> + </ul> + </td> + <td class="span4"> + <a class="xo-tooltip" href="javascript:" onclick="$('li.detail-<{$extension->getInfo(dirname)}>').toggle('slow');" title="<{$smarty.const._AM_SYSTEM_EXTENSIONS_DETAIL}>"><span class="ico-magnifier"></span></a> + <{if $extension->getInfo('install')}> + <a class="xo-tooltip" href="javascript:" onclick="module_Update(<{$extension->getInfo(mid)}>)" title="<{$smarty.const._AM_SYSTEM_EXTENSIONS_UPDATE}>"><span class="ico-arrow-refresh-small"></span></a> + <a class="xo-tooltip" href="javascript:" onclick="module_Uninstall(<{$extension->getInfo(mid)}>)" title="<{$smarty.const._AM_SYSTEM_EXTENSIONS_UNINSTALL}>"><span class="ico-application-delete"></span></a> + <{else}> + <a class="xo-tooltip" href="javascript:" onclick="module_Install('<{$extension->getInfo(dirname)}>')" title="<{$smarty.const._AM_SYSTEM_EXTENSIONS_INSTALL}> <{$extension->getInfo(name)}>"><span class="ico-application-go"></span></a> + <{/if}> + </td> + </tr> + <{/foreach}> + </tbody> +</table> +<{foreach item=extension from=$extension_list}> +<div id="data-<{$extension->getInfo('mid')}>" class="hide"> + <div class="module_card"> + <div class="module_image"> + <a class="rounded xo-tooltip" style="background: url('<{$xoops_url}>/modules/<{$extension->getInfo(dirname)}>/<{$extension->getInfo(image)}>') no-repeat scroll center center transparent;" title="<{$extension->getVar('name')}>"> + <span class="rounded"> </span> + </a> + </div> + <div class="module_data"> + <div class="name"><{$extension->getInfo('name')}></div> + <div class="data"> + <div><span class="bold"><{$smarty.const._AM_SYSTEM_EXTENSIONS_VERSION2}></span> <{$extension->getInfo('version')}></div> + <div><span class="bold"><{$smarty.const._AM_SYSTEM_EXTENSIONS_LASTUP}></span> <{$extension->getInfo('update')}></div> + </div> + </div> + <div class="modu... [truncated message content] |
From: <for...@us...> - 2012-07-09 19:35:08
|
Revision: 9829 http://xoops.svn.sourceforge.net/xoops/?rev=9829&view=rev Author: forxoops Date: 2012-07-09 19:34:57 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Update theme and template for bootstrap Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_user.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/dashboard.html XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops.css Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_redirect.html XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_siteclosed.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-07-09 19:34:57 UTC (rev 9829) @@ -17,6 +17,65 @@ * @version $Id$ */ -if (! defined('XOOPS_INSTALL')) { - header('Location: install/index.php'); +if (!defined("XOOPS_MAINFILE_INCLUDED")) { + define("XOOPS_MAINFILE_INCLUDED", 1); + + // XOOPS Physical Paths + + // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash + define('XOOPS_ROOT_PATH', 'E:/Wamp/www/xps260/htdocs'); + + // For forward compatibility + // Physical path to the XOOPS library directory WITHOUT trailing slash + define('XOOPS_PATH', 'E:/Wamp/www/xps260/htdocs/xoops_lib'); + // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash + define('XOOPS_VAR_PATH', 'E:/Wamp/www/xps260/htdocs/xoops_data'); + // Alias of XOOPS_PATH, for compatibility, temporary solution + define("XOOPS_TRUST_PATH", XOOPS_PATH); + + // URL Association for SSL and Protocol Compatibility + $http = 'http://'; + if (!empty($_SERVER['HTTPS'])) { + $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://'; + } + define('XOOPS_PROT', $http); + + // XOOPS Virtual Path (URL) + // Virtual path to your main XOOPS directory WITHOUT trailing slash + // Example: define('XOOPS_URL', 'http://localhost/xps260/htdocs'); + define('XOOPS_URL', 'http://localhost/xps260/htdocs'); + + // Shall be handled later, don't forget! + define("XOOPS_CHECK_PATH", 0); + // Protect against external scripts execution if safe mode is not enabled + if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) { + if (function_exists("debug_backtrace")) { + $xoopsScriptPath = debug_backtrace(); + if (!count($xoopsScriptPath)) { + die("XOOPS path check: this file cannot be requested directly"); + } + $xoopsScriptPath = $xoopsScriptPath[0]["file"]; + } else { + $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"]; + } + if (DIRECTORY_SEPARATOR != "/") { + // IIS6 may double the \ chars + $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $xoopsScriptPath); + } + if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", XOOPS_ROOT_PATH))) { + exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); + } + } + + // Secure file + require XOOPS_VAR_PATH . '/data/secure.php'; + + define('XOOPS_GROUP_ADMIN', '1'); + define('XOOPS_GROUP_USERS', '2'); + define('XOOPS_GROUP_ANONYMOUS', '3'); + + if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") { + include XOOPS_ROOT_PATH."/include/common.php"; + } + } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/css/xoops.bootstrap.css 2012-07-09 19:34:57 UTC (rev 9829) @@ -25,7 +25,56 @@ } .caption-required{color: #b94a48;} +/* Area style */ +.xo-window { + background-color: #222222; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222)); + background-image: -moz-linear-gradient(top, #333333, #222222); + background-image: -ms-linear-gradient(top, #333333, #222222); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222)); + background-image: -webkit-linear-gradient(top, #333333, #222222); + background-image: -o-linear-gradient(top, #333333, #222222); + background-image: linear-gradient(top, #333333, #222222); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-border-radius: 5px 5px 0 0; + -khtml-border-top-left-radius: 5px; + -khtml-border-top-right-radius: 5px; + -webkit-border-radius-topleft: 5px; + -webkit-border-radius-topright: 5px; + border-radius: 5px 5px 0 0; + border: 1px solid #2D4760; + padding: 4px 6px 6px 4px; + height: 20px; +} +.xo-window-title { + padding: 2px 6px 6px 6px; + color: #fff; + font-weight: bold; + text-shadow: 0 0 2px #000; + font-family: tahoma, verdana, arial, sans-serif; +} +.xo-window-data { + float: left; + min-height: 50px; + padding: 6px; + width: 100%; +} .clear { clear: both; } +.spacer .spacer-mini { + padding:0 0 3px 0; +} +.spacer-mid { + padding:0 0 6px 0; +} +.spacer-large { + padding:0 0 12px 0; +} + +.txt-center { text-align: center; } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_user.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_user.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/blocks/system_block_user.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -1,7 +1,7 @@ <ul class="nav nav-list"> <{if $xoops_isadmin}> <li> - <a href="<{xoAppUrl admin.php}>" title="<{$block.lang_adminmenu}>"> + <a href="<{xoAppUrl admin.php}>" title="<{$block.lang_adminmenu}>" rel="external"> <i class="icon-wrench"></i> <{$block.lang_adminmenu}> </a> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_siteclosed.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -1,64 +1,84 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>"> +<!DOCTYPE html> +<html lang="<{$xoops_langcode}>"> <head> - <meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" /> - <meta http-equiv="content-language" content="<{$xoops_langcode}>" /> - <title><{$xoops_sitename}> - <{$xoops_slogan}></title> - <meta name="robots" content="<{$xoops_meta_robots}>" /> - <meta name="keywords" content="<{$xoops_meta_keywords}>" /> - <meta name="description" content="<{$xoops_meta_description}>" /> - <meta name="rating" content="<{$xoops_meta_rating}>" /> - <meta name="author" content="<{$xoops_meta_author}>" /> - <meta name="copyright" content="<{$xoops_meta_copyright}>" /> - <meta name="generator" content="XOOPS" /> - - <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl browse.php?xoops.css}>" /> - <link rel="shortcut icon" type="image/ico" href="<{xoAppUrl favicon.ico}>" /> - -</head> -<body> - <table class="collapse"> - <tr id="header"> - <td class="alignmiddle txtcenter" style="width: 150px; background-color: #2F5376;"><a href="<{xoAppUrl }>" title=""><img src="<{xoAppUrl images/logo.gif}>" alt="" /></a></td> - <td class="width100 alignmiddle txtcenter" style="background-color: #2F5376;"> </td> - </tr> - <tr> - <td style="height: 8px; border-bottom: 1px solid silver; background-color: #ddd;" colspan="2"> </td> - </tr> - </table> + <!-- Title and meta --> + <meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" /> + <title><{$xoops_sitename}> - <{$xoops_slogan}></title> + <meta name="robots" content="<{$xoops_meta_robots}>" /> + <meta name="keywords" content="<{$xoops_meta_keywords}>" /> + <meta name="description" content="<{$xoops_meta_description}>" /> + <meta name="rating" content="<{$xoops_meta_rating}>" /> + <meta name="author" content="<{$xoops_meta_author}>" /> + <meta name="generator" content="XOOPS" /> - <table class="width80 txtcenter bnone" cellspacing="1" cellpadding="10"> - <tr> - <td class="txtcenter"><div class="txtcenter bold" style="background-color: #DDFFDF; color: #136C99; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; padding: 10px;"><{$lang_siteclosemsg}></div></td> - </tr> - </table> - - <form action="<{xoAppUrl user.php}>" method="post"> - <table class="collapse txtcenter solidsilver" style="width: 200px;"> - <tr> - <th class="alignmiddle pad2 white" style="background-color: #2F5376;" colspan="2"><{$lang_login}></th> - </tr> - <tr> - <td class="pad2"><{$lang_username}></td><td class="pad2"><input type="text" name="uname" size="12" value="" /></td> - </tr> - <tr> - <td class="pad2"><{$lang_password}></td><td class="pad2"><input type="password" name="pass" size="12" /></td> - </tr> - <tr> - <td class="pad2"> </td> - <td class="pad2"> - <input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /> - <input type="hidden" name="xoops_login" value="1" /> - <input type="submit" value="<{$lang_login}>" /></td> - </tr> - </table> - </form> + <!-- Favicon --> + <link rel="shortcut icon" type="image/ico" href="<{xoImgUrl icons/favicon.ico}>" /> + <link rel="icon" type="image/png" href="<{xoImgUrl icons/favicon.png}>" /> - <table class="collapse width100"> - <tr> - <td style="height:8px; border-bottom: 1px solid silver; border-top: 1px solid silver; background-color: #ddd;" colspan="2"> </td> - </tr> - </table> + <!-- Xoops style sheet --> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl xoops.css}>" /> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/xoops/css/icons.css}>" /> + <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl media/bootstrap/css/xoops.bootstrap.css}>" /> - </body> + <!--[if lte IE 8]> + <link rel="stylesheet" href="<{xoImgUrl styleIE8.css}>" type="text/css" /> + <![endif]--> + + <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + +</head> +<body id="<{$xoops_dirname}>" class="<{$xoops_langcode}>"> +<div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="container"> + <a class="brand" href="<{xoAppUrl }>" title="<{$xoops_sitename}>"> + <img src="<{xoImgUrl img/logo.png}>" alt="<{$xoops_sitename}>" /> + </a> + </div> + </div> +</div> +<div class="container" style="margin-top: 50px;"> + <div class="row"> + <div class="span12"> + <div class="alert alert-info pagination-centered" style="padding: 30px;"> + <{$lang_siteclosemsg}> + </div> + </div> + </div> + <div class="row"> + <div class="span6 offset3"> + <form class="well form-horizontal" action="<{xoAppUrl user.php}>" method="post"> + <div class="control-group"> + <label class="control-label" for="xo-login-uname"><{$lang_username}></label> + <div class="controls"> + <div class="input-prepend"> + <span class="add-on"> + <i class="icon-user"></i> + </span><input class="span2" type="text" name="uname" id="xo-login-uname" value="" placeholder="<{$lang_username}>"> + </div> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="xo-login-pass"><{$lang_password}></label> + <div class="controls"> + <div class="input-prepend"> + <span class="add-on"> + <i class="icon-cog"></i> + </span><input class="span2" type="password" name="pass" id="xo-login-pass" placeholder="<{$lang_password}>"> + </div> + </div> + </div> + <input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /> + <input type="hidden" name="xoops_login" value="1" /> + <div class="form-actions" style="margin-bottom: 0;"> + <button type="submit" class="btn btn-primary"><{$lang_login}></button> + </div> + </form> + </div> + </div> +</div> +</body> </html> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -1,182 +1,201 @@ <{if $user_ownpage == true}> - -<form name="usernav" action="user.php" method="post"> - -<br /><br /> - -<table class="width70 aligncenter bnone"> - <tr class="txtcenter"> - <td><input type="button" value="<{$lang_editprofile}>" onclick="location='edituser.php'" /> +<div class="btn-group"> + <a class="btn" href="<{xoAppUrl edituser.php}>"> + <i class="icon-edit"></i> + <{$lang_editprofile}> + </a> <{if $avatars == true}> - <input type="button" value="<{$lang_avatar}>" onclick="location='edituser.php?op=avatarform'" /> + <a class="btn" href="<{xoAppUrl edituser.php?op=avatarform}>"> + <i class="icon-fire"></i> + <{$lang_avatar}> + </a> <{/if}> - <input type="button" value="<{$lang_inbox}>" onclick="location='viewpmsg.php'" /> - + <a class="btn" href="<{xoAppUrl viewpmsg.php}>"> + <i class="icon-envelope"></i> + <{$lang_inbox}> + </a> <{if $user_candelete == true}> - <input type="button" value="<{$lang_deleteaccount}>" onclick="location='user.php?op=delete'" /> + <a class="btn btn-danger" href="<{xoAppUrl user.php?op=delete}>"> + <i class="icon-trash icon-white"></i> + <{$lang_deleteaccount}> + </a> <{/if}> - - <input type="button" value="<{$lang_logout}>" onclick="location='user.php?op=logout'" /></td> - </tr> -</table> -</form> - -<br /><br /> + <a class="btn" href="<{xoAppUrl user.php?op=logout}>"> + <i class="icon-off"></i> + <{$lang_logout}> + </a> +</div> <{elseif $xoops_isadmin != false}> - -<br /><br /> - -<table class="width70 aligncenter bnone"> - <tr class="txtcenter"> - <td><input type="button" value="<{$lang_editprofile}>" onclick="location='<{$xoops_url}>/modules/system/admin.php?fct=users&uid=<{$user_uid}>&op=modifyUser'" /> - <input type="button" value="<{$lang_deleteaccount}>" onclick="location='<{$xoops_url}>/modules/system/admin.php?fct=users&op=delUser&uid=<{$user_uid}>'" /> - </tr> -</table> - -<br /><br /> +<div class="btn-group"> + <a class="btn" href="<{$xoops_url}>/modules/system/admin.php?fct=users&uid=<{$user_uid}>&op=modifyUser"> + <i class="icon-edit"></i> + <{$lang_editprofile}> + </a> + <a class="btn btn-danger" href="<{$xoops_url}>/modules/system/admin.php?fct=users&op=delUser&uid=<{$user_uid}>"> + <i class="icon-trash icon-white"></i> + <{$lang_deleteaccount}> + </a> +</div> <{/if}> +<div class="spacer-large"></div> +<div class="tabbable"> + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab"><{$lang_allaboutuser}></a></li> + <li><a href="#tab2" data-toggle="tab"><{$lang_statistics}></a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="tab1"> + <table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th colspan="2"><{$lang_allaboutuser}></th> + </tr> + </thead> + <tbody> + <{if $user_avatarurl}> + <tr> + <td><{$lang_avatar}></td> + <td><img src="<{$user_avatarurl}>" alt="Avatar" /></td> + </tr> + <{/if}> + <{if $user_realname}> + <tr> + <td><{$lang_realname}></td> + <td><{$user_realname}></td> + </tr> + <{/if}> + <{if $user_websiteurl}> + <tr> + <td><{$lang_website}></td> + <td><{$user_websiteurl}></td> + </tr> -<table class="width100 bnone" cellspacing="5"> - <tr class="aligntop"> - <td class="width50"> - <table class="outer width100" cellpadding="4" cellspacing="1"> - <tr> - <th colspan="2" class="txtcenter"><{$lang_allaboutuser}></th> - </tr> - <{if $user_avatarurl}> - <tr class="aligntop"> - <td class="head"><{$lang_avatar}></td> - <td class="even txt center"><img src="<{$user_avatarurl}>" alt="Avatar" /></td> - </tr> - <{/if}> - <{if $user_realname}> - <tr> - <td class="head"><{$lang_realname}></td> - <td class="odd center"><{$user_realname}></td> - </tr> - <{/if}> - <{if $user_websiteurl}> - <tr> - <td class="head"><{$lang_website}></td> - <td class="even"><{$user_websiteurl}></td> - </tr> - - <{/if}> - <{if $user_email}> - <tr class="aligntop"> - <td class="head"><{$lang_email}></td> - <td class="odd"><{$user_email}></td> - </tr> - <{/if}> - <{if !$user_ownpage == true}> - <tr class="aligntop"> - <td class="head"><{$lang_privmsg}></td> - <td class="even"><{$user_pmlink}></td> - </tr> - <{/if}> - <{if $user_icq}> - <tr class="aligntop"> - <td class="head"><{$lang_icq}></td> - <td class="odd"><{$user_icq}></td> - </tr> - <{/if}> - <{if $user_aim}> - <tr class="aligntop"> - <td class="head"><{$lang_aim}></td> - <td class="even"><{$user_aim}></td> - </tr> - <{/if}> - <{if $user_yim}> - <tr class="aligntop"> - <td class="head"><{$lang_yim}></td> - <td class="odd"><{$user_yim}></td> - </tr> - <{/if}> - <{if $user_msnm}> - <tr class="aligntop"> - <td class="head"><{$lang_msnm}></td> - <td class="even"><{$user_msnm}></td> - </tr> - <{/if}> - <{if $user_location}> - <tr class="aligntop"> - <td class="head"><{$lang_location}></td> - <td class="odd"><{$user_location}></td> - </tr> - <{/if}> - <{if $user_occupation}> - <tr class="aligntop"> - <td class="head"><{$lang_occupation}></td> - <td class="even"><{$user_occupation}></td> - </tr> - <{/if}> - <{if $user_interest}> - <tr class="aligntop"> - <td class="head"><{$lang_interest}></td> - <td class="odd"><{$user_interest}></td> - </tr> - <{/if}> - <{if $user_extrainfo}> - <tr class="aligntop"> - <td class="head"><{$lang_extrainfo}></td> - <td class="even"><{$user_extrainfo}></td> - </tr> - <{/if}> - </table> - </td> - <td class="width50"> - <table class="outer width100" cellpadding="4" cellspacing="1"> - <tr class="aligntop"> - <th class="txtcenter" colspan="2"><{$lang_statistics}></th> - </tr> - <tr class="aligntop"> - <td class="head"><{$lang_membersince}></td> - <td class="even txtcenter"><{$user_joindate}></td> - </tr> - <tr class="aligntop"> - <td class="head"><{$lang_rank}></td> - <td class="odd txtcenter"><{$user_rankimage}><br /><{$user_ranktitle}></td> - </tr> - <tr class="aligntop"> - <td class="head"><{$lang_posts}></td> - <td class="even txtcenter"><{$user_posts}></td> - </tr> - <tr class="aligntop"> - <td class="head"><{$lang_lastlogin}></td> - <td class="odd center"><{$user_lastlogin}></td> - </tr> - </table> - <{if $user_signature}> - <br /> - <table class="outer width100" cellpadding="4" cellspacing="1"> - <tr class="aligntop"> - <th colspan="2" class="txtcenter"><{$lang_signature}></th> - </tr> - <tr class="aligntop"> - <td class="even"><{$user_signature}></td> - </tr> - </table> - <{/if}> - </td> - </tr> -</table> - + <{/if}> + <{if $user_email}> + <tr> + <td><{$lang_email}></td> + <td><{$user_email}></td> + </tr> + <{/if}> + <{if !$user_ownpage == true}> + <tr> + <td><{$lang_privmsg}></td> + <td><{$user_pmlink}></td> + </tr> + <{/if}> + <{if $user_icq}> + <tr> + <td><{$lang_icq}></td> + <td><{$user_icq}></td> + </tr> + <{/if}> + <{if $user_aim}> + <tr> + <td><{$lang_aim}></td> + <td><{$user_aim}></td> + </tr> + <{/if}> + <{if $user_yim}> + <tr> + <td><{$lang_yim}></td> + <td><{$user_yim}></td> + </tr> + <{/if}> + <{if $user_msnm}> + <tr> + <td><{$lang_msnm}></td> + <td><{$user_msnm}></td> + </tr> + <{/if}> + <{if $user_location}> + <tr> + <td><{$lang_location}></td> + <td><{$user_location}></td> + </tr> + <{/if}> + <{if $user_occupation}> + <tr> + <td><{$lang_occupation}></td> + <td><{$user_occupation}></td> + </tr> + <{/if}> + <{if $user_interest}> + <tr> + <td><{$lang_interest}></td> + <td><{$user_interest}></td> + </tr> + <{/if}> + <{if $user_extrainfo}> + <tr> + <td><{$lang_extrainfo}></td> + <td><{$user_extrainfo}></td> + </tr> + <{/if}> + </tbody> + </table> + </div> + <div class="tab-pane" id="tab2"> + <table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th colspan="2"><{$lang_statistics}></th> + </tr> + </thead> + <tbody> + <tr> + <td><{$lang_membersince}></td> + <td><{$user_joindate}></td> + </tr> + <tr> + <td><{$lang_rank}></td> + <td><{$user_rankimage}><br /><{$user_ranktitle}></td> + </tr> + <tr> + <td><{$lang_posts}></td> + <td><{$user_posts}></td> + </tr> + <tr> + <td><{$lang_lastlogin}></td> + <td><{$user_lastlogin}></td> + </tr> + </tbody> + </table> + <{if $user_signature}> + <table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th colspan="2"><{$lang_signature}></th> + </tr> + </thead> + <tbody> + <tr> + <td><{$user_signature}></td> + </tr> + </tbody> + </table> + <{/if}> + </div> + </div> +</div> +<{if $modules}> +<hr /> <!-- start module search results loop --> +<ul class="nav nav-list"> <{foreach item=module from=$modules}> - -<br class="clear" /> -<h4><{$module.name}></h4> - - <!-- start results item loop --> - <{foreach item=result from=$module.results}> - - <img src="<{$result.image}>" alt="<{$module.name}>" /><strong><a href="<{$result.link}>" title="<{$result.title}>"><{$result.title}></a></strong><br /><span class="x-small">(<{$result.time}>)</span><br /> - - <{/foreach}> - <!-- end results item loop --> - -<{$module.showall_link}> - - + <li class="nav-header"> + <{$module.name}> + </li> + <!-- start results item loop --> + <{foreach item=result from=$module.results}> + <li> + <img src="<{$result.image}>" alt="<{$module.name}>" /> + <strong><a href="<{$result.link}>" title="<{$result.title}>"><{$result.title}></a></strong><br /> + <span class="x-small">(<{$result.time}>)</span> + </li> + <{/foreach}> + <!-- end results item loop --> + <li><{$module.showall_link}></li> <{/foreach}> -<!-- end module search results loop --> \ No newline at end of file +</ul> +<!-- end module search results loop --> +<{/if}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-07-09 19:34:57 UTC (rev 9829) @@ -39,7 +39,7 @@ $xoops->theme->addStylesheet('media/xoops/css/moduladmin.css'); $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css'); - $xoops->theme->addStylesheet($xoops->url('/media/bootstrap/css/bootstrap.min.css')); + $xoops->theme->addStylesheet($xoops->url('/media/bootstrap/css/xoops.bootstrap.css')); $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php 2012-07-09 19:34:57 UTC (rev 9829) @@ -29,6 +29,7 @@ define("_DEFAULT_SYSTEM_EXTENSION","System extensions"); define("_DEFAULT_INSTALLEDMODULES","Installed modules"); define("_DEFAULT_INSTALLEDEXTENSIONS","Installed extensions"); +define("_DEFAULT_NO_MODULE", "There is no modules installed actually"); define("_DEFAULT_XOOPSTHEMES","XOOPS Themes"); define("_DEFAULT_XOOPSMODULES","XOOPS Modules"); @@ -77,4 +78,3 @@ define("_DEFAULT_HELP_DESC_2",'Blocks are discreet sections of content that can be created and configured in the admin interface. Custom blocks can be created and are typically made up of text, graphics and pictures. The content in these blocks may be formatted individually or inherit the site formatting. (<a href="modules/system/help.php?mid=1&page=blocksadmin">more ...</a>)'); define("_DEFAULT_HELP_3","How I can find more help?"); define("_DEFAULT_HELP_DESC_3",'If you need more help and information to using XOOPS you can use <a href="modules/system/help.php">Help pages </a> in system module or use <a href="http://www.xoops.org" rel="external">XOOPS Local support sites </a>'); -?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/dashboard.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/dashboard.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/dashboard.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -63,6 +63,7 @@ <a class="down" href="javascript:;"> </a> </div> <div class="xo-window-data"> + <{if count($module_menu) > 1 }> <table class="condensed-table"> <{foreach item=mod_list from=$module_menu}> <{if $mod_list->getInfo(dirname) != 'system'}> @@ -73,6 +74,12 @@ <{/if}> <{/foreach}> </table> + <{else}> + <div class="alert alert-info"> + <i class="ico-information"></i> + <{$smarty.const._DEFAULT_NO_MODULE}> + </div> + <{/if}> <div class="mod-link"> <div class="pull-right"> <a class="btn btn-mini btn-info" href="<{xoAppUrl modules/system/admin.php?fct=modulesadmin}>"> @@ -102,6 +109,7 @@ <td><a href="<{$plug_list->getInfo('link_admin')}>"><{$plug_list->getInfo(name)}></a> </td> </tr> + <{assign var=have-plugins value=true}> <{/if}> <{/foreach}> </table> Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_redirect.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_redirect.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_redirect.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -1,55 +0,0 @@ -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>"> -<head> -<!-- title and metas --> -<title><{if $xoops_pagetitle !=''}><{$xoops_pagetitle}> : <{/if}><{$xoops_sitename}></title> -<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" /> -<meta name="robots" content="<{$xoops_meta_robots}>" /> -<meta name="keywords" content="<{$xoops_meta_keywords}>" /> -<meta name="description" content="<{$xoops_meta_description}>" /> -<meta name="rating" content="<{$xoops_meta_rating}>" /> -<meta name="author" content="<{$xoops_meta_author}>" /> -<meta name="copyright" content="<{$xoops_meta_copyright}>" /> -<meta name="generator" content="XOOPS" /> -<{if $url}> - <meta http-equiv="Refresh" content="<{$time}>; url=<{$url}>" /> -<{/if}> - -<!-- Force MSIE without javascript actived to take the default theme. not conforms to the standards but functional --> -<{if $isMsie}> - <noscript> - <meta http-equiv="refresh" content="0; url=<{xoAppUrl . xoops_theme_select=default}>" /> - </noscript> -<{/if}> - -<!-- path favicon --> -<link rel="shortcut icon" type="image/ico" href="<{xoImgUrl icons/favicon.ico}>" /> -<link rel="icon" type="image/png" href="<{xoImgUrl icons/favicon.png}>" /> - -<!-- include xoops.js and others via header.php --> -<{$xoops_module_header}> - -<!-- Xoops style sheet --> -<link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl xoops.css}>" /> - -<!-- Theme style sheets --> -<link rel="stylesheet" type="text/css" media="screen" title="Color" href="<{xoImgUrl style.css}>" /> - -</head> -<body id="xo-refresh"> -<div id="xo-wrapper" class="container center"> - <div id="xo-redirect"> - <div class="message"> - <{$message}> - <br /> - <img src="<{xoImgUrl icons/ajax_indicator_01.gif}>" alt="<{$message}>"/> - </div> - <div class="notreload"> - <{$lang_ifnotreload}> - </div> - <{if $xoops_logdump != ''}><div><{$xoops_logdump}></div><{/if}> - </div> -</div> - -</body> -</html> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_siteclosed.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_siteclosed.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/modules/system/system_siteclosed.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -1,92 +0,0 @@ -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>"> -<head> - <!-- title and metas --> - <title><{if $xoops_pagetitle !=''}><{$xoops_pagetitle}> : <{/if}><{$xoops_sitename}></title> - <meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" /> - <meta name="robots" content="<{$xoops_meta_robots}>" /> - <meta name="keywords" content="<{$xoops_meta_keywords}>" /> - <meta name="description" content="<{$xoops_meta_description}>" /> - <meta name="rating" content="<{$xoops_meta_rating}>" /> - <meta name="author" content="<{$xoops_meta_author}>" /> - <meta name="copyright" content="<{$xoops_meta_copyright}>" /> - <meta name="generator" content="XOOPS" /> - <{if $url}> - <meta http-equiv="Refresh" content="<{$time}>; url=<{$url}>" /> - <{/if}> - - <!-- Force MSIE without javascript actived to take the default theme. not conforms to the standards but functional --> - <{if $isMsie}> - <noscript> - <meta http-equiv="refresh" content="0; url=<{xoAppUrl . xoops_theme_select=default}>" /> - </noscript> - <{/if}> - - <!-- path favicon --> - <link rel="shortcut icon" type="image/ico" href="<{xoImgUrl icons/favicon.ico}>" /> - <link rel="icon" type="image/png" href="<{xoImgUrl icons/favicon.png}>" /> - - <!-- include xoops.js and others via header.php --> - <{$xoops_module_header}> - - <!-- Xoops style sheet --> - <link rel="stylesheet" type="text/css" media="screen" href="<{xoAppUrl xoops.css}>" /> - - <!-- Theme style sheets --> - <link rel="stylesheet" type="text/css" media="screen" title="Color" href="<{xoImgUrl style.css}>" /> -</head> -<body> - -<div id="xo-canvas"<{if $columns_layout}> class="<{$columns_layout}>"<{/if}>> - <div class="xo-wrapper"> - <div id="xo-bgstatic" class="<{$xoops_dirname}>"></div> - <div id="xo-header" class="<{$xoops_dirname}>"> - <div id="xo-top"> - <!-- include du bloc Utilisateur dans le header --> - </div> - <!-- Start Header --> - <table cellspacing="0"> - <tr id="header"> - <td id="headerlogo"><a href="<{xoAppUrl /}>" title="<{$xoops_sitename}>"><img src="<{xoImgUrl xoops-logo.png}>" alt="<{$xoops_sitename}>" /></a></td> - <td id="headerbanner"><{$xoops_banner}></td> - <td id="xo-userbar_siteclosed"> - <!-- menu in anonymous mode --> - <form method="post" action="<{xoAppUrl /user.php op=login}>"> - <input name="uname" type="text" title="" /> - <input name="pass" type="password" title=""/> - <input type="hidden" name="xoops_redirect" value="<{$smarty.server.REQUEST_URI}>" /> - <{if $lang_siteclosemsg}> - <input type="hidden" name="xoops_login" value="1" /> - <{/if}> - <input type="hidden" name="op" value="login" /> - <input type="submit" value="<{$lang_login}>" /> - </form> - </td> - </tr> - <tr> - <td id="headerbar" colspan="3"> </td> - </tr> - </table> - <!-- End header --> - </div> - - <div id="xo-canvas-content"> - <div id="xo-page"> - <div id="xo-siteclose"><{$lang_siteclosemsg}></div> - </div> - </div> - - <!-- Start footer --> - <table cellspacing="0"> - <tr id="footerbar"> - <td><{$xoops_footer}></td> - </tr> - </table> - <!-- End footer --> - - <!--{xo-logger-output}--> - </div> -</div> - -</body> -</html> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -90,6 +90,7 @@ </div> <!-- End content module --> <{/if}> + <{if $xoBlocks.page_bottomleft or $xoBlocks.page_bottomcenter or $xoBlocks.page_bottomright}> <div class="row"> <div class="span<{$col_span}> xo-bottom"> <div class="row"> @@ -104,7 +105,7 @@ <div class="row"> <div class="span<{$col_span_mid}> xo-left"> <!-- Start center-left blocks loop --> - <{foreach item=block from=$xoBlocks.page_bottomright}> + <{foreach item=block from=$xoBlocks.page_bottomleft}> <{includeq file="$theme_tpl/block_center_l.html"}> <{/foreach}> <!-- End center-left blocks loop --> @@ -120,6 +121,7 @@ </div> </div> </div> + <{/if}> </div> <{if $xoops_showrblock}> <div class="span3 xo-block-right"> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/xotpl/theme_user.html 2012-07-09 19:34:57 UTC (rev 9829) @@ -16,7 +16,7 @@ <ul class="dropdown-menu"> <{if $xoops_isadmin}> <li> - <a href="<{xoAppUrl admin.php}>" title="<{$smarty.const._THEME_ADMIN}>"> + <a href="<{xoAppUrl admin.php}>" title="<{$smarty.const._THEME_ADMIN}>" rel="external"> <i class="icon-wrench"></i> <{$smarty.const._THEME_ADMIN}> </a> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops.css 2012-07-09 17:20:33 UTC (rev 9828) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops.css 2012-07-09 19:34:57 UTC (rev 9829) @@ -368,7 +368,7 @@ box-shadow: 0 0 20px #787878; -webkit-box-shadow:0 0 20px #787878; -moz-box-shadow:0 0 20px #787878; - filter:progid:DXImageTransform.Microsoft.Shadow(color='#bbbbbb', Direction=135, Strength=5); + filter:progid:DXImageTransform.Microsoft.Shadow(color='#bbbbbb', Direction=135, Strength=5); zoom: 1; } .boxrelief { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ari...@us...> - 2012-07-14 07:47:34
|
Revision: 9866 http://xoops.svn.sourceforge.net/xoops/?rev=9866&view=rev Author: arion92fr Date: 2012-07-14 07:47:27 +0000 (Sat, 14 Jul 2012) Log Message: ----------- (theme)/theme_onload.php before Instanciating of plugins and modules Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme_onload.php Property Changed: ---------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-07-13 21:29:20 UTC (rev 9865) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-07-14 07:47:27 UTC (rev 9866) @@ -1,870 +1,875 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * XoopsTheme component class file - * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @author Skalpa Keo <sk...@xo...> - * @author Taiwen Jiang <ph...@us...> - * @since 2.3.0 - * @package class - * @version $Id$ - */ - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -/** - * XoopsThemeFactory - * - * @author Skalpa Keo - * @since 2.3.0 - */ -class XoopsThemeFactory -{ - /** - * @var string - */ - public $xoBundleIdentifier = 'XoopsThemeFactory'; - - /** - * Currently enabled themes (if empty, all the themes in themes/ are allowed) - * - * @var array - */ - public $allowedThemes = array(); - - /** - * Default theme to instantiate if none specified - * - * @var string - */ - public $defaultTheme = 'default'; - - /** - * If users are allowed to choose a custom theme - * - * @var bool - */ - public $allowUserSelection = true; - - /** - * Instantiate the specified theme - * - * @param array $options - * - * @return null|XoopsTheme - */ - public function createInstance($options = array()) - { - $xoops = Xoops::getInstance(); - // Grab the theme folder from request vars if present - if (empty($options['folderName'])) { - if (($req = @$_REQUEST['xoops_theme_select']) && $this->isThemeAllowed($req)) { - $options['folderName'] = $req; - if (isset($_SESSION) && $this->allowUserSelection) { - $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req; - } - } else { - if (isset($_SESSION[$this->xoBundleIdentifier]['defaultTheme'])) { - $options['folderName'] = $_SESSION[$this->xoBundleIdentifier]['defaultTheme']; - } else { - if (empty($options['folderName']) || !$this->isThemeAllowed($options['folderName'])) { - $options['folderName'] = $this->defaultTheme; - } - } - } - $xoops->setConfig('theme_set', $options['folderName']); - } - $options['path'] = XOOPS_THEME_PATH . '/' . $options['folderName']; - $inst = null; - $inst = new XoopsTheme(); - foreach ($options as $k => $v) { - $inst->$k = $v; - } - $inst->xoInit(); - return $inst; - } - - /** - * Checks if the specified theme is enabled or not - * - * @param string $name - * - * @return bool - */ - public function isThemeAllowed($name) - { - return (empty($this->allowedThemes) || in_array($name, $this->allowedThemes)); - } -} - -/** - * XoopsAdminThemeFactory - * - * @author Andricq Nicolas (AKA MusS) - * @author trabis - * @since 2.4.0 - */ -class XoopsAdminThemeFactory extends XoopsThemeFactory -{ - public function createInstance($options = array()) - { - $options["plugins"] = array(); - $options['renderBanner'] = false; - $inst = parent::createInstance($options); - $inst->path = XOOPS_ADMINTHEME_PATH . '/' . $inst->folderName; - $inst->url = XOOPS_ADMINTHEME_URL . '/' . $inst->folderName; - $inst->template->assign(array( - 'theme_path' => $inst->path, - 'theme_tpl' => $inst->path . '/xotpl', - 'theme_url' => $inst->url, - 'theme_img' => $inst->url . '/img', - 'theme_icons' => $inst->url . '/icons', - 'theme_css' => $inst->url . '/css', - 'theme_js' => $inst->url . '/js', - 'theme_lang' => $inst->url . '/language', - )); - - return $inst; - } -} - -class XoopsTheme -{ - /** - * Should we render banner? Not for redirect pages or admin side - * - * @var bool - */ - public $renderBanner = true; - - /** - * The name of this theme - * - * @var string - */ - public $folderName = ''; - - /** - * Physical path of this theme folder - * - * @var string - */ - public $path = ''; - - /** - * @var string - */ - public $url = ''; - - /** - * Whether or not the theme engine should include the output generated by php - * - * @var string - */ - public $bufferOutput = true; - - /** - * Canvas-level template to use - * - * @var string - */ - public $canvasTemplate = 'theme.html'; - - /** - * Theme folder path - * - * @var string - */ - public $themesPath = 'themes'; - - /** - * Content-level template to use - * - * @var string - */ - public $contentTemplate = ''; - - /** - * @var int - */ - public $contentCacheLifetime = 0; - - /** - * @var string - */ - public $contentCacheId = null; - - /** - * Text content to display right after the contentTemplate output - * - * @var string - */ - public $content = ''; - - /** - * Page construction plug-ins to use - * - * @var array - * @access public - */ - public $plugins = array('XoopsThemeBlocksPlugin'); - - /** - * @var int - */ - public $renderCount = 0; - - /** - * Pointer to the theme template engine - * - * @var XoopsTpl - */ - public $template = false; - - /** - * Array containing the document meta-information - * - * @var array - */ - public $metas = array( - 'meta' => array(), - 'link' => array(), - 'script' => array() - ); - - /** - * Array of strings to be inserted in the head tag of HTML documents - * - * @var array - */ - public $htmlHeadStrings = array(); - - /** - * Custom variables that will always be assigned to the template - * - * @var array - */ - public $templateVars = array(); - - /** - * User extra information for cache id, like language, user groups - * - * @var boolean - */ - public $use_extra_cache_id = true; - - /** - * Engine used for caching headers information - * Default is 'file', you can choose 'model' for database storage - * or any other cache engine available in the class/cache folder - * - * @var boolean - */ - public $headersCacheEngine = 'file'; - - /** - * *#@- - */ - - /** - * *#@+ - * @tasktype 10 Initialization - */ - /** - * Initializes this theme - * Upon initialization, the theme creates its template engine and instanciates the - * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not - * display redirection messages, the HTTP redirections system is disabled to ensure users will - * see the redirection screen. - * - * @return bool - */ - public function xoInit() - { - $xoops = Xoops::getInstance(); - $this->path = XOOPS_THEME_PATH . '/' . $this->folderName; - $this->url = XOOPS_THEME_URL . '/' . $this->folderName; - $this->template = null; - $this->template = new XoopsTpl(); - $this->template->currentTheme = $this; - $this->template->assign_by_ref('xoTheme', $this); - $this->template->assign(array( - 'xoops_theme' => $xoops->getConfig('theme_set'), - 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/', - 'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')), - 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), - 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), - 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), - 'xoops_dirname' => $xoops->moduleDirname, - 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', - 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) - )); - $this->template->assign(array( - 'theme_path' => $this->path, - 'theme_tpl' => $this->path . '/xotpl', - 'theme_url' => $this->url, - 'theme_img' => $this->url . '/img', - 'theme_icons' => $this->url . '/icons', - 'theme_css' => $this->url . '/css', - 'theme_js' => $this->url . '/js', - 'theme_lang' => $this->url . '/language', - )); - - if ($xoops->isUser()) { - $this->template->assign(array( - 'xoops_isuser' => true, - 'xoops_avatar' => XOOPS_UPLOAD_URL . "/" . $xoops->user->getVar('user_avatar'), - 'xoops_userid' => $xoops->user->getVar('uid'), - 'xoops_uname' => $xoops->user->getVar('uname'), - 'xoops_name' => $xoops->user->getVar('name'), - 'xoops_isadmin' => $xoops->isAdmin(), - 'xoops_usergroups' => $xoops->user->getGroups() - )); - } else { - $this->template->assign(array( - 'xoops_isuser' => false, - 'xoops_isadmin' => false, - 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS) - )); - } - - // Meta tags - $config_handler = $xoops->getHandlerConfig(); - $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); - $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); - $config = $config_handler->getConfigs($criteria, true); - foreach (array_keys($config) as $i) { - $name = $config[$i]->getVar('conf_name', 'n'); - $value = $config[$i]->getVar('conf_value', 'n'); - if (substr($name, 0, 5) == 'meta_') { - $this->addMeta('meta', substr($name, 5), $value); - } else { - // prefix each tag with 'xoops_' - $this->template->assign("xoops_$name", $value); - } - } - // Load global javascript - $this->addScript('include/xoops.js'); - $this->loadLocalization(); - - if ($this->bufferOutput) { - ob_start(); - } - $xoops->theme = $this; - $xoops->tpl = $this->template; - $GLOBALS['xoTheme'] =& $xoops->theme; - $GLOBALS['xoopsTpl'] =& $xoops->tpl; - - // Instanciate and initialize all the theme plugins - foreach ($this->plugins as $k => $bundleId) { - if (!is_object($bundleId)) { - /* @var $plugin XoopsThemePlugin */ - $plugin = new $bundleId(); - $plugin->theme = $this; - $plugin->xoInit(); - - $this->plugins[$bundleId] = null; - $this->plugins[$bundleId] = $plugin; - unset($this->plugins[$k]); - } - } - return true; - } - - /** - * Generate cache id based on extra information of language and user groups - * User groups other than anonymous should be detected to avoid disclosing group sensitive contents - * - * @param string $cache_id raw cache id - * @param string $extraString extra string - * - * @return string complete cache id - */ - function generateCacheId($cache_id, $extraString = '') - { - $xoops = Xoops::getInstance(); - static $extra_string; - if (!$this->use_extra_cache_id) { - return $cache_id; - } - - if (empty($extraString)) { - if (empty($extra_string)) { - // Generate language section - $extra_string = $xoops->getConfig('language'); - // Generate group section - if (!$xoops->isUser()) { - $extra_string .= '-' . XOOPS_GROUP_ANONYMOUS; - } else { - $groups = $xoops->user->getGroups(); - sort($groups); - // Generate group string for non-anonymous groups, - // XOOPS_DB_PASS and XOOPS_DB_NAME (before we find better variables) are used to protect group sensitive contents - $extra_string .= '-' . substr(md5(implode('-', $groups)), 0, 8) . '-' . substr(md5(XOOPS_DB_PASS . XOOPS_DB_NAME . XOOPS_DB_USER), 0, 8); - } - } - $extraString = $extra_string; - } - $cache_id .= '-' . $extraString; - return $cache_id; - } - - /** - * XoopsTheme::checkCache() - * - * @return bool - */ - public function checkCache() - { - if ($_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime) { - $template = $this->contentTemplate ? $this->contentTemplate : 'module:system|system_dummy.html'; - $this->template->caching = 2; - $this->template->cache_lifetime = $this->contentCacheLifetime; - $uri = str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']); - // Clean uri by removing session id - if (defined('SID') && SID && strpos($uri, SID)) { - $uri = preg_replace("/([\?&])(" . SID . "$|" . SID . "&)/", "\\1", $uri); - } - $this->contentCacheId = $this->generateCacheId('page_' . substr(md5($uri), 0, 8)); - if ($this->template->is_cached($template, $this->contentCacheId)) { - XoopsLogger::getInstance() - ->addExtra($template, sprintf('Cached (regenerates every %d seconds)', $this->contentCacheLifetime)); - $this->render(null, null, $template); - return true; - } - } - return false; - } - - /** - * Render the page - * The theme engine builds pages from 2 templates: canvas and content. - * A module can call this method directly and specify what templates the theme engine must use. - * If render() hasn't been called before, the theme defaults will be used for the canvas and - * page template (and xoopsOption['template_main'] for the content). - * - * @param string $canvasTpl The canvas template, if different from the theme default - * @param string $pageTpl The page template, if different from the theme default (unsupported, 2.3+ only) - * @param string $contentTpl The content template - * @param array $vars Template variables to send to the template engine - * - * @return bool - */ - public function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array()) - { - if ($this->renderCount) { - return false; - } - $xoops = Xoops::getInstance(); - $xoops->logger->startTime('Page rendering'); - - $cache = XoopsCache::getInstance(); - - //Get meta information for cached pages - if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId, $this->headersCacheEngine)) { - //we need to merge metas set by blocks with the module cached meta - $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']); - foreach ($content['metas'] as $type => $value) { - $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]); - } - $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']); - $xoops->setOption('xoops_module_header', $content['header']); - } - - if ($xoops->getOption('xoops_pagetitle')) { - $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle')); - } - $header = !$xoops->getOption('xoops_module_header') ? $this->template->get_template_vars('xoops_module_header') : $xoops->getOption('xoops_module_header'); - - //save meta information of cached pages - if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) { - $content['htmlHeadStrings'] = (array)$this->htmlHeadStrings; - $content['metas'] = (array)$this->metas; - $content['xoops_pagetitle'] = $this->template->get_template_vars('xoops_pagetitle'); - $content['header'] = $header; - $cache = XoopsCache::getInstance(); - $cache->write($this->contentCacheId, $content, $this->headersCacheEngine); - } - - // @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice - $old = array('robots', 'keywords', 'description', 'rating', 'author', 'copyright'); - foreach ($this->metas['meta'] as $name => $value) { - if (in_array($name, $old)) { - $this->template->assign("xoops_meta_$name", htmlspecialchars($value, ENT_QUOTES)); - unset($this->metas['meta'][$name]); - } - } - - // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and $this->template->get_template_vars( 'xoops_module_header' ) ? - $this->template->assign('xoops_module_header', $this->renderMetas(null, true) . "\n" . $header); - - if ($canvasTpl) { - $this->canvasTemplate = $canvasTpl; - } - if ($contentTpl) { - $this->contentTemplate = $contentTpl; - } - if (!empty($vars)) { - $this->template->assign($vars); - } - if ($this->contentTemplate) { - $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId); - } - if ($this->bufferOutput) { - $this->content .= ob_get_contents(); - ob_end_clean(); - } - - $this->template->assign_by_ref('xoops_contents', $this->content); - - // Do not cache the main (theme.html) template output - $this->template->caching = 0; - $this->template->display($this->path . '/' . $this->canvasTemplate); - $this->renderCount++; - $xoops->logger->stopTime('Page rendering'); - return true; - } - - /** - * Load localization information - * Folder structure for localization: - * <ul>themes/themefolder/english - * <li>main.php - language definitions</li> - * <li>style.css - localization stylesheet</li> - * <li>script.js - localization script</li> - * </ul> - * - * @param string $type - * - * @return bool - */ - public function loadLocalization($type = "main") - { - $xoops = Xoops::getInstance(); - $language = $xoops->getConfig('language'); - // Load global localization stylesheet if available - if (file_exists($xoops->path('language/' . $language . '/style.css'))) { - $this->addStylesheet($xoops->url('language/' . $language . '/style.css')); - } - $this->addLanguage($type); - // Load theme localization stylesheet and scripts if available - if (file_exists($this->path . '/language/' . $language . '/script.js')) { - $this->addScript($this->url . '/language/' . $language . '/script.js'); - } - if (file_exists($this->path . '/language/' . $language . '/style.css')) { - $this->addStylesheet($this->url . '/language/' . $language . '/style.css'); - } - return true; - } - - /** - * Load theme specific language constants - * - * @param string $type language type, like 'main', 'admin'; Needs to be declared in theme xo-info.php - * @param string $language specific language - * - * @return bool|mixed - */ - public function addLanguage($type = "main", $language = null) - { - $xoops = Xoops::getInstance(); - $language = is_null($language) ? $xoops->getConfig('language') : $language; - if (!file_exists($file = $xoops->path($this->resourcePath("/language/{$language}/{$type}.php")))) { - if (!file_exists($file = $xoops->path($this->resourcePath("/language/english/{$type}.php")))) { - return false; - } - } - $ret = include_once $file; - return $ret; - } - - /** - * *#@+ - * @tasktype 20 Manipulating page meta-information - */ - /** - * Adds script code to the document head - * This methods allows the insertion of an external script file (if $src is provided), or - * of a script snippet. The file URI is parsed to take benefit of the theme resource - * overloading system. - * The $attributes parameter allows you to specify the attributes that will be added to the - * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to - * 'text/javascript'. - * <code> - * // Add an external script using a physical path - * $theme->addScript( 'www/script.js', null, '' ); - * $theme->addScript( 'modules/newbb/script.js', null, '' ); - * // Specify attributes for the <script> tag - * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' ); - * // Insert a code snippet - * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' ); - * </code> - * - * @param string $src path to an external script file - * @param array $attributes hash of attributes to add to the <script> tag - * @param string $content Code snippet to output within the <script> tag - * - * @return void - */ - public function addScript($src = '', $attributes = array(), $content = '') - { - $xoops = Xoops::getInstance(); - if (empty($attributes)) { - $attributes = array(); - } - if (!empty($src)) { - $src = $xoops->url($this->resourcePath($src)); - $attributes['src'] = $src; - } - if (!empty($content)) { - $attributes['_'] = $content; - } - if (!isset($attributes['type'])) { - $attributes['type'] = 'text/javascript'; - } - $this->addMeta('script', $src, $attributes); - } - - /** - * Add StyleSheet or CSS code to the document head - * - * @param string|null $src path to .css file - * @param array|null $attributes name => value paired array of attributes such as title - * @param string $content CSS code to output between the <style> tags (in case $src is empty) - * - * @return void - */ - public function addStylesheet($src = '', $attributes = array(), $content = '') - { - $xoops = Xoops::getInstance(); - if (empty($attributes)) { - $attributes = array(); - } - if (!empty($src)) { - $src = $xoops->url($this->resourcePath($src)); - $attributes['href'] = $src; - } - if (!isset($attributes['type'])) { - $attributes['type'] = 'text/css'; - } - if (!empty($content)) { - $attributes['_'] = $content; - } - $this->addMeta('stylesheet', $src, $attributes); - } - - /** - * Add a <link> to the header - * - * @param string $rel Relationship from the current doc to the anchored one - * @param string $href URI of the anchored document - * @param array $attributes Additional attributes to add to the <link> element - */ - public function addLink($rel, $href = '', $attributes = array()) - { - if (empty($attributes)) { - $attributes = array(); - } - if (!empty($href)) { - $attributes['href'] = $href; - } - $attributes['rel'] = $rel; - $this->addMeta('link', '', $attributes); - } - - /** - * Set a meta http-equiv value - * - * @param string $name - * @param null $value - * - * @return bool|string - */ - public function addHttpMeta($name, $value = null) - { - if (isset($value)) { - return $this->addMeta('http', $name, $value); - } - unset($this->metas['http'][$name]); - return false; - } - - /** - * Change output page meta-information - * - * @param string $type - * @param string $name - * @param string $value - * - * @return string - */ - public function addMeta($type = 'meta', $name = '', $value = '') - { - if (!isset($this->metas[$type])) { - $this->metas[$type] = array(); - } - if (!empty($name)) { - $this->metas[$type][$name] = $value; - } else { - $this->metas[$type][md5(serialize(array($value)))] = $value; - } - return $value; - } - - /** - * XoopsTheme::headContent() - * - * @param $params - * @param $content - * @param $smarty - * @param $repeat - * - * @return void - */ - public function headContent($params, $content, &$smarty, &$repeat) - { - if (!$repeat) { - $this->htmlHeadStrings[] = $content; - } - } - - /** - * XoopsTheme::renderMetas() - * - * @param null $type - * @param bool|string $return - * - * @return bool|string - */ - public function renderMetas($type = null, $return = false) - { - $str = ''; - if (!isset($type)) { - foreach (array_keys($this->metas) as $type) { - $str .= $this->renderMetas($type, true); - } - $str .= implode("\n", $this->htmlHeadStrings); - } else { - switch ($type) { - case 'script': - foreach ($this->metas[$type] as $attrs) { - $str .= "<script" . $this->renderAttributes($attrs) . ">"; - if (@$attrs['_']) { - $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>"; - } - $str .= "</script>\n"; - } - break; - case 'link': - foreach ($this->metas[$type] as $attrs) { - $rel = $attrs['rel']; - unset($attrs['rel']); - $str .= '<link rel="' . $rel . '"' . $this->renderAttributes($attrs) . " />\n"; - } - break; - case 'stylesheet': - foreach ($this->metas[$type] as $attrs) { - if (@$attrs['_']) { - $str .= '<style' . $this->renderAttributes($attrs) . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>"; - } else { - $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n"; - } - } - break; - case 'http': - foreach ($this->metas[$type] as $name => $content) { - $str .= '<meta http-equiv="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; - } - break; - default: - foreach ($this->metas[$type] as $name => $content) { - $str .= '<meta name="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; - } - break; - } - } - if ($return) { - return $str; - } - echo $str; - return true; - } - - /** - * Generates a unique element ID - * - * @param string $tagName - * - * @return string - */ - public function genElementId($tagName = 'xos') - { - static $cache = array(); - if (!isset($cache[$tagName])) { - $cache[$tagName] = 1; - } - return $tagName . '-' . $cache[$tagName]++; - } - - /** - * Transform an attributes collection to an XML string - * - * @param array $coll - * - * @return string - */ - public function renderAttributes($coll) - { - $str = ''; - foreach ($coll as $name => $val) { - if ($name != '_') { - $str .= ' ' . $name . '="' . htmlspecialchars($val, ENT_QUOTES) . '"'; - } - } - return $str; - } - - /** - * Return a themable file resource path - * - * @param string $path - * - * @return string - */ - public function resourcePath($path) - { - if (substr($path, 0, 1) == '/') { - $path = substr($path, 1); - } - - if (file_exists(XOOPS_ROOT_PATH . "/{$this->themesPath}/{$this->folderName}/{$path}")) { - return "{$this->themesPath}/{$this->folderName}/{$path}"; - } - - if (file_exists(XOOPS_ROOT_PATH . "/themes/{$this->folderName}/{$path}")) { - return "themes/{$this->folderName}/{$path}"; - } - return $path; - } -} - -abstract class XoopsThemePlugin -{ - /** - * @var XoopsTheme - */ - public $theme = false; - - abstract function xoInit(); +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XoopsTheme component class file + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Skalpa Keo <sk...@xo...> + * @author Taiwen Jiang <ph...@us...> + * @since 2.3.0 + * @package class + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * XoopsThemeFactory + * + * @author Skalpa Keo + * @since 2.3.0 + */ +class XoopsThemeFactory +{ + /** + * @var string + */ + public $xoBundleIdentifier = 'XoopsThemeFactory'; + + /** + * Currently enabled themes (if empty, all the themes in themes/ are allowed) + * + * @var array + */ + public $allowedThemes = array(); + + /** + * Default theme to instantiate if none specified + * + * @var string + */ + public $defaultTheme = 'default'; + + /** + * If users are allowed to choose a custom theme + * + * @var bool + */ + public $allowUserSelection = true; + + /** + * Instantiate the specified theme + * + * @param array $options + * + * @return null|XoopsTheme + */ + public function createInstance($options = array()) + { + $xoops = Xoops::getInstance(); + // Grab the theme folder from request vars if present + if (empty($options['folderName'])) { + if (($req = @$_REQUEST['xoops_theme_select']) && $this->isThemeAllowed($req)) { + $options['folderName'] = $req; + if (isset($_SESSION) && $this->allowUserSelection) { + $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req; + } + } else { + if (isset($_SESSION[$this->xoBundleIdentifier]['defaultTheme'])) { + $options['folderName'] = $_SESSION[$this->xoBundleIdentifier]['defaultTheme']; + } else { + if (empty($options['folderName']) || !$this->isThemeAllowed($options['folderName'])) { + $options['folderName'] = $this->defaultTheme; + } + } + } + $xoops->setConfig('theme_set', $options['folderName']); + } + $options['path'] = XOOPS_THEME_PATH . '/' . $options['folderName']; + $inst = null; + $inst = new XoopsTheme(); + foreach ($options as $k => $v) { + $inst->$k = $v; + } + $inst->xoInit(); + return $inst; + } + + /** + * Checks if the specified theme is enabled or not + * + * @param string $name + * + * @return bool + */ + public function isThemeAllowed($name) + { + return (empty($this->allowedThemes) || in_array($name, $this->allowedThemes)); + } +} + +/** + * XoopsAdminThemeFactory + * + * @author Andricq Nicolas (AKA MusS) + * @author trabis + * @since 2.4.0 + */ +class XoopsAdminThemeFactory extends XoopsThemeFactory +{ + public function createInstance($options = array()) + { + $options["plugins"] = array(); + $options['renderBanner'] = false; + $inst = parent::createInstance($options); + $inst->path = XOOPS_ADMINTHEME_PATH . '/' . $inst->folderName; + $inst->url = XOOPS_ADMINTHEME_URL . '/' . $inst->folderName; + $inst->template->assign(array( + 'theme_path' => $inst->path, + 'theme_tpl' => $inst->path . '/xotpl', + 'theme_url' => $inst->url, + 'theme_img' => $inst->url . '/img', + 'theme_icons' => $inst->url . '/icons', + 'theme_css' => $inst->url . '/css', + 'theme_js' => $inst->url . '/js', + 'theme_lang' => $inst->url . '/language', + )); + + return $inst; + } +} + +class XoopsTheme +{ + /** + * Should we render banner? Not for redirect pages or admin side + * + * @var bool + */ + public $renderBanner = true; + + /** + * The name of this theme + * + * @var string + */ + public $folderName = ''; + + /** + * Physical path of this theme folder + * + * @var string + */ + public $path = ''; + + /** + * @var string + */ + public $url = ''; + + /** + * Whether or not the theme engine should include the output generated by php + * + * @var string + */ + public $bufferOutput = true; + + /** + * Canvas-level template to use + * + * @var string + */ + public $canvasTemplate = 'theme.html'; + + /** + * Theme folder path + * + * @var string + */ + public $themesPath = 'themes'; + + /** + * Content-level template to use + * + * @var string + */ + public $contentTemplate = ''; + + /** + * @var int + */ + public $contentCacheLifetime = 0; + + /** + * @var string + */ + public $contentCacheId = null; + + /** + * Text content to display right after the contentTemplate output + * + * @var string + */ + public $content = ''; + + /** + * Page construction plug-ins to use + * + * @var array + * @access public + */ + public $plugins = array('XoopsThemeBlocksPlugin'); + + /** + * @var int + */ + public $renderCount = 0; + + /** + * Pointer to the theme template engine + * + * @var XoopsTpl + */ + public $template = false; + + /** + * Array containing the document meta-information + * + * @var array + */ + public $metas = array( + 'meta' => array(), + 'link' => array(), + 'script' => array() + ); + + /** + * Array of strings to be inserted in the head tag of HTML documents + * + * @var array + */ + public $htmlHeadStrings = array(); + + /** + * Custom variables that will always be assigned to the template + * + * @var array + */ + public $templateVars = array(); + + /** + * User extra information for cache id, like language, user groups + * + * @var boolean + */ + public $use_extra_cache_id = true; + + /** + * Engine used for caching headers information + * Default is 'file', you can choose 'model' for database storage + * or any other cache engine available in the class/cache folder + * + * @var boolean + */ + public $headersCacheEngine = 'file'; + + /** + * *#@- + */ + + /** + * *#@+ + * @tasktype 10 Initialization + */ + /** + * Initializes this theme + * Upon initialization, the theme creates its template engine and instanciates the + * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not + * display redirection messages, the HTTP redirections system is disabled to ensure users will + * see the redirection screen. + * + * @return bool + */ + public function xoInit() + { + $xoops = Xoops::getInstance(); + $this->path = XOOPS_THEME_PATH . '/' . $this->folderName; + $this->url = XOOPS_THEME_URL . '/' . $this->folderName; + $this->template = null; + $this->template = new XoopsTpl(); + $this->template->currentTheme = $this; + $this->template->assign_by_ref('xoTheme', $this); + $this->template->assign(array( + 'xoops_theme' => $xoops->getConfig('theme_set'), + 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/', + 'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')), + 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), + 'xoops_dirname' => $xoops->moduleDirname, + 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', + 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) + )); + $this->template->assign(array( + 'theme_path' => $this->path, + 'theme_tpl' => $this->path . '/xotpl', + 'theme_url' => $this->url, + 'theme_img' => $this->url . '/img', + 'theme_icons' => $this->url . '/icons', + 'theme_css' => $this->url . '/css', + 'theme_js' => $this->url . '/js', + 'theme_lang' => $this->url . '/language', + )); + + if ($xoops->isUser()) { + $this->template->assign(array( + 'xoops_isuser' => true, + 'xoops_avatar' => XOOPS_UPLOAD_URL . "/" . $xoops->user->getVar('user_avatar'), + 'xoops_userid' => $xoops->user->getVar('uid'), + 'xoops_uname' => $xoops->user->getVar('uname'), + 'xoops_name' => $xoops->user->getVar('name'), + 'xoops_isadmin' => $xoops->isAdmin(), + 'xoops_usergroups' => $xoops->user->getGroups() + )); + } else { + $this->template->assign(array( + 'xoops_isuser' => false, + 'xoops_isadmin' => false, + 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS) + )); + } + + // Meta tags + $config_handler = $xoops->getHandlerConfig(); + $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); + $config = $config_handler->getConfigs($criteria, true); + foreach (array_keys($config) as $i) { + $name = $config[$i]->getVar('conf_name', 'n'); + $value = $config[$i]->getVar('conf_value', 'n'); + if (substr($name, 0, 5) == 'meta_') { + $this->addMeta('meta', substr($name, 5), $value); + } else { + // prefix each tag with 'xoops_' + $this->template->assign("xoops_$name", $value); + } + } + // Load global javascript + $this->addScript('include/xoops.js'); + $this->loadLocalization(); + + if ($this->bufferOutput) { + ob_start(); + } + $xoops->theme = $this; + $xoops->tpl = $this->template; + $GLOBALS['xoTheme'] =& $xoops->theme; + $GLOBALS['xoopsTpl'] =& $xoops->tpl; + + //to control order of loading JS and CSS + + if (file_exists($this->path ."/theme_onload.php")) + include_once($this->path ."/theme_onload.php"); + + // Instanciate and initialize all the theme plugins + foreach ($this->plugins as $k => $bundleId) { + if (!is_object($bundleId)) { + /* @var $plugin XoopsThemePlugin */ + $plugin = new $bundleId(); + $plugin->theme = $this; + $plugin->xoInit(); + + $this->plugins[$bundleId] = null; + $this->plugins[$bundleId] = $plugin; + unset($this->plugins[$k]); + } + } + return true; + } + + /** + * Generate cache id based on extra information of language and user groups + * User groups other than anonymous should be detected to avoid disclosing group sensitive contents + * + * @param string $cache_id raw cache id + * @param string $extraString extra string + * + * @return string complete cache id + */ + function generateCacheId($cache_id, $extraString = '') + { + $xoops = Xoops::getInstance(); + static $extra_string; + if (!$this->use_extra_cache_id) { + return $cache_id; + } + + if (empty($extraString)) { + if (empty($extra_string)) { + // Generate language section + $extra_string = $xoops->getConfig('language'); + // Generate group section + if (!$xoops->isUser()) { + $extra_string .= '-' . XOOPS_GROUP_ANONYMOUS; + } else { + $groups = $xoops->user->getGroups(); + sort($groups); + // Generate group string for non-anonymous groups, + // XOOPS_DB_PASS and XOOPS_DB_NAME (before we find better variables) are used to protect group sensitive contents + $extra_string .= '-' . substr(md5(implode('-', $groups)), 0, 8) . '-' . substr(md5(XOOPS_DB_PASS . XOOPS_DB_NAME . XOOPS_DB_USER), 0, 8); + } + } + $extraString = $extra_string; + } + $cache_id .= '-' . $extraString; + return $cache_id; + } + + /** + * XoopsTheme::checkCache() + * + * @return bool + */ + public function checkCache() + { + if ($_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime) { + $template = $this->contentTemplate ? $this->contentTemplate : 'module:system|system_dummy.html'; + $this->template->caching = 2; + $this->template->cache_lifetime = $this->contentCacheLifetime; + $uri = str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']); + // Clean uri by removing session id + if (defined('SID') && SID && strpos($uri, SID)) { + $uri = preg_replace("/([\?&])(" . SID . "$|" . SID . "&)/", "\\1", $uri); + } + $this->contentCacheId = $this->generateCacheId('page_' . substr(md5($uri), 0, 8)); + if ($this->template->is_cached($template, $this->contentCacheId)) { + XoopsLogger::getInstance() + ->addExtra($template, sprintf('Cached (regenerates every %d seconds)', $this->contentCacheLifetime)); + $this->render(null, null, $template); + return true; + } + } + return false; + } + + /** + * Render the page + * The theme engine builds pages from 2 templates: canvas and content. + * A module can call this method directly and specify what templates the theme engine must use. + * If render() hasn't been called before, the theme defaults will be used for the canvas and + * page template (and xoopsOption['template_main'] for the content). + * + * @param string $canvasTpl The canvas template, if different from the theme default + * @param string $pageTpl The page template, if different from the theme default (unsupported, 2.3+ only) + * @param string $contentTpl The content template + * @param array $vars Template variables to send to the template engine + * + * @return bool + */ + public function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array()) + { + if ($this->renderCount) { + return false; + } + $xoops = Xoops::getInstance(); + $xoops->logger->startTime('Page rendering'); + + $cache = XoopsCache::getInstance(); + + //Get meta information for cached pages + if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId, $this->headersCacheEngine)) { + //we need to merge metas set by blocks with the module cached meta + $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']); + foreach ($content['metas'] as $type => $value) { + $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]); + } + $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']); + $xoops->setOption('xoops_module_header', $content['header']); + } + + if ($xoops->getOption('xoops_pagetitle')) { + $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle')); + } + $header = !$xoops->getOption('xoops_module_header') ? $this->template->get_template_vars('xoops_module_header') : $xoops->getOption('xoops_module_header'); + + //save meta information of cached pages + if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) { + $content['htmlHeadStrings'] = (array)$this->htmlHeadStrings; + $content['metas'] = (array)$this->metas; + $content['xoops_pagetitle'] = $this->template->get_template_vars('xoops_pagetitle'); + $content['header'] = $header; + $cache = XoopsCache::getInstance(); + $cache->write($this->contentCacheId, $content, $this->headersCacheEngine); + } + + // @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice + $old = array('robots', 'keywords', 'description', 'rating', 'author', 'copyright'); + foreach ($this->metas['meta'] as $name => $value) { + if (in_array($name, $old)) { + $this->template->assign("xoops_meta_$name", htmlspecialchars($value, ENT_QUOTES)); + unset($this->metas['meta'][$name]); + } + } + + // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and $this->template->get_template_vars( 'xoops_module_header' ) ? + $this->template->assign('xoops_module_header', $this->renderMetas(null, true) . "\n" . $header); + + if ($canvasTpl) { + $this->canvasTemplate = $canvasTpl; + } + if ($contentTpl) { + $this->contentTemplate = $contentTpl; + } + if (!empty($vars)) { + $this->template->assign($vars); + } + if ($this->contentTemplate) { + $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId); + } + if ($this->bufferOutput) { + $this->content .= ob_get_contents(); + ob_end_clean(); + } + + $this->template->assign_by_ref('xoops_contents', $this->content); + + // Do not cache the main (theme.html) template output + $this->template->caching = 0; + $this->template->display($this->path . '/' . $this->canvasTemplate); + $this->renderCount++; + $xoops->logger->stopTime('Page rendering'); + return true; + } + + /** + * Load localization information + * Folder structure for localization: + * <ul>themes/themefolder/english + * <li>main.php - language definitions</li> + * <li>style.css - localization stylesheet</li> + * <li>script.js - localization script</li> + * </ul> + * + * @param string $type + * + * @return bool + */ + public function loadLocalization($type = "main") + { + $xoops = Xoops::getInstance(); + $language = $xoops->getConfig('language'); + // Load global localization stylesheet if available + if (file_exists($xoops->path('language/' . $language . '/style.css'))) { + $this->addStylesheet($xoops->url('language/' . $language . '/style.css')); + } + $this->addLanguage($type); + // Load theme localization stylesheet and scripts if available + if (file_exists($this->path . '/language/' . $language . '/script.js')) { + $this->addScript($this->url . '/language/' . $language . '/script.js'); + } + if (file_exists($this->path . '/language/' . $language . '/style.css')) { + $this->addStylesheet($this->url . '/language/' . $language . '/style.css'); + } + return true; + } + + /** + * Load theme specific language constants + * + * @param string $type language type, like 'main', 'admin'; Needs to be declared in theme xo-info.php + * @param string $language specific language + * + * @return bool|mixed + */ + public function addLanguage($type = "main", $language = null) + { + $xoops = Xoops::getInstance(); + $language = is_null($language) ? $xoops->getConfig('language') : $language; + if (!file_exists($file = $xoops->path($this->resourcePath("/language/{$language}/{$type}.php")))) { + if (!file_exists($file = $xoops->path($this->resourcePath("/language/english/{$type}.php")))) { + return false; + } + } + $ret = include_once $file; + return $ret; + } + + /** + * *#@+ + * @tasktype 20 Manipulating page meta-information + */ + /** + * Adds script code to the document head + * This methods allows the insertion of an external script file (if $src is provided), or + * of a script snippet. The file URI is parsed to take benefit of the theme resource + * overloading system. + * The $attributes parameter allows you to specify the attributes that will be added to the + * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to + * 'text/javascript'. + * <code> + * // Add an external script using a physical path + * $theme->addScript( 'www/script.js', null, '' ); + * $theme->addScript( 'modules/newbb/script.js', null, '' ); + * // Specify attributes for the <script> tag + * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' ); + * // Insert a code snippet + * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' ); + * </code> + * + * @param string $src path to an external script file + * @param array $attributes hash of attributes to add to the <script> tag + * @param string $content Code snippet to output within the <script> tag + * + * @return void + */ + public function addScript($src = '', $attributes = array(), $content = '') + { + $xoops = Xoops::getInstance(); + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($src)) { + $src = $xoops->url($this->resourcePath($src)); + $attributes['src'] = $src; + } + if (!empty($content)) { + $attributes['_'] = $content; + } + if (!isset($attributes['type'])) { + $attributes['type'] = 'text/javascript'; + } + $this->addMeta('script', $src, $attributes); + } + + /** + * Add StyleSheet or CSS code to the document head + * + * @param string|null $src path to .css file + * @param array|null $attributes name => value paired array of attributes such as title + * @param string $content CSS code to output between the <style> tags (in case $src is empty) + * + * @return void + */ + public function addStylesheet($src = '', $attributes = array(), $content = '') + { + $xoops = Xoops::getInstance(); + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($src)) { + $src = $xoops->url($this->resourcePath($src)); + $attributes['href'] = $src; + } + if (!isset($attributes['type'])) { + $attributes['type'] = 'text/css'; + } + if (!empty($content)) { + $attributes['_'] = $content; + } + $this->addMeta('stylesheet', $src, $attributes); + } + + /** + * Add a <link> to the header + * + * @param string $rel Relationship from the current doc to the anchored one + * @param string $href URI of the anchored document + * @param array $attributes Additional attributes to add to the <link> element + */ + public function addLink($rel, $href = '', $attributes = array()) + { + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($href)) { + $attributes['href'] = $href; + } + $attributes['rel'] = $rel; + $this->addMeta('link', '', $attributes); + } + + /** + * Set a meta http-equiv value + * + * @param string $name + * @param null $value + * + * @return bool|string + */ + public function addHttpMeta($name, $value = null) + { + if (isset($value)) { + return $this->addMeta('http', $name, $value); + } + unset($this->metas['http'][$name]); + return false; + } + + /** + * Change output page meta-information + * + * @param string $type + * @param string $name + * @param string $value + * + * @return string + */ + public function addMeta($type = 'meta', $name = '', $value = '') + { + if (!isset($this->metas[$type])) { + $this->metas[$type] = array(); + } + if (!empty($name)) { + $this->metas[$type][$name] = $value; + } else { + $this->metas[$type][md5(serialize(array($value)))] = $value; + } + return $value; + } + + /** + * XoopsTheme::headContent() + * + * @param $params + * @param $content + * @param $smarty + * @param $repeat + * + * @return void + */ + public function headContent($params, $content, &$smarty, &$repeat) + { + if (!$repeat) { + $this->htmlHeadStrings[] = $content; + } + } + + /** + * XoopsTheme::renderMetas() + * + * @param null $type + * @param bool|string $return + * + * @return bool|string + */ + public function renderMetas($type = null, $return = false) + { + $str = ''; + if (!isset($type)) { + foreach (array_keys($this->metas) as $type) { + $str .= $this->renderMetas($type, true); + } + $str .= implode("\n", $this->htmlHeadStrings); + } else { + switch ($type) { + case 'script': + foreach ($this->metas[$type] as $attrs) { + $str .= "<script" . $this->renderAttributes($attrs) . ">"; + if (@$attrs['_']) { + $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>"; + } + $str .= "</script>\n"; + } + break; + case 'link': + foreach ($this->metas[$type] as $attrs) { + $rel = $attrs['rel']; + unset($attrs['rel']); + $str .= '<link rel="' . $rel . '"' . $this->renderAttributes($attrs) . " />\n"; + } + break; + case 'stylesheet': + foreach ($this->metas[$type] as $attrs) { + if (@$attrs['_']) { + $str .= '<style' . $this->renderAttributes($attrs) . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>"; + } else { + $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n"; + } + } + break; + case 'http': + foreach ($this->metas[$type] as $name => $content) { + $str .= '<meta http-equiv="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; + } + break; + default: + foreach ($this->metas[$type] as $name => $content) { + $str .= '<meta name="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; + } + break; + } + } + if ($return) { + return $str; + } + echo $str; + return true; + } + + /** + * Generates a unique element ID + * + * @param string $tagName + * + * @return string + */ + public function genElementId($tagName = 'xos') + { + static $cache = array(); + if (!isset($cache[$tagName])) { + $cache[$tagName] = 1; + } + return $tagName . '-' . $cache[$tagName]++; + } + + /** + * Transform an attributes collection to an XML string + * + * @param array $coll + * + * @return string + */ + public function renderAttributes($coll) + { + $str = ''; + foreach ($coll as $name => $val) { + if ($name != '_') { + $str .= ' ' . $name . '="' . htmlspecialchars($val, ENT_QUOTES) . '"'; + } + } + return $str; + } + + /** + * Return a themable file resource path + * + * @param string $path + * + * @return string + */ + public function resourcePath($path) + { + if (substr($path, 0, 1) == '/') { + $path = substr($path, 1); + } + + if (file_exists(XOOPS_ROOT_PATH . "/{$this->themesPath}/{$this->folderName}/{$path}")) { + return "{$this->themesPath}/{$this->folderName}/{$path}"; + } + + if (file_exists(XOOPS_ROOT_PATH . "/themes/{$this->folderName}/{$path}")) { + return "themes/{$this->folderName... [truncated message content] |
From: <for...@us...> - 2012-08-15 13:04:24
|
Revision: 10077 http://xoops.svn.sourceforge.net/xoops/?rev=10077&view=rev Author: forxoops Date: 2012-08-15 13:04:17 +0000 (Wed, 15 Aug 2012) Log Message: ----------- Fix some errors for alpha release Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/protector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/class/form/ranks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -371,7 +371,7 @@ * * @return bool */ - public function header($tpl_name = '') + public function header($tpl_name = null) { if ($this->isAdminSide) { return $this->_adminHeader($tpl_name); @@ -390,6 +390,10 @@ if ($tpl_name) { $tpl_info = $this->getTplInfo($tpl_name); $this->tpl_name = $tpl_info['tpl_name']; + } else { + $tpl_name = 'system_dummy.html'; + $tpl_info = $this->getTplInfo($tpl_name); + $this->tpl_name = $tpl_info['tpl_name']; } // for legacy support when template is set after header. Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -260,7 +260,7 @@ $form->addElement(new XoopsFormHidden('op', 'avatarupload')); $form->addElement(new XoopsFormHidden('uid', $xoops->user->getVar('uid'))); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); - $form->display(); + $form->render(false); } $avatar_handler = $xoops->getHandlerAvatar(); $form2 = new XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); @@ -278,7 +278,7 @@ $form2->addElement(new XoopsFormHidden('uid', $xoops->user->getVar('uid'))); $form2->addElement(new XoopsFormHidden('op', 'avatarchoose')); $form2->addElement(new XoopsFormButton('', 'submit2', _SUBMIT, 'submit')); - $form2->display(); + $form2->render(false); $xoops->footer(); } @@ -302,7 +302,7 @@ $xoops->redirect('index.php', 3, _US_NOEDITRIGHT); exit(); } - if ($xoopsConfigUser['avatar_allow_upload'] == 1 && $xoopsUser->getVar('posts') >= $xoopsConfigUser['avatar_minposts']) { + if ( $xoops->getModuleConfig('avatars_allowupload', 'avatars') == 1 && $xoops->user->getVar('posts') >= $xoops->getModuleConfig('avatars_postsrequired', 'avatars') ) { $uploader = new XoopsMediaUploader( XOOPS_UPLOAD_PATH . '/avatars', array( 'image/gif' , 'image/jpeg' , Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -57,5 +57,4 @@ } $search_form->addElement(new XoopsFormHidden('action', 'results')); $search_form->addElement(new XoopsFormHiddenToken('id')); -$search_form->addElement(new XoopsFormButton('', 'submit', _SR_SEARCH, 'submit')); -?> \ No newline at end of file +$search_form->addElement(new XoopsFormButton('', 'submit', _SR_SEARCH, 'submit')); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -161,7 +161,7 @@ if (empty($uid) || $xoops->user->getVar('uid') != $uid) { $xoops->redirect('index.php', 3, _US_NOEDITRIGHT); } - if ($xoops->getConfig('avatar_allow_upload') == 1 && $xoops->user->getVar('posts') >= $xoops->getConfig('avatar_minposts')) { + if ( $xoops->getModuleConfig('avatars_allowupload', 'avatars') == 1 && $xoops->user->getVar('posts') >= $xoops->getModuleConfig('avatars_postsrequired', 'avatars') ) { $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/avatars', array( 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', @@ -200,6 +200,8 @@ } $xoops->redirect("edituser.php?op=avatarform", 3, $uploader->getErrors()); } + $xoops->redirect('index.php', 3, _US_NOEDITRIGHT); + exit(); } if ($op == 'avatarchoose') { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -63,7 +63,7 @@ $this->filters_base = dirname(dirname(__FILE__)).'/filters_enabled' ; } - function getInstance() + static function getInstance() { static $instance ; if( ! isset( $instance ) ) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/protector.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/protector.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/protector.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -1260,7 +1260,7 @@ function call_filter($type, $dying_message = '') { require_once dirname(__FILE__) . '/ProtectorFilter.php'; - $filter_handler =& ProtectorFilterHandler::getInstance(); + $filter_handler = ProtectorFilterHandler::getInstance(); $ret = $filter_handler->execute($type); if ($ret == false && $dying_message) { die($dying_message); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/class/form/ranks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/class/form/ranks.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/class/form/ranks.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -27,7 +27,7 @@ /** * @param XoopsRank|XoopsObject $obj */ - public function __construct(XoopsRank &$obj) + public function __construct(XoopsObject &$obj) { if ($obj->isNew()) { $blank_img = 'blank.gif'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php 2012-08-15 13:01:26 UTC (rev 10076) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php 2012-08-15 13:04:17 UTC (rev 10077) @@ -106,8 +106,9 @@ if ($action == 'search') { $xoops->header(); include $xoops->path('include/searchform.php'); - $search_form->display(); + $search_form->render(false); $xoops->footer(); + exit; } if ($andor != "OR" && $andor != "exact" && $andor != "AND") { $andor = "AND"; @@ -149,7 +150,7 @@ unset($mids); $mids = array_keys($modules); } - $xoops->header(_SR_SEARCHRESULTS . ': ' . implode(' ', $queries)); + $xoops->header(); $nomatch = true; echo "<h3>" . _SR_SEARCHRESULTS . "</h3>\n"; echo _SR_KEYWORDS . ':'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |