From: <ma...@us...> - 2011-12-04 15:29:09
|
Revision: 8404 http://xoops.svn.sourceforge.net/xoops/?rev=8404&view=rev Author: mageg Date: 2011-12-04 15:29:00 +0000 (Sun, 04 Dec 2011) Log Message: ----------- Module smilies Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 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/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/spinner.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/include/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/preloads/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,29 @@ +<?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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +include dirname(__FILE__) . '/header.php'; +$xoops->header('smilies_about.html'); +$aboutAdmin = new ModuleAdmin(); +$xoops->tpl->assign('navigation', $aboutAdmin->addNavigation('about.php')); +$xoops->tpl->assign('about', $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false)); +$xoops->footer(); +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/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/smilies/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,32 @@ +<?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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; + +$xoops = Xoops::getInstance(); + +if (file_exists($xoops->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) { + include_once $xoops->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); +} else { + echo $xoops->error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); +} +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/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/smilies/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,29 @@ +<?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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +include dirname(__FILE__) . '/header.php'; +$xoops->header('smilies_index.html'); +$indexAdmin = new ModuleAdmin(); +$xoops->tpl->assign('navigation', $indexAdmin->addNavigation('index.php')); +$xoops->tpl->assign('about', $indexAdmin->renderIndex()); +$xoops->footer(); +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/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/smilies/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +$pathIcon32 = Xoops::getInstance()->getHandlerModule()->getByDirname('smilies')->getInfo('icons32'); + +$adminmenu = array(); + +$i = 1; +$adminmenu[$i]['title'] = _SMILIES_MI_INDEX; +$adminmenu[$i]['link'] = "admin/index.php"; +$adminmenu[$i]['icon'] = '../../' . $pathIcon32 . '/home.png'; +$i++; +$adminmenu[$i]['title'] = _SMILIES_MI_SMILIES; +$adminmenu[$i]['link'] = "admin/smilies.php"; +$adminmenu[$i]['icon'] = '../../' . $pathIcon32 . '/smilies.png'; +$i++; +$adminmenu[$i]['title'] = _SMILIES_MI_ABOUT; +$adminmenu[$i]['link'] = 'admin/about.php'; +$adminmenu[$i]['icon'] = '../../' . $pathIcon32 . '/about.png'; +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,199 @@ +<?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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +include dirname(__FILE__) . '/header.php'; +include_once dirname(dirname(dirname(__FILE__))) . '/system/class/system.php'; +// Parameters +$nb_smilies = $xoops->getModuleConfig('smilies_pager'); +$mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'); +$upload_size = 500000; +$system = System::getInstance(); +// Get Action type +$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); +// Get smilies handler +$smilies_Handler = $xoops->getHandler("smilies"); + +$xoops->header('smilies_smilies.html'); + +$smiliesAdmin = new ModuleAdmin(); +$xoops->tpl->assign('navigation', $smiliesAdmin->addNavigation('smilies.php')); + +switch ($op) { + + case 'list': + default: + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + $xoops->theme->addScript('media/jquery/plugins/jquery.tablesorter.js'); + $xoops->theme->addScript('modules/system/js/admin.js'); + $smiliesAdmin->addItemButton(_SMILIES_AM_ADD, 'smilies.php?op=new_smilie', 'add'); + $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + // Get start pager + $start = $system->cleanVars($_REQUEST, 'start', 0, 'int'); + // Criteria + $criteria = new CriteriaCompo(); + $criteria->setSort("id"); + $criteria->setOrder("ASC"); + $criteria->setStart($start); + $criteria->setLimit($nb_smilies); + // Count smilies + $smilies_count = $smilies_Handler->getCount($criteria); + $smilies_arr = $smilies_Handler->getall($criteria); + // Assign Template variables + $xoops->tpl->assign('smilies_count', $smilies_count); + if ($smilies_count > 0) { + foreach (array_keys($smilies_arr) as $i) { + $smilies_id = $smilies_arr[$i]->getVar("id"); + $smilies['smilies_id'] = $smilies_id; + $smilies['code'] = $smilies_arr[$i]->getVar("code"); + $smilies['emotion'] = $smilies_arr[$i]->getVar("emotion"); + $smilies['display'] = $smilies_arr[$i]->getVar("display"); + $smilies_img = ($smilies_arr[$i]->getVar("smile_url")) ? $smilies_arr[$i]->getVar("smile_url") + : 'blank.gif'; + $smilies['image'] = '<img src="' . XOOPS_UPLOAD_URL . '/' . $smilies_img . '" alt="" />'; + $smilies['edit_delete'] = '<a href="admin.php?fct=smilies&op=edit_smilie&smilies_id=' . $smilies_id . '"> + <img src="./images/icons/edit.png" border="0" alt="' . _SMILIES_AM_EDIT . '" title="' . _SMILIES_AM_EDIT . '"></a> + <a href="admin.php?fct=smilies&op=smilies_delete&smilies_id=' . $smilies_id . '"> + <img src="./images/icons/delete.png" border="0" alt="' . _SMILIES_AM_DELETE . '" title="' . _SMILIES_AM_DELETE . '"></a>'; + $xoops->tpl->append_by_ref('smilies', $smilies); + unset($smilies); + } + } + // Display Page Navigation + if ($smilies_count > $nb_smilies) { + $nav = new XoopsPageNav($smilies_count, $nb_smilies, $start, 'start', 'fct=smilies&op=list'); + $xoops->tpl->assign('nav_menu', $nav->renderNav(4)); + } + break; + + // New smilie + case "new_smilie": + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + $smiliesAdmin->addItemButton(_SMILIES_AM_LIST, 'smilies.php', 'list'); + $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + // Create form + $obj = $smilies_Handler->create(); + $form = $xoops->getModuleForm($obj, 'smilies'); + // Assign form + $xoops->tpl->assign('form', $form->render()); + break; + + // Edit smilie + case "edit_smilie": + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + $smiliesAdmin->addItemButton(_SMILIES_AM_LIST, 'smilies.php', 'list'); + $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + // Create form + $obj = $smilies_Handler->get($system->cleanVars($_REQUEST, 'smilies_id', 0, 'int')); + $form = $xoops->getModuleForm($obj, 'smilies'); + // Assign form + $xoops->tpl->assign('form', $form->render()); + break; + + // Save smilie + case "save_smilie": + if (!$xoops->security->check()) { + $xoops->redirect('smilies.php', 3, implode('<br />', $xoops->security->getErrors())); + } + + if (isset($_POST["smilies_id"])) { + $obj = $smilies_Handler->get($system->cleanVars($_POST, 'smilies_id', 0, 'int')); + } else { + $obj = $smilies_Handler->create(); + } + // erreur + $obj->setVar("code", $_POST["code"]); + $obj->setVar("emotion", $_POST["emotion"]); + $display = ($_POST["display"] == 1) ? "1" : "0"; + $obj->setVar("display", $display); + + $uploader_smilies_img = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/smilies', $mimetypes, $upload_size, null, null); + + if ($uploader_smilies_img->fetchMedia("smile_url")) { + $uploader_smilies_img->setPrefix("smil"); + $uploader_smilies_img->fetchMedia("smile_url"); + if (!$uploader_smilies_img->upload()) { + $errors = $uploader_smilies_img->getErrors(); + $xoops->redirect("javascript:history.go(-1)", 3, $errors); + } else { + $obj->setVar("smile_url", 'smilies/' . $uploader_smilies_img->getSavedFileName()); + } + } else { + $obj->setVar("smile_url", 'smilies/' . $_POST["smile_url"]); + } + if ($smilies_Handler->insert($obj)) { + $xoops->redirect("smilies.php?fct=smilies", 2, _SMILIES_AM_SAVE); + } + $xoops->error($obj->getHtmlErrors()); + break; + + //Del a smilie + case "smilies_delete": + $smiliesAdmin->addItemButton(_SMILIES_AM_LIST, 'smilies.php', 'list'); + $smiliesAdmin->addItemButton(_SMILIES_AM_ADD, 'smilies.php?op=new_smilie', 'add'); + $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + $smilies_id = $system->cleanVars($_REQUEST, 'smilies_id', 0, 'int'); + $obj = $smilies_Handler->get($smilies_id); + if (isset($_POST["ok"]) && $_POST["ok"] == 1) { + if (!$xoops->security->check()) { + $xoops->redirect("smilies.php", 3, implode(",", $xoops->security->getErrors())); + } + if ($smilies_Handler->delete($obj)) { + $urlfile = XOOPS_UPLOAD_PATH . '/' . $obj->getVar("smile_url"); + if (is_file($urlfile)) { + chmod($urlfile, 0777); + unlink($urlfile); + } + $xoops->redirect("smilies.php", 2, _SMILIES_AM_SAVE); + } else { + $xoops->error($obj->getHtmlErrors()); + } + } else { + // Define Stylesheet + $xoops->theme->addStylesheet('modules/system/css/admin.css'); + $smilies_img = ($obj->getVar("smile_url")) ? $obj->getVar("smile_url") : 'blank.gif'; + $xoops->confirm(array( + "ok" => 1, "smilies_id" => $_REQUEST["smilies_id"], "op" => "smilies_delete" + ), $_SERVER["REQUEST_URI"], sprintf(_SMILIES_AM_SUREDEL) . '<br \><img src="' . XOOPS_UPLOAD_URL . '/' . $smilies_img . '" alt="" /><br \>'); + } + break; + + case "smilies_update_display": + // Get smilies id + $smilies_id = $system->cleanVars($_POST, 'smilies_id', 0, 'int'); + if ($smilies_id > 0) { + $obj = $smilies_Handler->get($smilies_id); + $old = $obj->getVar('display'); + $obj->setVar('display', !$old); + if ($smilies_Handler->insert($obj)) { + exit; + } + echo $obj->getHtmlErrors(); + } + break; +} + + +$xoops->footer(); +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: 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 (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,76 @@ +<?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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SmiliesSmiliesForm extends XoopsThemeForm +{ + /** + * @param XoopsSmilies|XoopsObject $obj + */ + public function __construct(XoopsSmilies &$obj) + { + if ($obj->isNew()) { + $blank_img = 'blank.gif'; + } else { + $blank_img = str_replace( 'smilies/', '', $obj->getVar('smile_url', 'e') ); + } + + + $title = $obj->isNew() ? sprintf(_SMILIES_AM_ADD) : sprintf(_SMILIES_AM_EDIT); + + parent::__construct($title, 'form', 'smilies.php', 'post', true); + $this->setExtra('enctype="multipart/form-data"'); + $this->addElement(new XoopsFormText(_SMILIES_AM_CODE, 'code', 26, 25, $obj->getVar('code')), true); + $this->addElement(new XoopsFormText(_SMILIES_AM_DESCRIPTION, 'emotion', 50, 50, $obj->getVar('emotion')), true); + + $imgtray_img = new XoopsFormElementTray( _SMILIES_AM_FILE, '<br />' ); + $imgpath_img = sprintf( _SMILIES_AM_IMAGE_PATH, XOOPS_UPLOAD_PATH . '/smilies/' ); + $imageselect_img = new XoopsFormSelect( $imgpath_img, 'smile_url', $blank_img ); + $image_array_img = XoopsLists::getImgListAsArray( XOOPS_UPLOAD_PATH . '/smilies' ); + $imageselect_img->addOption("$blank_img", $blank_img); + foreach ($image_array_img as $image_img) { + $imageselect_img->addOption("$image_img", $image_img); + } + $imageselect_img->setExtra( 'onchange="showImgSelected(\'xo-smilies-img\', \'smile_url\', \'smilies\', \'\', \'' . XOOPS_UPLOAD_URL . '\' )"' ); + $imgtray_img->addElement( $imageselect_img, false); + $imgtray_img->addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_UPLOAD_URL . "/smilies/" . $blank_img . "' name='image_img' id='xo-smilies-img' alt='' />" ) ); + + $fileseltray_img = new XoopsFormElementTray('<br />','<br /><br />'); + $fileseltray_img->addElement(new XoopsFormFile(_SMILIES_AM_UPLOADS , 'smile_url', 500000),false); + $fileseltray_img->addElement(new XoopsFormLabel(''), false); + $imgtray_img->addElement($fileseltray_img); + $this->addElement($imgtray_img); + + if (!$obj->isNew()) { + $this->addElement(new XoopsFormHidden('smilies_id', $obj->getVar('id'))); + $display = $obj->getVar('display'); + } else { + $display = 0; + } + + $this->addElement(new XoopsFormRadioYN(_SMILIES_AM_OFF, 'display', $display)); + $this->addElement(new XoopsFormHidden('op', 'save_smilie')); + $this->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + } + +} Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: 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 (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,3 @@ +Version xxx +------------------- + Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,3 @@ +Credits +------------------- + Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt 2011-12-04 15:29:00 UTC (rev 8404) @@ -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/smilies/docs/lang_diff.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt 2011-12-04 15:29:00 UTC (rev 8404) @@ -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/smilies/docs/licence.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt 2011-12-04 15:29:00 UTC (rev 8404) @@ -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 terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,34 @@ +Read Me First +------------------- + +Description +------------ +The smilies Module is for managing smilies. + + Requirements + _____________________________________________________________________ + +- PHP version >= 5.2.0 +- XOOPS 2.6.0+ + +Install/uninstall +------------------ +No special measures necessary, follow the standard installation process � extract the xoopspartners 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) + +Operating instructions +------------------------ +To set up this module you need to: + +i) Enter your partner�s details � including a URL for their website and (optionally) logo plus a short description (see �Adding a partner�) + +ii) Configure your preferences for the module (see �Preferences�) and optionally the Partners block if you intend to use it (see �Blocks�) + +iii) Check that you have given your user groups the necessary module and block access rights to use this module. Group permissions are set through the Administration Menu -> System -> Groups. + +Detailed instructions on configuring the access rights for user groups are available in the XOOPS Operations Manual (http://goo.gl/adT2i) + +Tutorial +----------- +Tutorial coming soon. \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/spinner.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/spinner.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/include/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/include/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/include/index.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -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/smilies/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +define("_SMILIES_AM_ACTION","Action"); +define("_SMILIES_AM_ADD", "Add a new smilie"); +define("_SMILIES_AM_CODE","Code"); +define("_SMILIES_AM_DELETE","Delete smilie"); +define("_SMILIES_AM_DESCRIPTION","Description"); +define("_SMILIES_AM_DISPLAY","Display in form"); +define("_SMILIES_AM_EDIT","Edit smilie"); +define("_SMILIES_AM_FILE","Smilie file"); +define("_SMILIES_AM_IMAGE_PATH","Files exist in: %s"); +define("_SMILIES_AM_LIST", "List of smilies"); +define("_SMILIES_AM_OFF","Display in the form "); +define("_SMILIES_AM_ON","Does not display in the form"); +define("_SMILIES_AM_SAVE","Smilie saved"); +define("_SMILIES_AM_SUREDEL","Are you sure you want to delete this smilie?"); +define("_SMILIES_AM_SMILIE","Smilie"); +define("_SMILIES_AM_UPLOADS","Upload"); +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,38 @@ +<div id="help-template" class="outer"> + <h1 class="head">Help: + <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/smilies/admin/index.php" + title="Back to the administration of Smilies"> Smilies + <img src="<{xoAdminIcons home.png}>" + alt="Back to the Administration of >M"/> + </a></h1> + <!-- ===== Help Content ======= --> + + <h4 class="odd">Description</h4><br/> + + Smiles are little graphic symbols that people can use to express themselves. They can be inserted anywhere in the text of an article, comment or post from both the user and admin sides of the system. XOOPS ships with a collection of 17 smilies built in. Some of these are displayed on the submission forms in various modules (including forums, news, downloads, links and others). Clicking on a smilie will insert it into the post. Smilies can also be inserted by typing in their unique ‘codes’ (keyboard shortcuts), for example typing ':' '-' 'D' in a post will insert this smilie: <img src="http://www.xoops.org/uploads/smil42e7a3d4c7b9f.gif" alt=""/> + <br/><br/> + The full list of smilies available on your system and their codes is accessible through the Smilies, which is where you're now. Here you can add, edit and delete smilies, and control which are displayed on submission forms (only nine of the 17 are displayed by default) + <br/><br/> + If you don’t want smilies on your system, you can either uncheck the “display in form?” box (in which case they won’t appear on submission forms, but will still be available via their codes), or use the delete link to remove them entirely. <br/><br/> + <h4 class="odd">Install/uninstall</h4><br/> + + No special measures necessary, follow the standard installation process – + extract the /pm folder into the + ../modules directory. Install the module through Admin -> System Module -> + Modules. <br/><br/> + Detailed instructions on installing modules are available in the + <a href="http://goo.gl/adT2i">XOOPS Operations + Manual</a><br/><br/> + + <h4 class="odd">Operating instructions</h4><br/> + To set up this module you need to:<br/><br/> + i) You enter your Inbox directly from the front page, or by clicking on the + top link "Go to module" in the PM's Admin area <br/><br/> + ii) Configure your preferences for the module (see ‘Preferences’)<br/><br/> + <h4 class="odd">Tutorial</h4><br/> + + Tutorial coming soon.<br/> + + <!-- ===== Help Content ======= --> + +</div> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,32 @@ +<?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. +*/ + +/** + * smiles 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 smilies + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ +// Info module +define("_SMILIES_MI_NAME", "Smilies"); +define("_SMILIES_MI_DESC", "Module for managing smilies"); +// Menu +define("_SMILIES_MI_INDEX", "Home"); +define("_SMILIES_MI_SMILIES", "Smilies manager"); +define("_SMILIES_MI_ABOUT", "About"); +// Preferences +define("_SMILIES_MI_PREFERENCE_PAGER", "Number of smilies to display per page"); +?> + Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/preloads/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/preloads/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/preloads/index.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -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/smilies/sql/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/sql/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/sql/index.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/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/smilies/templates/admin/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/index.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -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/smilies/templates/admin/smilies_about.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,2 @@ +<{$navigation}> +<{$about}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,2 @@ +<{$navigation}> +<{$about}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,50 @@ +<script type="text/javascript"> + IMG_ON = '<{xoAdminIcons success.png}>'; + IMG_OFF = '<{xoAdminIcons cancel.png}>'; +</script> +<{$navigation}> +<{$button}> +<{if $smilies_count == true}> +<table id="xo-smilies-sorter" cellspacing="1" class="outer tablesorter"> + <thead> + <tr> + <th class="txtcenter"><{$smarty.const._SMILIES_AM_CODE}></th> + <th class="txtcenter"><{$smarty.const._SMILIES_AM_SMILIE}></th> + <th class="txtcenter"><{$smarty.const._SMILIES_AM_DESCRIPTION}></th> + <th class="txtcenter"><{$smarty.const._SMILIES_AM_DISPLAY}></th> + <th class="txtcenter width10"><{$smarty.const._SMILIES_AM_ACTION}></th> + </tr> + </thead> + <tbody> + <{foreach item=smilies from=$smilies}> + <tr class="<{cycle values='even,odd'}> alignmiddle"> + <td class="txtcenter width5"><{$smilies.code}></td> + <td class="txtcenter width5"><{$smilies.image}></td> + <td class="txtcenter width50"><{$smilies.emotion}></td> + <td class="xo-actions txtcenter width10"> + <img id="loading_sml<{$smilies.smilies_id}>" src="../images/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /> + <img class="cursorpointer tooltip" id="sml<{$smilies.smilies_id}>" onclick="system_setStatus( { op: 'smilies_update_display', smilies_id: <{$smilies.smilies_id}> }, 'sml<{$smilies.smilies_id}>', 'smilies.php' )" src="<{if $smilies.display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $smilies.display}><{$smarty.const._SMILIES_AM_OFF}><{else}><{$smarty.const._SMILIES_AM_ON}><{/if}>" title="<{if $smilies.display}><{$smarty.const._SMILIES_AM_OFF}><{else}><{$smarty.const._SMILIES_AM_ON}><{/if}>" /> + </td> + <td class="xo-actions txtcenter width10"> + <a class="tooltip" href="smilies.php?op=edit_smilie&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._SMILIES_AM_EDIT}>"> + <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._SMILIES_AM_EDIT}>" /> + </a> + <a class="tooltip" href="smilies.php?op=smilies_delete&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._SMILIES_AM_DELETE}>"> + <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._SMILIES_AM_DELETE}>" /> + </a> + </td> + </tr> + <{/foreach}> + </tbody> +</table> +<!-- Display smilies navigation --> +<div class="clear spacer"></div> +<{if $nav_menu}> +<div class="xo-avatar-pagenav floatright"><{$nav_menu}></div> +<div class="clear spacer"></div> +<{/if}> +<{/if}> +<!-- Display smilies form (add,edit) --> +<{if $form}> +<div class="spacer"><{$form}></div> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/index.html 2011-12-04 15:29:00 UTC (rev 8404) @@ -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/smilies/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2011-12-04 15:29:00 UTC (rev 8404) @@ -0,0 +1,76 @@ +<?php +/* + You may... [truncated message content] |
From: <ma...@us...> - 2011-12-04 20:28:54
|
Revision: 8408 http://xoops.svn.sourceforge.net/xoops/?rev=8408&view=rev Author: mageg Date: 2011-12-04 20:28:48 +0000 (Sun, 04 Dec 2011) Log Message: ----------- Update module smilies to use XoopsModuleAdmin Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -21,7 +21,7 @@ */ include dirname(__FILE__) . '/header.php'; $xoops->header('smilies_about.html'); -$aboutAdmin = new ModuleAdmin(); +$aboutAdmin = new XoopsModuleAdmin(); $xoops->tpl->assign('navigation', $aboutAdmin->addNavigation('about.php')); $xoops->tpl->assign('about', $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false)); $xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -22,11 +22,5 @@ require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; $xoops = Xoops::getInstance(); - -if (file_exists($xoops->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) { - include_once $xoops->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); -} else { - echo $xoops->error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); -} ?> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -20,8 +20,30 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; +// Get smilies handler +$smilies_Handler = $xoops->getHandler("smilies"); + $xoops->header('smilies_index.html'); -$indexAdmin = new ModuleAdmin(); +// smilies not display +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('display', 0)); +$smilies_notdisplay = $smilies_Handler->getCount($criteria); +// smilies display +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('display', 0, '!=')); +$smilies_display = $smilies_Handler->getCount($criteria); +// total smilies +$smilies_total= $smilies_notdisplay + $smilies_display; +// folder path +$folder_path = XOOPS_ROOT_PATH . '/uploads/smilies'; + +$indexAdmin = new XoopsModuleAdmin(); +$indexAdmin->addInfoBox(_SMILIES_MI_SMILIES); +$indexAdmin->addInfoBoxLine(_SMILIES_MI_SMILIES, _SMILIES_AM_NBTOTAL, $smilies_total); +$indexAdmin->addInfoBoxLine(_SMILIES_MI_SMILIES, _SMILIES_AM_NBDISPLAY, $smilies_display, 'Green'); +$indexAdmin->addInfoBoxLine(_SMILIES_MI_SMILIES, _SMILIES_AM_NBNOTDISPLAY, $smilies_notdisplay, 'Red'); +$indexAdmin->addConfigBoxLine($folder_path, 'folder'); +$indexAdmin->addConfigBoxLine(array($folder_path, '777'), 'chmod'); $xoops->tpl->assign('navigation', $indexAdmin->addNavigation('index.php')); $xoops->tpl->assign('about', $indexAdmin->renderIndex()); $xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -19,21 +19,20 @@ * @author Mage Grégory (AKA Mage) * @version $Id$ */ -$pathIcon32 = Xoops::getInstance()->getHandlerModule()->getByDirname('smilies')->getInfo('icons32'); +$pathIcon32 = '../../media/xoops/images/icons/32/'; $adminmenu = array(); - $i = 1; $adminmenu[$i]['title'] = _SMILIES_MI_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = '../../' . $pathIcon32 . '/home.png'; +$adminmenu[$i]['icon'] = $pathIcon32 . 'home.png'; $i++; $adminmenu[$i]['title'] = _SMILIES_MI_SMILIES; $adminmenu[$i]['link'] = "admin/smilies.php"; -$adminmenu[$i]['icon'] = '../../' . $pathIcon32 . '/smilies.png'; +$adminmenu[$i]['icon'] = $pathIcon32 . 'smilies.png'; $i++; $adminmenu[$i]['title'] = _SMILIES_MI_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = '../../' . $pathIcon32 . '/about.png'; +$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; ?> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -33,7 +33,7 @@ $xoops->header('smilies_smilies.html'); -$smiliesAdmin = new ModuleAdmin(); +$smiliesAdmin = new XoopsModuleAdmin(); $xoops->tpl->assign('navigation', $smiliesAdmin->addNavigation('smilies.php')); switch ($op) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -29,6 +29,9 @@ define("_SMILIES_AM_FILE","Smilie file"); define("_SMILIES_AM_IMAGE_PATH","Files exist in: %s"); define("_SMILIES_AM_LIST", "List of smilies"); +define("_SMILIES_AM_NBTOTAL","There are %s smilies in our database"); +define("_SMILIES_AM_NBDISPLAY","There are %s visible smilies"); +define("_SMILIES_AM_NBNOTDISPLAY","There are %s smilies not visible"); define("_SMILIES_AM_OFF","Display in the form "); define("_SMILIES_AM_ON","Does not display in the form"); define("_SMILIES_AM_SAVE","Smilie saved"); 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 2011-12-04 20:26:13 UTC (rev 8407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2011-12-04 20:28:48 UTC (rev 8408) @@ -24,7 +24,7 @@ $modversion['description'] = _SMILIES_MI_DESC; $modversion['version'] = 0.1; $modversion['author'] = 'Mage'; -$modversion['pseudo'] = 'Mage'; +$modversion['nickname'] = 'Mage'; $modversion['credits'] = 'The XOOPS Project'; $modversion['license'] = 'GNU GPL 2.0'; $modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html/'; @@ -32,9 +32,6 @@ $modversion['help'] = 'page=help'; $modversion['image'] = 'images/logo.png'; $modversion['dirname'] = 'smilies'; -$modversion['dirmoduleadmin'] = 'Frameworks/moduleclasses'; -$modversion['icons16'] = 'Frameworks/moduleclasses/icons/16'; -$modversion['icons32'] = 'Frameworks/moduleclasses/icons/32'; //about $modversion['release_date'] = '2011/12/20'; $modversion['module_website_url'] = 'http://www.xoops.org/'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-12-11 20:08:13
|
Revision: 8460 http://xoops.svn.sourceforge.net/xoops/?rev=8460&view=rev Author: mageg Date: 2011-12-11 20:08:06 +0000 (Sun, 11 Dec 2011) Log Message: ----------- Updating smilies (draft 1) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 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/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/index.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/spinner.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/preloads/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/about.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -20,10 +20,8 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; -$xoops->header('smilies_about.html'); +$xoops->header(); $aboutAdmin = new XoopsModuleAdmin(); -$xoops->tpl->assign('navigation', $aboutAdmin->addNavigation('about.php')); -$xoops->tpl->assign('about', $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false)); -$xoops->footer(); -?> - +$aboutAdmin->renderNavigation('about.php'); +$aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/header.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -22,5 +22,4 @@ require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; $xoops = Xoops::getInstance(); -?> - +XoopsLoad::load('system', 'system'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -23,7 +23,7 @@ // Get smilies handler $smilies_Handler = $xoops->getHandler("smilies"); -$xoops->header('smilies_index.html'); +$xoops->header(); // smilies not display $criteria = new CriteriaCompo(); $criteria->add(new Criteria('display', 0)); @@ -37,15 +37,17 @@ // folder path $folder_path = XOOPS_ROOT_PATH . '/uploads/smilies'; -$indexAdmin = new XoopsModuleAdmin(); -$indexAdmin->addInfoBox(_SMILIES_MI_SMILIES); -$indexAdmin->addInfoBoxLine(_SMILIES_MI_SMILIES, _SMILIES_AM_NBTOTAL, $smilies_total); -$indexAdmin->addInfoBoxLine(_SMILIES_MI_SMILIES, _SMILIES_AM_NBDISPLAY, $smilies_display, 'Green'); -$indexAdmin->addInfoBoxLine(_SMILIES_MI_SMILIES, _SMILIES_AM_NBNOTDISPLAY, $smilies_notdisplay, 'Red'); -$indexAdmin->addConfigBoxLine($folder_path, 'folder'); -$indexAdmin->addConfigBoxLine(array($folder_path, '777'), 'chmod'); -$xoops->tpl->assign('navigation', $indexAdmin->addNavigation('index.php')); -$xoops->tpl->assign('about', $indexAdmin->renderIndex()); +$admin_page = new XoopsModuleAdmin(); + +$admin_page->addInfoBox(_MI_SMILIES_SMILIES, 'default'); +$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBTOTAL, $smilies_total), 'default'); +$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBDISPLAY, $smilies_display), 'default', 'green'); +$admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBNOTDISPLAY, $smilies_notdisplay), 'default', 'red'); + +$admin_page->addConfigBoxLine($folder_path, 'folder'); +$admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod'); + +$admin_page->renderButton(); +$admin_page->renderIndex(); + $xoops->footer(); -?> - Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -23,16 +23,14 @@ $adminmenu = array(); $i = 1; -$adminmenu[$i]['title'] = _SMILIES_MI_INDEX; +$adminmenu[$i]['title'] = _MI_SMILIES_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; $adminmenu[$i]['icon'] = $pathIcon32 . 'home.png'; $i++; -$adminmenu[$i]['title'] = _SMILIES_MI_SMILIES; +$adminmenu[$i]['title'] = _MI_SMILIES_SMILIES; $adminmenu[$i]['link'] = "admin/smilies.php"; $adminmenu[$i]['icon'] = $pathIcon32 . 'smilies.png'; $i++; -$adminmenu[$i]['title'] = _SMILIES_MI_ABOUT; +$adminmenu[$i]['title'] = _MI_SMILIES_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; -?> - +$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -20,7 +20,16 @@ * @version $Id$ */ include dirname(__FILE__) . '/header.php'; -include_once dirname(dirname(dirname(__FILE__))) . '/system/class/system.php'; +// Get main instance +$system = System::getInstance(); +// Check users rights +if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { + exit(_NOPERM); +} +// Check is active +if (!$xoops->getModuleConfig('active_smilies', 'system')) { + $xoops->redirect('admin.php', 2, _AM_SYSTEM_NOTACTIVE); +} // Parameters $nb_smilies = $xoops->getModuleConfig('smilies_pager'); $mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'); @@ -30,11 +39,11 @@ $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); // Get smilies handler $smilies_Handler = $xoops->getHandler("smilies"); - +// Call Header $xoops->header('smilies_smilies.html'); -$smiliesAdmin = new XoopsModuleAdmin(); -$xoops->tpl->assign('navigation', $smiliesAdmin->addNavigation('smilies.php')); +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('smilies.php'); switch ($op) { @@ -43,9 +52,12 @@ // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addScript('media/jquery/plugins/jquery.tablesorter.js'); - $xoops->theme->addScript('modules/system/js/admin.js'); - $smiliesAdmin->addItemButton(_SMILIES_AM_ADD, 'smilies.php?op=new_smilie', 'add'); - $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + $xoops->theme->addScript('media/xoops/xoops.js'); + + $admin_page->addTips(_AM_SMILIES_TIPS); + $admin_page->addItemButton(_AM_SMILIES_ADD, 'smilies.php?op=new_smilie', 'add'); + $admin_page->renderTips(); + $admin_page->renderButton(); // Get start pager $start = $system->cleanVars($_REQUEST, 'start', 0, 'int'); // Criteria @@ -70,9 +82,9 @@ : 'blank.gif'; $smilies['image'] = '<img src="' . XOOPS_UPLOAD_URL . '/' . $smilies_img . '" alt="" />'; $smilies['edit_delete'] = '<a href="admin.php?fct=smilies&op=edit_smilie&smilies_id=' . $smilies_id . '"> - <img src="./images/icons/edit.png" border="0" alt="' . _SMILIES_AM_EDIT . '" title="' . _SMILIES_AM_EDIT . '"></a> + <img src="./images/icons/edit.png" border="0" alt="' . _AM_SMILIES_EDIT . '" title="' . _AM_SMILIES_EDIT . '"></a> <a href="admin.php?fct=smilies&op=smilies_delete&smilies_id=' . $smilies_id . '"> - <img src="./images/icons/delete.png" border="0" alt="' . _SMILIES_AM_DELETE . '" title="' . _SMILIES_AM_DELETE . '"></a>'; + <img src="./images/icons/delete.png" border="0" alt="' . _AM_SMILIES_DELETE . '" title="' . _AM_SMILIES_DELETE . '"></a>'; $xoops->tpl->append_by_ref('smilies', $smilies); unset($smilies); } @@ -88,8 +100,11 @@ case "new_smilie": // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); - $smiliesAdmin->addItemButton(_SMILIES_AM_LIST, 'smilies.php', 'list'); - $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + $admin_page->addTips(sprintf(_AM_SMILIES_TIPS_FORM1, implode(', ', $mimetypes)) . sprintf(_AM_SMILIES_TIPS_FORM2, $upload_size / 1000)); + $admin_page->addItemButton(_AM_SMILIES_ADD, 'smilies.php?op=new_smilie', 'add'); + $admin_page->addItemButton(_AM_SMILIES_LIST, 'smilies.php', 'list'); + $admin_page->renderTips(); + $admin_page->renderButton(); // Create form $obj = $smilies_Handler->create(); $form = $xoops->getModuleForm($obj, 'smilies'); @@ -101,8 +116,11 @@ case "edit_smilie": // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); - $smiliesAdmin->addItemButton(_SMILIES_AM_LIST, 'smilies.php', 'list'); - $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + $admin_page->addTips(sprintf(_AM_SMILIES_TIPS_FORM1, implode(', ', $mimetypes)) . sprintf(_AM_SMILIES_TIPS_FORM2, $upload_size / 1000)); + $admin_page->addItemButton(_AM_SMILIES_ADD, 'smilies.php?op=new_smilie', 'add'); + $admin_page->addItemButton(_AM_SMILIES_LIST, 'smilies.php', 'list'); + $admin_page->renderTips(); + $admin_page->renderButton(); // Create form $obj = $smilies_Handler->get($system->cleanVars($_REQUEST, 'smilies_id', 0, 'int')); $form = $xoops->getModuleForm($obj, 'smilies'); @@ -142,16 +160,16 @@ $obj->setVar("smile_url", 'smilies/' . $_POST["smile_url"]); } if ($smilies_Handler->insert($obj)) { - $xoops->redirect("smilies.php?fct=smilies", 2, _SMILIES_AM_SAVE); + $xoops->redirect("smilies.php?fct=smilies", 2, _AM_SMILIES_SAVE); } $xoops->error($obj->getHtmlErrors()); break; //Del a smilie case "smilies_delete": - $smiliesAdmin->addItemButton(_SMILIES_AM_LIST, 'smilies.php', 'list'); - $smiliesAdmin->addItemButton(_SMILIES_AM_ADD, 'smilies.php?op=new_smilie', 'add'); - $xoops->tpl->assign('button', $smiliesAdmin->renderButton()); + $admin_page->addItemButton(_AM_SMILIES_ADD, 'smilies.php?op=new_smilie', 'add'); + $admin_page->addItemButton(_AM_SMILIES_LIST, 'smilies.php', 'list'); + $admin_page->renderButton(); $smilies_id = $system->cleanVars($_REQUEST, 'smilies_id', 0, 'int'); $obj = $smilies_Handler->get($smilies_id); if (isset($_POST["ok"]) && $_POST["ok"] == 1) { @@ -164,7 +182,7 @@ chmod($urlfile, 0777); unlink($urlfile); } - $xoops->redirect("smilies.php", 2, _SMILIES_AM_SAVE); + $xoops->redirect("smilies.php", 2, _AM_SMILIES_SAVE); } else { $xoops->error($obj->getHtmlErrors()); } @@ -174,7 +192,7 @@ $smilies_img = ($obj->getVar("smile_url")) ? $obj->getVar("smile_url") : 'blank.gif'; $xoops->confirm(array( "ok" => 1, "smilies_id" => $_REQUEST["smilies_id"], "op" => "smilies_delete" - ), $_SERVER["REQUEST_URI"], sprintf(_SMILIES_AM_SUREDEL) . '<br \><img src="' . XOOPS_UPLOAD_URL . '/' . $smilies_img . '" alt="" /><br \>'); + ), $_SERVER["REQUEST_URI"], sprintf(_AM_SMILIES_SUREDEL) . '<br \><img src="' . XOOPS_UPLOAD_URL . '/' . $smilies_img . '" alt="" /><br \>'); } break; @@ -192,8 +210,4 @@ } break; } - - -$xoops->footer(); -?> - +$xoops->footer(); \ 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 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/class/form/smilies.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -36,15 +36,15 @@ } - $title = $obj->isNew() ? sprintf(_SMILIES_AM_ADD) : sprintf(_SMILIES_AM_EDIT); + $title = $obj->isNew() ? sprintf(_AM_SMILIES_ADD) : sprintf(_AM_SMILIES_EDIT); parent::__construct($title, 'form', 'smilies.php', 'post', true); $this->setExtra('enctype="multipart/form-data"'); - $this->addElement(new XoopsFormText(_SMILIES_AM_CODE, 'code', 26, 25, $obj->getVar('code')), true); - $this->addElement(new XoopsFormText(_SMILIES_AM_DESCRIPTION, 'emotion', 50, 50, $obj->getVar('emotion')), true); + $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); - $imgtray_img = new XoopsFormElementTray( _SMILIES_AM_FILE, '<br />' ); - $imgpath_img = sprintf( _SMILIES_AM_IMAGE_PATH, XOOPS_UPLOAD_PATH . '/smilies/' ); + $imgtray_img = new XoopsFormElementTray( _AM_SMILIES_FILE, '<br />' ); + $imgpath_img = sprintf( _AM_SMILIES_IMAGE_PATH, XOOPS_UPLOAD_PATH . '/smilies/' ); $imageselect_img = new XoopsFormSelect( $imgpath_img, 'smile_url', $blank_img ); $image_array_img = XoopsLists::getImgListAsArray( XOOPS_UPLOAD_PATH . '/smilies' ); $imageselect_img->addOption("$blank_img", $blank_img); @@ -56,7 +56,7 @@ $imgtray_img->addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_UPLOAD_URL . "/smilies/" . $blank_img . "' name='image_img' id='xo-smilies-img' alt='' />" ) ); $fileseltray_img = new XoopsFormElementTray('<br />','<br /><br />'); - $fileseltray_img->addElement(new XoopsFormFile(_SMILIES_AM_UPLOADS , 'smile_url', 500000),false); + $fileseltray_img->addElement(new XoopsFormFile(_AM_SMILIES_UPLOADS , 'smile_url', 500000),false); $fileseltray_img->addElement(new XoopsFormLabel(''), false); $imgtray_img->addElement($fileseltray_img); $this->addElement($imgtray_img); @@ -68,9 +68,9 @@ $display = 0; } - $this->addElement(new XoopsFormRadioYN(_SMILIES_AM_OFF, 'display', $display)); + $this->addElement(new XoopsFormRadioYN(_AM_SMILIES_OFF, 'display', $display)); $this->addElement(new XoopsFormHidden('op', 'save_smilie')); $this->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); } -} +} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/spinner.gif =================================================================== (Binary files differ) Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/index.html 2011-12-11 20:08:06 UTC (rev 8460) @@ -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/smilies/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/admin.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -19,24 +19,28 @@ * @author Mage Grégory (AKA Mage) * @version $Id$ */ -define("_SMILIES_AM_ACTION","Action"); -define("_SMILIES_AM_ADD", "Add a new smilie"); -define("_SMILIES_AM_CODE","Code"); -define("_SMILIES_AM_DELETE","Delete smilie"); -define("_SMILIES_AM_DESCRIPTION","Description"); -define("_SMILIES_AM_DISPLAY","Display in form"); -define("_SMILIES_AM_EDIT","Edit smilie"); -define("_SMILIES_AM_FILE","Smilie file"); -define("_SMILIES_AM_IMAGE_PATH","Files exist in: %s"); -define("_SMILIES_AM_LIST", "List of smilies"); -define("_SMILIES_AM_NBTOTAL","There are %s smilies in our database"); -define("_SMILIES_AM_NBDISPLAY","There are %s visible smilies"); -define("_SMILIES_AM_NBNOTDISPLAY","There are %s smilies not visible"); -define("_SMILIES_AM_OFF","Display in the form "); -define("_SMILIES_AM_ON","Does not display in the form"); -define("_SMILIES_AM_SAVE","Smilie saved"); -define("_SMILIES_AM_SUREDEL","Are you sure you want to delete this smilie?"); -define("_SMILIES_AM_SMILIE","Smilie"); -define("_SMILIES_AM_UPLOADS","Upload"); -?> +define("_AM_SMILIES_ACTION","Action"); +define("_AM_SMILIES_ADD", "Add a new smilie"); +define("_AM_SMILIES_CODE","Code"); +define("_AM_SMILIES_DELETE","Delete smilie"); +define("_AM_SMILIES_DESCRIPTION","Description"); +define("_AM_SMILIES_DISPLAY","Display in form"); +define("_AM_SMILIES_EDIT","Edit smilie"); +define("_AM_SMILIES_FILE","Smilie file"); +define("_AM_SMILIES_IMAGE_PATH","Files exist in: %s"); +define("_AM_SMILIES_LIST", "List of smilies"); +define("_AM_SMILIES_NBTOTAL","There are %s smilies in our database"); +define("_AM_SMILIES_NBDISPLAY","There are %s visible smilies"); +define("_AM_SMILIES_NBNOTDISPLAY","There are %s smilies not visible"); +define("_AM_SMILIES_OFF","Display in the form "); +define("_AM_SMILIES_ON","Does not display in the form"); +define("_AM_SMILIES_SAVE","Smilie saved"); +define("_AM_SMILIES_SUREDEL","Are you sure you want to delete this smilie?"); +define("_AM_SMILIES_SMILIE","Smilie"); +define("_AM_SMILIES_UPLOADS","Upload"); + +// Tips +define("_AM_SMILIES_TIPS","<ul><li>Add, update or delete smilies</li></ul>"); +define("_AM_SMILIES_TIPS_FORM1","<ul><li>Authorized mime types: %s</li>"); +define("_AM_SMILIES_TIPS_FORM2","<li>Max uploaded files size: %s ko</li></ul>"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -20,13 +20,12 @@ * @version $Id$ */ // Info module -define("_SMILIES_MI_NAME", "Smilies"); -define("_SMILIES_MI_DESC", "Module for managing smilies"); +define("_MI_SMILIES_NAME", "Smilies"); +define("_MI_SMILIES_DESC", "Module for managing smilies"); // Menu -define("_SMILIES_MI_INDEX", "Home"); -define("_SMILIES_MI_SMILIES", "Smilies manager"); -define("_SMILIES_MI_ABOUT", "About"); +define("_MI_SMILIES_INDEX", "Home"); +define("_MI_SMILIES_SMILIES", "Smilies manager"); +define("_MI_SMILIES_ABOUT", "About"); // Preferences -define("_SMILIES_MI_PREFERENCE_PAGER", "Number of smilies to display per page"); -?> +define("_MI_SMILIES_PREFERENCE_PAGER", "Number of smilies to display per page"); Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_about.html 2011-12-11 20:08:06 UTC (rev 8460) @@ -1,2 +0,0 @@ -<{$navigation}> -<{$about}> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_index.html 2011-12-11 20:08:06 UTC (rev 8460) @@ -1,2 +0,0 @@ -<{$navigation}> -<{$about}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html 2011-12-11 20:08:06 UTC (rev 8460) @@ -1,18 +1,21 @@ <script type="text/javascript"> - IMG_ON = '<{xoAdminIcons success.png}>'; - IMG_OFF = '<{xoAdminIcons cancel.png}>'; + Xoops.setStatusImg('accept', '<{xoAdminIcons success.png}>'); + Xoops.setStatusImg('cancel', '<{xoAdminIcons cancel.png}>'); + Xoops.setStatusText('accept', '<{$smarty.const._AM_SMILIES_OFF}>'); + Xoops.setStatusText('cancel', '<{$smarty.const._AM_SMILIES_ON}>'); </script> -<{$navigation}> -<{$button}> +<{includeq file="admin:system|admin_navigation.html"}> +<{includeq file="admin:system|admin_tips.html"}> +<{includeq file="admin:system|admin_buttons.html"}> <{if $smilies_count == true}> <table id="xo-smilies-sorter" cellspacing="1" class="outer tablesorter"> <thead> <tr> - <th class="txtcenter"><{$smarty.const._SMILIES_AM_CODE}></th> - <th class="txtcenter"><{$smarty.const._SMILIES_AM_SMILIE}></th> - <th class="txtcenter"><{$smarty.const._SMILIES_AM_DESCRIPTION}></th> - <th class="txtcenter"><{$smarty.const._SMILIES_AM_DISPLAY}></th> - <th class="txtcenter width10"><{$smarty.const._SMILIES_AM_ACTION}></th> + <th class="txtcenter"><{$smarty.const._AM_SMILIES_CODE}></th> + <th class="txtcenter"><{$smarty.const._AM_SMILIES_SMILIE}></th> + <th class="txtcenter"><{$smarty.const._AM_SMILIES_DESCRIPTION}></th> + <th class="txtcenter"><{$smarty.const._AM_SMILIES_DISPLAY}></th> + <th class="txtcenter width10"><{$smarty.const._AM_SMILIES_ACTION}></th> </tr> </thead> <tbody> @@ -22,15 +25,15 @@ <td class="txtcenter width5"><{$smilies.image}></td> <td class="txtcenter width50"><{$smilies.emotion}></td> <td class="xo-actions txtcenter width10"> - <img id="loading_sml<{$smilies.smilies_id}>" src="../images/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /> - <img class="cursorpointer tooltip" id="sml<{$smilies.smilies_id}>" onclick="system_setStatus( { op: 'smilies_update_display', smilies_id: <{$smilies.smilies_id}> }, 'sml<{$smilies.smilies_id}>', 'smilies.php' )" src="<{if $smilies.display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $smilies.display}><{$smarty.const._SMILIES_AM_OFF}><{else}><{$smarty.const._SMILIES_AM_ON}><{/if}>" title="<{if $smilies.display}><{$smarty.const._SMILIES_AM_OFF}><{else}><{$smarty.const._SMILIES_AM_ON}><{/if}>" /> + <img id="loading_sml<{$smilies.smilies_id}>" src="<{xoAppUrl media/xoops/images/spinner.gif}>" style="display:none;" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /> + <img class="cursorpointer tooltip" id="sml<{$smilies.smilies_id}>" onclick="Xoops.changeStatus( 'smilies.php', { op: 'smilies_update_display', smilies_id: <{$smilies.smilies_id}> }, 'sml<{$smilies.smilies_id}>', 'smilies.php' )" src="<{if $smilies.display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $smilies.display}><{$smarty.const._AM_SMILIES_OFF}><{else}><{$smarty.const._AM_SMILIES_ON}><{/if}>" title="<{if $smilies.display}><{$smarty.const._AM_SMILIES_OFF}><{else}><{$smarty.const._AM_SMILIES_ON}><{/if}>" /> </td> <td class="xo-actions txtcenter width10"> - <a class="tooltip" href="smilies.php?op=edit_smilie&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._SMILIES_AM_EDIT}>"> - <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._SMILIES_AM_EDIT}>" /> + <a class="tooltip" href="smilies.php?op=edit_smilie&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._AM_SMILIES_EDIT}>"> + <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_SMILIES_EDIT}>" /> </a> - <a class="tooltip" href="smilies.php?op=smilies_delete&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._SMILIES_AM_DELETE}>"> - <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._SMILIES_AM_DELETE}>" /> + <a class="tooltip" href="smilies.php?op=smilies_delete&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._AM_SMILIES_DELETE}>"> + <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_SMILIES_DELETE}>" /> </a> </td> </tr> 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 2011-12-11 17:04:52 UTC (rev 8459) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2011-12-11 20:08:06 UTC (rev 8460) @@ -20,8 +20,8 @@ * @version $Id$ */ $modversion = array(); -$modversion['name'] = _SMILIES_MI_NAME; -$modversion['description'] = _SMILIES_MI_DESC; +$modversion['name'] = _MI_SMILIES_NAME; +$modversion['description'] = _MI_SMILIES_DESC; $modversion['version'] = 0.1; $modversion['author'] = 'Mage'; $modversion['nickname'] = 'Mage'; @@ -51,12 +51,7 @@ $modversion['adminmenu'] = 'admin/menu.php'; // Admin Templates -$modversion['templates'][] = array( 'file' => 'smilies_index.html', 'description' => '', 'type' => 'admin' ); $modversion['templates'][] = array( 'file' => 'smilies_smilies.html', 'description' => '', 'type' => 'admin' ); -$modversion['templates'][] = array( 'file' => 'smilies_about.html', 'description' => '', 'type' => 'admin' ); -// Scripts to run upon installation or update -//$modversion['onInstall'] = 'include/install.php'; -//$modversion['onUpdate'] = 'include/update.php'; // JQuery $modversion['jquery'] = 1; @@ -64,10 +59,9 @@ // Preferences $i = 0; $modversion['config'][$i]['name'] = 'smilies_pager'; -$modversion['config'][$i]['title'] = '_SMILIES_MI_PREFERENCE_PAGER'; +$modversion['config'][$i]['title'] = '_MI_SMILIES_PREFERENCE_PAGER'; $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 20; -$i++; -?> +$i++; \ 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...> - 2011-12-29 17:52:48
|
Revision: 8621 http://xoops.svn.sourceforge.net/xoops/?rev=8621&view=rev Author: mageg Date: 2011-12-29 17:52:42 +0000 (Thu, 29 Dec 2011) Log Message: ----------- small corrections in the smilies module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-29 07:49:46 UTC (rev 8620) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/smilies.php 2011-12-29 17:52:42 UTC (rev 8621) @@ -84,7 +84,7 @@ } // Display Page Navigation if ($smilies_count > $nb_smilies) { - $nav = new XoopsPageNav($smilies_count, $nb_smilies, $start, 'start', 'fct=smilies&op=list'); + $nav = new XoopsPageNav($smilies_count, $nb_smilies, $start, 'start', 'op=list'); $xoops->tpl->assign('nav_menu', $nav->renderNav(4)); } break; @@ -148,9 +148,11 @@ $obj->setVar("smile_url", 'smilies/' . $_POST["smile_url"]); } if ($smilies_Handler->insert($obj)) { - $xoops->redirect("smilies.php?fct=smilies", 2, _AM_SMILIES_SAVE); + $xoops->redirect("smilies.php", 2, _AM_SMILIES_SAVE); } $xoops->error($obj->getHtmlErrors()); + $form = $xoops->getModuleForm($obj, 'smilies'); + $xoops->tpl->assign('form', $form->render()); break; //Del a smilie Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php 2011-12-29 07:49:46 UTC (rev 8620) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/modinfo.php 2011-12-29 17:52:42 UTC (rev 8621) @@ -27,5 +27,4 @@ define("_MI_SMILIES_SMILIES", "Smilies manager"); define("_MI_SMILIES_ABOUT", "About"); // Preferences -define("_MI_SMILIES_PREFERENCE_PAGER", "Number of smilies to display per page"); - +define("_MI_SMILIES_PREFERENCE_PAGER", "Number of smilies to display per page"); \ 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: <for...@us...> - 2012-01-22 19:54:53
|
Revision: 8780 http://xoops.svn.sourceforge.net/xoops/?rev=8780&view=rev Author: forxoops Date: 2012-01-22 19:54:46 +0000 (Sun, 22 Jan 2012) Log Message: ----------- Change module as plugin and add default icons Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/logo_small.png Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo_small.png Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/index.html 2012-01-22 19:54:46 UTC (rev 8780) @@ -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/smilies/icons/logo_large.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/logo_large.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/logo_small.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/icons/logo_small.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo_small.png =================================================================== (Binary files differ) 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-01-22 17:02:30 UTC (rev 8779) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2012-01-22 19:54:46 UTC (rev 8780) @@ -19,6 +19,10 @@ * @author Mage Grégory (AKA Mage) * @version $Id$ */ + +/* + General settings + */ $modversion = array(); $modversion['name'] = _MI_SMILIES_NAME; $modversion['description'] = _MI_SMILIES_DESC; @@ -32,7 +36,10 @@ $modversion['help'] = 'page=help'; $modversion['image'] = 'images/logo.png'; $modversion['dirname'] = 'smilies'; -//about + +/* + Settings for configs +*/ $modversion['release_date'] = '2011/12/20'; $modversion['module_website_url'] = 'http://www.xoops.org/'; $modversion['module_website_name'] = 'XOOPS'; @@ -41,22 +48,39 @@ $modversion['min_xoops'] = '2.6.0'; $modversion['min_db'] = array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7'); -// Admin menu -// Set to 1 if you want to display menu generated by system module +/* + Admin menu + Set to 1 if you want to display menu generated by system module +*/ $modversion['system_menu'] = 1; -// Admin things +/* + Manage plugin + */ +$modversion['plugin'] = 1; +$modversion['plugin_module'][] = 'system'; + +/* + Admin things +*/ $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = 'admin/menu.php'; -// Admin Templates +/* + JQuery + Setting for load jquery library and library +*/ +$modversion['jquery'] = 1; + +/* + Admin Templates +*/ $modversion['templates'][] = array( 'file' => 'smilies_smilies.html', 'description' => '', 'type' => 'admin' ); -// JQuery -$modversion['jquery'] = 1; - -// Preferences +/* + Preferences +*/ $i = 0; $modversion['config'][$i]['name'] = 'smilies_pager'; $modversion['config'][$i]['title'] = '_MI_SMILIES_PREFERENCE_PAGER'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |