From: <tr...@us...> - 2012-12-11 14:04:00
|
Revision: 10357 http://sourceforge.net/p/xoops/svn/10357 Author: trabis Date: 2012-12-11 14:03:58 +0000 (Tue, 11 Dec 2012) Log Message: ----------- Cosmetic Change in codex menus Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/index.php 2012-12-11 11:53:17 UTC (rev 10356) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/index.php 2012-12-11 14:03:58 UTC (rev 10357) @@ -23,7 +23,8 @@ $files = XoopsLists::getFileListAsArray(dirname(__FILE__)); foreach ($files as $file) { if (!in_array($file, array('xoops_version.php', 'index.php'))) { - echo "<a href={$file}>{$file}</a><br/>"; + $fileName = ucfirst(str_replace('.php', '', $file)); + echo "<a href={$file}>{$fileName}</a><br/>"; } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php 2012-12-11 11:53:17 UTC (rev 10356) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php 2012-12-11 14:03:58 UTC (rev 10357) @@ -61,7 +61,8 @@ $i = 0; foreach ($files as $file) { if (!in_array($file, array('xoops_version.php', 'index.php'))) { - $modversion['sub'][$i]['name'] = $file; + $fileName = ucfirst(str_replace('.php', '', $file)); + $modversion['sub'][$i]['name'] = $fileName; $modversion['sub'][$i]['url'] = $file; $i++; } |
From: <tr...@us...> - 2012-12-28 00:39:15
|
Revision: 10583 http://sourceforge.net/p/xoops/svn/10583 Author: trabis Date: 2012-12-28 00:39:12 +0000 (Fri, 28 Dec 2012) Log Message: ----------- Updating menus for codex module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/menus.php Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/menus.php (from rev 10580, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/class/plugin/menus.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/menus.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/menus.php 2012-12-28 00:39:12 UTC (rev 10583) @@ -0,0 +1,53 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Class + * @subpackage Utils + * @since 1.0 + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class CodexMenusPlugin extends Xoops_Plugin_Abstract implements MenusPluginInterface +{ + /** + * expects an array of array containing: + * name, Name of the submenu + * url, Url of the submenu relative to the module + * ex: return array(0 => array( + * 'name' => _MI_PUBLISHER_SUB_SMNAME3; + * 'url' => "search.php"; + * )); + * + * @return array + */ + public function subMenus() + { + $ret = array(); + $files = XoopsLists::getFileListAsArray(dirname(dirname(dirname(__FILE__)))); + $i = 0; + foreach ($files as $file) { + if (!in_array($file, array('xoops_version.php', 'index.php'))) { + $fileName = ucfirst(str_replace('.php', '', $file)); + $ret[$i]['name'] = $fileName; + $ret[$i]['url'] = $file; + $i++; + } + } + return $ret; + } +} + Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php 2012-12-28 00:34:42 UTC (rev 10582) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/xoops_version.php 2012-12-28 00:39:12 UTC (rev 10583) @@ -57,16 +57,6 @@ // Menu $modversion['hasMain'] = 1; -$files = XoopsLists::getFileListAsArray(dirname(__FILE__)); -$i = 0; -foreach ($files as $file) { - if (!in_array($file, array('xoops_version.php', 'index.php'))) { - $fileName = ucfirst(str_replace('.php', '', $file)); - $modversion['sub'][$i]['name'] = $fileName; - $modversion['sub'][$i]['url'] = $file; - $i++; - } -} /* Blocks |
From: <du...@us...> - 2013-01-09 22:11:46
|
Revision: 10730 http://sourceforge.net/p/xoops/svn/10730 Author: dugris Date: 2013-01-09 22:11:42 +0000 (Wed, 09 Jan 2013) Log Message: ----------- Add codex samples and icons Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/system.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/menus-plugin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/system-plugin.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/system.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/system.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/system.php 2013-01-09 22:11:42 UTC (rev 10730) @@ -0,0 +1,106 @@ +<?php +/** + * Codex module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package Codex + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +class CodexSystemPlugin extends Xoops_Module_Plugin_Abstract implements SystemPluginInterface +{ + /** + * Used to synchronize a user number of posts + * Please return the number of posts the user as made in your module + * + * @param int $uid The uid of the user + * + * @return int Number of posts + */ + public function userPosts($uid) + { + $count = count(XoopsLists::getFileListAsArray($xoops->path('modules/codex/')))-2; + return $count; + } + + /** + * Used to populate the Waiting Block + * + * Expects an array containing: + * count : Number of waiting items, ex: 3 + * name : Name for the waiting items, ex: Pending approval + * link : Link for the waiting items, ex: Xoops::getInstance()->url('modules/comments/admin/main.php'); + * + * @return array + */ + public function waiting() + { + $xoops = Xoops::getInstance(); + $ret['count'] = count(XoopsLists::getFileListAsArray($xoops->path('modules/codex/')))-2; + $ret['name'] = $xoops->getHandlerModule()->getBydirname('codex')->getVar('name'); + $ret['link'] = $xoops->url('modules/codex/'); + return array(); + } + + /** + * Used to populate backend + * + * @param int $limit : Number of item for backend + * + * Expects an array containing: + * title : Title for the backend items + * link : Link for the backend items + * content : content for the backend items + * date : Date of the backend items + * + * @return array + */ + public function backend($limit) + { + $xoops = Xoops::getInstance(); + $myts = MyTextSanitizer::getInstance(); + $i=0; + $ret=array(); + + $files = XoopsLists::getFileListAsArray($xoops->path('modules/codex/')); + foreach ($files as $file) { + if (!in_array($file, array('xoops_version.php', 'index.php'))) { + $ret[$i]['title'] = ucfirst(str_replace('.php', '', $file)); + $ret[$i]['link'] = $xoops->url('modules/codex/' . $file); + $ret[$i]['content'] = 'Codex module : ' . ucfirst(str_replace('.php', '', $file)); + $ret[$i]['date'] = filemtime($xoops->path('modules/codex/' . $file)); + $i++; + } + } + return $ret; + } + + /** + * Used to populate the User Block + * + * Expects an array containing: + * name : Name for the Link + * link : Link relative to module + * image : Url of image to display, please use 16px*16px image + * + * @return array + */ + public function userMenus() + { + $xoops = Xoops::getInstance(); + $ret['name'] = Xoops::getInstance()->getHandlerModule()->getBydirname('codex')->getVar('name'); + $ret['link'] = 'index.php'; + $ret['image'] = $xoops->url('modules/codex/icons/logo_small.png'); + return $ret; + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/class/plugin/system.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev URL \ No newline at end of property Index: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons 2013-01-09 22:10:07 UTC (rev 10729) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons 2013-01-09 22:11:42 UTC (rev 10730) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons ___________________________________________________________________ Added: tsvn:autoprops ## -0,0 +1 ## +*.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; \ No newline at end of property Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/index.html 2013-01-09 22:11:42 UTC (rev 10730) @@ -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/codex/icons/logo_large.png =================================================================== (Binary files differ) Index: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_large.png =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_large.png 2013-01-09 22:10:07 UTC (rev 10729) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_large.png 2013-01-09 22:11:42 UTC (rev 10730) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_large.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_small.png =================================================================== (Binary files differ) Index: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_small.png =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_small.png 2013-01-09 22:10:07 UTC (rev 10729) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_small.png 2013-01-09 22:11:42 UTC (rev 10730) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/icons/logo_small.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/menus-plugin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/menus-plugin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/menus-plugin.php 2013-01-09 22:11:42 UTC (rev 10730) @@ -0,0 +1,33 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'mainfile.php'; + +$xoops = Xoops::getInstance(); +$xoops->header(); +echo " +You need to install the 'Menus' Module to get menus functionality<br /> +<br /> +The 'Menus' module provides a 'Plugin' interface that modules should implement<br /> +The new class Xoops_Module_Plugin is the class that makes using plugins simple and effective!<br /> +<br /> +See how Codex module hooks into the menus module just by using this codex/class/plugin/menus.php +"; + +Xoops_Utils::dumpFile(dirname(__FILE__) . '/class/plugin/menus.php'); +$xoops->footer(); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/menus-plugin.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev URL \ No newline at end of property Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/system-plugin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/system-plugin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/system-plugin.php 2013-01-09 22:11:42 UTC (rev 10730) @@ -0,0 +1,31 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'mainfile.php'; + +$xoops = Xoops::getInstance(); +$xoops->header(); +echo " +The 'System' module provides a 'Plugin' interface that modules should implement<br /> +The new class Xoops_Module_Plugin is the class that makes using plugins simple and effective!<br /> +<br /> +See how Codex module hooks into the system module just by using this codex/class/plugin/system.php +"; + +Xoops_Utils::dumpFile(dirname(__FILE__) . '/class/plugin/system.php'); +$xoops->footer(); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/system-plugin.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev URL \ No newline at end of property |