From: <be...@us...> - 2012-05-16 08:28:16
|
Revision: 9523 http://xoops.svn.sourceforge.net/xoops/?rev=9523&view=rev Author: beckmi Date: 2012-05-16 08:28:03 +0000 (Wed, 16 May 2012) Log Message: ----------- Fixing some bugs (Mazarin, Mamba, others) Modified Paths: -------------- XoopsModules/news/branches/mamba/news/admin/about.php XoopsModules/news/branches/mamba/news/admin/admin_footer.php XoopsModules/news/branches/mamba/news/admin/admin_header.php XoopsModules/news/branches/mamba/news/admin/groupperms.php XoopsModules/news/branches/mamba/news/admin/index.php XoopsModules/news/branches/mamba/news/admin/menu.php XoopsModules/news/branches/mamba/news/article.php XoopsModules/news/branches/mamba/news/backendt.php XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php XoopsModules/news/branches/mamba/news/class/class.newsstory.php XoopsModules/news/branches/mamba/news/class/wideimage/Canvas.class.php XoopsModules/news/branches/mamba/news/class/wideimage/Dimension.class.php XoopsModules/news/branches/mamba/news/class/wideimage/Exception.class.php XoopsModules/news/branches/mamba/news/class/wideimage/FileMapperFactory.class.php XoopsModules/news/branches/mamba/news/class/wideimage/Image.class.php XoopsModules/news/branches/mamba/news/class/wideimage/OpFactory.class.php XoopsModules/news/branches/mamba/news/class/wideimage/PaletteImage.class.php XoopsModules/news/branches/mamba/news/class/wideimage/TrueColorImage.class.php XoopsModules/news/branches/mamba/news/class/wideimage/WideImage.inc.php XoopsModules/news/branches/mamba/news/class/wideimage/mappers/ImageFileMapper_GD.class.php XoopsModules/news/branches/mamba/news/class/wideimage/mappers/ImageFileMapper_GD2.class.php XoopsModules/news/branches/mamba/news/class/wideimage/mappers/ImageFileMapper_GIF.class.php XoopsModules/news/branches/mamba/news/class/wideimage/mappers/ImageFileMapper_JPEG.class.php XoopsModules/news/branches/mamba/news/class/wideimage/mappers/ImageFileMapper_PNG.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/ApplyConvolution.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/ApplyFilter.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/ApplyMask.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/AsGrayscale.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/CopyChannelsPalette.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/CopyChannelsTrueColor.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/CorrectGamma.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Crop.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Flip.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/GetMask.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Merge.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Mirror.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Resize.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Rotate.class.php XoopsModules/news/branches/mamba/news/class/wideimage/operations/Unsharp.class.php XoopsModules/news/branches/mamba/news/docs/lang.diff XoopsModules/news/branches/mamba/news/extra/modules/tag/plugin/news.php XoopsModules/news/branches/mamba/news/include/install_function.php XoopsModules/news/branches/mamba/news/language/english/admin.php XoopsModules/news/branches/mamba/news/language/english/help/help.html XoopsModules/news/branches/mamba/news/language/german/newsletter.php XoopsModules/news/branches/mamba/news/list.tag.php XoopsModules/news/branches/mamba/news/print.php XoopsModules/news/branches/mamba/news/submit.php XoopsModules/news/branches/mamba/news/templates/news_article.html XoopsModules/news/branches/mamba/news/view.tag.php XoopsModules/news/branches/mamba/news/xoops_version.php Added Paths: ----------- XoopsModules/news/branches/mamba/news/admin/index.html XoopsModules/news/branches/mamba/news/class/news_stories.php XoopsModules/news/branches/mamba/news/class/news_topics.php XoopsModules/news/branches/mamba/news/language/englishUTF8/help/ XoopsModules/news/branches/mamba/news/language/englishUTF8/help/help.html XoopsModules/news/branches/mamba/news/language/englishUTF8/help/index.html XoopsModules/news/branches/mamba/news/language/french/help/help.html XoopsModules/news/branches/mamba/news/language/french/help/index.html XoopsModules/news/branches/mamba/news/language/frenchUTF8/help/help.html XoopsModules/news/branches/mamba/news/language/frenchUTF8/help/index.html XoopsModules/news/branches/mamba/news/language/german/help/help.html XoopsModules/news/branches/mamba/news/language/german/help/index.html XoopsModules/news/branches/mamba/news/language/italian/ XoopsModules/news/branches/mamba/news/language/italian/admin.php XoopsModules/news/branches/mamba/news/language/italian/aggiornamento.txt XoopsModules/news/branches/mamba/news/language/italian/blocks.php XoopsModules/news/branches/mamba/news/language/italian/help/ XoopsModules/news/branches/mamba/news/language/italian/help/help.html XoopsModules/news/branches/mamba/news/language/italian/help/index.html XoopsModules/news/branches/mamba/news/language/italian/index.html XoopsModules/news/branches/mamba/news/language/italian/mail_template/ XoopsModules/news/branches/mamba/news/language/italian/mail_template/global_newcategory_notify.tpl XoopsModules/news/branches/mamba/news/language/italian/mail_template/global_newstory_notify.tpl XoopsModules/news/branches/mamba/news/language/italian/mail_template/global_storysubmit_notify.tpl XoopsModules/news/branches/mamba/news/language/italian/mail_template/index.html XoopsModules/news/branches/mamba/news/language/italian/mail_template/story_approve_notify.tpl XoopsModules/news/branches/mamba/news/language/italian/mail_template/topic_newstory_notify.tpl XoopsModules/news/branches/mamba/news/language/italian/main.php XoopsModules/news/branches/mamba/news/language/italian/modinfo.php XoopsModules/news/branches/mamba/news/language/italian/newsletter.php Modified: XoopsModules/news/branches/mamba/news/admin/about.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/about.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/admin/about.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,28 +1,28 @@ -<?php -/** - * News 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://www.xoops.org) - * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} - * @package News - * @since 2.5.0 - * @author XOOPS Development Team - * @version $Id $ - **/ -include_once dirname(__FILE__) . '/admin_header.php'; - -xoops_cp_header(); - -$aboutAdmin = new ModuleAdmin(); - -echo $aboutAdmin->addNavigation('about.php'); -echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); - +<?php +/** + * News 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://www.xoops.org) + * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} + * @package News + * @since 2.5.0 + * @author XOOPS Development Team + * @version $Id $ + **/ +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/admin/admin_footer.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/admin_footer.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/admin/admin_footer.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -10,11 +10,15 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License * @package News - * @since 2.5.0 + * @since 1.6.7 * @author Mamba (www.xoops.org) * @version $Id $ **/ +echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" + . " <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>"; + xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/admin/admin_header.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/admin_header.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/admin/admin_header.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,44 +1,70 @@ -<?php -/** - * News 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 http://www.gnu.org/licenses/gpl-2.0.html GNU Public License - * @package news - * @since 2.5.0 - * @author XOOPS Development Team - * @version $Id $ -**/ -$path = dirname(dirname(dirname(dirname(__FILE__)))); -include_once $path . '/mainfile.php'; -include_once $path . '/include/cp_functions.php'; -require_once $path . '/include/cp_header.php'; - -global $xoopsModule; - -$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); - -//if functions.php file exist -require_once dirname(dirname(__FILE__)) . '/include/functions.php'; - -// Load language files -xoops_loadLanguage('admin', $thisModuleDir); -xoops_loadLanguage('modinfo', $thisModuleDir); -xoops_loadLanguage('main', $thisModuleDir); - -$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); -$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); -$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - -if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ - include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); - }else{ - redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); - } \ No newline at end of file +<?php +/** + * News 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 http://www.gnu.org/licenses/gpl-2.0.html GNU Public License + * @package news + * @since 1.6.7 + * @author XOOPS Development Team + * @version $Id $ +**/ +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); +$thisModulePath = dirname(dirname(__FILE__)); + +//if functions.php file exist +require_once dirname(dirname(__FILE__)) . '/include/functions.php'; +//require_once $thisModulePath . '/include/functions.php'; + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) { + include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); +} else { + redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, FALSE); +} + + +$topicsHandler=& xoops_getModuleHandler('news_topics','news'); +$storiesHandler=& xoops_getModuleHandler('news_stories','news'); + +$myts =& MyTextSanitizer::getInstance(); + +if ($xoopsUser) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); +} + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); +} + +$xoopsTpl->assign('pathIcon16', $pathIcon16); \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/admin/groupperms.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/groupperms.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/admin/groupperms.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -31,8 +31,9 @@ include_once XOOPS_ROOT_PATH . '/modules/news/admin/functions.php'; include_once 'admin_header.php'; xoops_cp_header(); +$permAdmin = new ModuleAdmin(); +echo $permAdmin->addNavigation('groupperms.php'); -//news_adminmenu(2); echo '<br /><br /><br />'; $permtoset = isset($_POST['permtoset']) ? intval($_POST['permtoset']) : 1; $selected = array('', '', ''); Added: XoopsModules/news/branches/mamba/news/admin/index.html =================================================================== --- XoopsModules/news/branches/mamba/news/admin/index.html (rev 0) +++ XoopsModules/news/branches/mamba/news/admin/index.html 2012-05-16 08:28:03 UTC (rev 9523) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/admin/index.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/index.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/admin/index.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -125,7 +125,7 @@ echo "<td align='center'><b>" . $autostory -> storyid() . "</b> </td><td align='left'><a href='" . XOOPS_URL . "/modules/news/article.php?storyid=" . $autostory->storyid() . "'>" . $autostory->title() . "</a> </td><td align='center'>" . $topic->topic_title() . " - </td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $autostory->uid() . "'>" . $autostory->uname() . "</a></td><td align='center' class='nw'>" . formatTimestamp($autostory->published(),$dateformat) . "</td><td align='center'>" . $expire . "</td><td align='center'><a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $autostory->storyid() . "'><img src='" . $pathIcon16."/edit.png. ' '. title="._AM_EDIT."> </a>-<a href='".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=" . $autostory->storyid() . "'><img src='" . $pathIcon16."/delete.png". ' '. 'title='._AM_DELETE."'></a>"; + </td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $autostory->uid() . "'>" . $autostory->uname() . "</a></td><td align='center' class='nw'>" . formatTimestamp($autostory->published(),$dateformat) . "</td><td align='center'>" . $expire . "</td><td align='center'><a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $autostory->storyid() . "'><img src='" . $pathIcon16."/edit.png. ' '. title="._AM_EDIT."> </a> <a href='".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=" . $autostory->storyid() . "'><img src='" . $pathIcon16."/delete.png. ' '. title='._AM_DELETE.'></a>"; echo "</td></tr>\n"; } @@ -276,7 +276,8 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; xoops_cp_header(); - //news_adminmenu(3); + $pruneAdmin = new ModuleAdmin(); + echo $pruneAdmin->addNavigation('index.php?op=prune'); echo '<br /><br /><br />'; $sform = new XoopsThemeForm(_AM_NEWS_PRUNENEWS, 'pruneform', XOOPS_URL.'/modules/news/admin/index.php', 'post'); $sform->addElement(new XoopsFormTextDateSelect(_AM_NEWS_PRUNE_BEFORE, 'prune_date',15,time()), true); @@ -369,7 +370,8 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; xoops_cp_header(); - //news_adminmenu(5); + $newsletterAdmin = new ModuleAdmin(); + echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter'); echo '<br /><br /><br />'; $sform = new XoopsThemeForm(_AM_NEWS_NEWSLETTER, 'newsletterform', XOOPS_URL.'/modules/news/admin/index.php', 'post'); $dates_tray = new XoopsFormElementTray(_AM_NEWS_NEWSLETTER_BETWEEN); @@ -412,7 +414,8 @@ { global $xoopsConfig, $dateformat; xoops_cp_header(); - //news_adminmenu(5); + $newsletterAdmin = new ModuleAdmin(); + echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter'); $newslettertemplate = ''; if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php')) { include_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php'; @@ -484,7 +487,8 @@ { include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; xoops_cp_header(); - //news_adminmenu(4); + $exportAdmin = new ModuleAdmin(); + echo $exportAdmin->addNavigation('index.php?op=export'); echo '<br /><br /><br />'; $sform = new XoopsThemeForm(_AM_NEWS_EXPORT_NEWS, 'exportform', XOOPS_URL.'/modules/news/admin/index.php', 'post'); $dates_tray = new XoopsFormElementTray(_AM_NEWS_EXPORT_BETWEEN); @@ -526,7 +530,8 @@ function LaunchExport() { xoops_cp_header(); - //news_adminmenu(4); + $exportAdmin = new ModuleAdmin(); + echo $exportAdmin->addNavigation('index.php?op=export'); echo '<br />'; $story = new NewsStory(); $topic= new NewsTopic(); @@ -632,8 +637,9 @@ global $xoopsDB, $xoopsConfig, $xoopsModule, $myts; include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; xoops_cp_header(); - //news_adminmenu(0); - + $topicAdmin = new ModuleAdmin(); + echo $topicAdmin->addNavigation('index.php?op=topicsmanager'); + global $pathIcon16; $uploadfolder=sprintf(_AM_UPLOAD_WARNING,XOOPS_URL . '/uploads/news/image'); @@ -645,10 +651,10 @@ $totaltopics = count($topics_arr); $class=''; - echo '<h4>' . _AM_CONFIG . '</h4>'; - news_collapsableBar('topicsmanager', 'toptopicsmanager'); + //echo '<h4>' . _AM_CONFIG . '</h4>'; + //news_collapsableBar('topicsmanager', 'toptopicsmanager'); - echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='toptopicsmanager' name='toptopicsmanager' src='" . $pathIcon16."/close12.gif' alt='' /></a> "._AM_TOPICSMNGR . ' (' . $totaltopics . ')'."</h4>"; + //echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='toptopicsmanager' name='toptopicsmanager' src='" . $pathIcon16."/close12.gif' alt='' /></a> "._AM_TOPICSMNGR . ' (' . $totaltopics . ')'."</h4>"; echo "<div id='topicsmanager'>"; @@ -1110,12 +1116,13 @@ } else { include_once XOOPS_ROOT_PATH.'/modules/news/language/english/main.php'; } - //news_adminmenu(6); + $statsAdmin = new ModuleAdmin(); + echo $statsAdmin->addNavigation('index.php?op=stats'); $news = new NewsStory(); $stats = array(); $stats=$news->GetStats(news_getmoduleoption('storycountadmin')); $totals=array(0,0,0,0,0); - printf("<h1>%s</h1>\n",_AM_NEWS_STATS); + //printf("<h1>%s</h1>\n",_AM_NEWS_STATS); // First part of the stats, everything about topics $storiespertopic=$stats['storiespertopic']; @@ -1254,8 +1261,9 @@ } else { include_once XOOPS_ROOT_PATH.'/modules/news/language/english/main.php'; } - //news_adminmenu(8); - echo "<h1>"._AM_NEWS_METAGEN."</h1>"; + $metagenAdmin = new ModuleAdmin(); + echo $metagenAdmin->addNavigation('index.php?op=metagen'); + //echo "<h1>"._AM_NEWS_METAGEN."</h1>"; echo _AM_NEWS_METAGEN_DESC."<br /><br />"; // Metagen Options @@ -1368,8 +1376,7 @@ } elseif(isset($_GET['op'])) { $op=$_GET['op']; } - - +$indexAdmin = new ModuleAdmin(); switch ($op) { case 'deletefile': xoops_cp_header(); @@ -1394,7 +1401,7 @@ case 'newarticle': xoops_cp_header(); - //news_adminmenu(1); + echo $indexAdmin->addNavigation('index.php?op=newarticle'); echo '<h4>' . _AM_CONFIG . '</h4>'; include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; newSubmissions(); @@ -1470,7 +1477,7 @@ } break; - case 'topicsmanager': + case 'topicsmanager': topicsmanager(); break; @@ -1496,6 +1503,7 @@ break; case 'prune': + echo $indexAdmin->addNavigation('index.php?op=prune'); PruneManager(); break; @@ -1508,6 +1516,7 @@ break; case 'export': + echo $indexAdmin->addNavigation('index.php?op=export'); NewsExport(); break; @@ -1516,18 +1525,22 @@ break; case 'configurenewsletter': + //echo $indexAdmin->addNavigation('index.php?op=configurenewsletter'); Newsletter(); break; case 'launchnewsletter': + //echo $indexAdmin->addNavigation('index.php?op=configurenewsletter'); LaunchNewsletter(); break; case 'stats': + echo $indexAdmin->addNavigation('index.php?op=stats'); Stats(); break; case 'metagen': + echo $indexAdmin->addNavigation('index.php?op=metagen'); Metagen(); break; @@ -1558,10 +1571,34 @@ XOOPS_ROOT_PATH . '/uploads/news/', XOOPS_ROOT_PATH . '/uploads/news/file', XOOPS_ROOT_PATH . '/uploads/news/image', - ); - - $indexAdmin = new ModuleAdmin(); - + ); + + //compte "total" + $count_stories = $storiesHandler->getCount(); + //compte "attente" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("menu", 1)); + $stories_ihome = $storiesHandler->getCount($criteria); + + //compte "total" + $count_topics = $topicsHandler->getCount(); + //compte "attente" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("menu", 1)); + $topics_menu = $topicsHandler->getCount($criteria); + + $clr_count_stories = ($count_stories == 0) ? 'red': 'green'; + $clr_count_topics = ($count_topics == 0) ? 'red': 'green'; + $clr_ihome_stories = ($stories_ihome == 0) ? 'red': 'green'; + $clr_menu_topics = ($topics_menu == 0) ? 'red': 'green'; + + $indexAdmin->addInfoBox(_AM_NEWS_STATISTICS); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_TOPICS, $count_topics, $clr_count_topics); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_TOPICS_ONLINE, $topics_menu, $clr_menu_topics); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES, $count_stories, $clr_count_stories); + $indexAdmin->addInfoBoxLine(_AM_NEWS_STATISTICS,_AM_NEWS_THEREARE_STORIES_ONLINE, $stories_ihome, $clr_ihome_stories); + + foreach (array_keys( $folder) as $i) { $indexAdmin->addConfigBoxLine($folder[$i], 'folder'); $indexAdmin->addConfigBoxLine(array($folder[$i], '777'), 'chmod'); Modified: XoopsModules/news/branches/mamba/news/admin/menu.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/menu.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/admin/menu.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -27,16 +27,24 @@ defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); -$dirname = basename(dirname(dirname(__FILE__))); -$module_handler = xoops_gethandler('module'); -$module = $module_handler->getByDirname($dirname); -$pathIcon32 = $module->getInfo('icons32'); +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; -//xoops_loadLanguage('admin', $dirname); +$dirname = basename(dirname(dirname(__FILE__))); +$module_handler = xoops_gethandler('module'); +$module = $module_handler->getByDirname($dirname); +$pathIcon32 = $module->getInfo('icons32'); +$pathModuleAdmin = $module->getInfo('dirmoduleadmin'); +$pathLanguage = $path . $pathModuleAdmin; +if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { + $fileinc = $pathLanguage . '/language/english/main.php'; +} + +include_once $fileinc; + $adminmenu = array(); -global $xoopsModule; $i = 1; $adminmenu[$i]["title"] = _MI_NEWS_HOME; @@ -81,7 +89,6 @@ $adminmenu[$i]['title'] = _MI_NEWS_METAGEN; $adminmenu[$i]['link'] = "admin/index.php?op=metagen"; $adminmenu[$i]['icon'] = $pathIcon32.'/metagen.png'; - $i++; $adminmenu[$i]['title'] = _MI_NEWS_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; Modified: XoopsModules/news/branches/mamba/news/article.php =================================================================== --- XoopsModules/news/branches/mamba/news/article.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/article.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -279,7 +279,7 @@ if(is_object($xoopsUser)) { if( $xoopsUser->isAdmin($xoopsModule->getVar('mid')) || (news_getmoduleoption('authoredit') && $article->uid() == $xoopsUser->getVar('uid')) ) { $isadmin = true; - $story['adminlink'] = $article->adminlink(); +// $story['adminlink'] = $article->adminlink(); } } $story['topicid'] = $article->topicid(); Modified: XoopsModules/news/branches/mamba/news/backendt.php =================================================================== --- XoopsModules/news/branches/mamba/news/backendt.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/backendt.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -66,7 +66,7 @@ header ('Content-Type:text/xml; charset='.$charset); $story = new NewsStory(); $tpl = new XoopsTpl(); -$tpl->xoops_setCaching(2); +$tpl->caching=2; $tpl->xoops_setCacheTime(3600); // Change this to the value you want if (!$tpl->is_cached('db:news_rss.html', $topicid)) { $xt = new NewsTopic($topicid); Modified: XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php =================================================================== --- XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,60 +1,60 @@ -<?php -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------- // -// 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. // -// // -// 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. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // - -if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); -} - -function news_tag_block_cloud_show($options) -{ - require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; - if(!isset($moduleDirName)) { - $moduleDirName = 'news'; - } - return tag_block_cloud_show($options, $moduleDirName); -} - -function news_tag_block_cloud_edit($options) -{ - require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; - return tag_block_cloud_edit($options); -} - -function news_tag_block_top_show($options) -{ - require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; - if(!isset($moduleDirName)) { - $moduleDirName = 'news'; - } - return tag_block_top_show($options, $moduleDirName); -} - -function news_tag_block_top_edit($options) -{ - require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; - return tag_block_top_edit($options); -} +<?php +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------- // +// 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. // +// // +// 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. 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // + +if (!defined('XOOPS_ROOT_PATH')) { + die('XOOPS root path not defined'); +} + +function news_tag_block_cloud_show($options) +{ + require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; + if(!isset($moduleDirName)) { + $moduleDirName = 'news'; + } + return tag_block_cloud_show($options, $moduleDirName); +} + +function news_tag_block_cloud_edit($options) +{ + require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; + return tag_block_cloud_edit($options); +} + +function news_tag_block_top_show($options) +{ + require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; + if(!isset($moduleDirName)) { + $moduleDirName = 'news'; + } + return tag_block_top_show($options, $moduleDirName); +} + +function news_tag_block_top_edit($options) +{ + require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; + return tag_block_top_edit($options); +} ?> \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/class/class.newsstory.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/class.newsstory.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/class.newsstory.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -42,6 +42,8 @@ public $picture; public $topic_imgurl; public $topic_title; +// public $subtitle; +// public $pictureinfo; /** @@ -560,10 +562,9 @@ $module_handler =& xoops_gethandler('module'); $moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathIcon16 = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathIcon16 = $moduleInfo->getInfo('icons16'); - $ret = " <a href=".XOOPS_URL."/modules/news/submit.php?op=edit&storyid=".$this->storyid()."><img src=" . $pathIcon16 .'/edit.png'. ' '.'title='._NW_EDIT."></a>" ."<a href=".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=".$this->storyid()."><img src=" . $pathIcon16."/delete.png". ' '."title="._NW_DELETE."></a> " ; @@ -646,7 +647,7 @@ $module_handler =& xoops_gethandler('module'); $moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); - $pathIcon16 = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); + $pathIcon16 = $moduleInfo->getInfo('icons16'); $myts =& MyTextSanitizer::getInstance(); $infotips = news_getmoduleoption('infotips'); @@ -681,7 +682,12 @@ $story['text'] = $this->hometext(); $story['text'] = str_replace('[summary]', $auto_summary, $story['text']); - $story['picture'] = XOOPS_URL.'/uploads/news/image/'.$this->picture(); + //$story['picture'] = XOOPS_URL.'/uploads/news/image/'.$this->picture(); + if ($this->picture() != ''){ + $story['picture'] = XOOPS_URL.'/uploads/news/image/'.$this->picture(); + } else { + $story['picture'] = ''; + } $story['pictureinfo'] = $this->pictureinfo(); $introcount = strlen($story['text']); @@ -915,6 +921,11 @@ return $this->pictureinfo; } + function subtitle() + { + return $this->subtitle; + } + function rating() { return $this->rating; @@ -1368,11 +1379,11 @@ } -class news_NewsStoryHandler extends XoopsPersistableObjectHandler -{ - function __construct(&$db) - { - parent::__construct($db, "stories", 'stories', 'storieid', 'title'); - } +class news_NewsStoryHandler extends XoopsPersistableObjectHandler +{ + function __construct(&$db) + { + parent::__construct($db, "stories", 'stories', 'storieid', 'title'); + } } ?> Added: XoopsModules/news/branches/mamba/news/class/news_stories.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/news_stories.php (rev 0) +++ XoopsModules/news/branches/mamba/news/class/news_stories.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -0,0 +1,89 @@ +<?php +/** + * **************************************************************************** + * - Developers TEAM TDM Xoops - (http://www.xoops.org) + * **************************************************************************** + * NEWS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2011 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * 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. See the + * GNU General Public License for more details. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package news + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.67 Tue 2012/02/13 22:29:36 : Timgno Exp $ + * **************************************************************************** + */ +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +if (!class_exists("XoopsPersistableObjectHandler")) { + include_once XOOPS_ROOT_PATH."/kernel/object.php"; +} + +class news_stories extends XoopsObject +{ + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("storyid",XOBJ_DTYPE_INT,null,false,8); + $this->initVar("uid",XOBJ_DTYPE_INT,null,false,5); + $this->initVar("title",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("created",XOBJ_DTYPE_INT,null,false,10); + $this->initVar("published",XOBJ_DTYPE_INT,null,false,10); + $this->initVar("expired",XOBJ_DTYPE_INT,null,false,10); + $this->initVar("hostname",XOBJ_DTYPE_TXTBOX,null,false,150); + $this->initVar("nohtml",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("nosmiley",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("hometext",XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("bodytext",XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("keywords",XOBJ_DTYPE_TXTBOX,null,false,255); + $this->initVar("description",XOBJ_DTYPE_TXTBOX,null,false,255); + $this->initVar("counter",XOBJ_DTYPE_INT,null,false,8); + $this->initVar("topicid",XOBJ_DTYPE_INT,null,false,4); + $this->initVar("ihome",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("notifypub",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("story_type",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("topicdisplay",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("topicalign",XOBJ_DTYPE_TXTBOX,null,false,1); + $this->initVar("comments",XOBJ_DTYPE_INT,null,false,5); + $this->initVar("rating",XOBJ_DTYPE_DECIMAL,null,false,6,4); + $this->initVar("votes",XOBJ_DTYPE_INT,null,false,11); + $this->initVar("picture",XOBJ_DTYPE_TXTBOX,null,false,50); + $this->initVar("pictureinfo",XOBJ_DTYPE_TXTBOX,null,false,255); + $this->initVar("subtitle",XOBJ_DTYPE_TXTBOX,null,false,255); + } + + function news_stories() + { + $this->__construct(); + } +} +class newsnews_storiesHandler extends XoopsPersistableObjectHandler +{ + function __construct(&$db) + { + parent::__construct($db, "news_stories", "stories", "storyid", "uid"); + } +} +?> \ No newline at end of file Added: XoopsModules/news/branches/mamba/news/class/news_topics.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/news_topics.php (rev 0) +++ XoopsModules/news/branches/mamba/news/class/news_topics.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -0,0 +1,73 @@ +<?php +/** + * **************************************************************************** + * - Developers TEAM TDM Xoops - (http://www.xoops.org) + * **************************************************************************** + * NEWS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2011 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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. + * + * 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. See the + * GNU General Public License for more details. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package news + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.67 Tue 2012/02/13 22:29:36 : Timgno Exp $ + * **************************************************************************** + */ +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +if (!class_exists("XoopsPersistableObjectHandler")) { + include_once XOOPS_ROOT_PATH."/kernel/object.php"; +} + +class news_topics extends XoopsObject +{ + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("topic_id",XOBJ_DTYPE_INT,null,false,4); + $this->initVar("topic_pid",XOBJ_DTYPE_INT,null,false,4); + $this->initVar("topic_title",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("topic_imgurl",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("menu",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("topic_frontpage",XOBJ_DTYPE_INT,null,false,1); + $this->initVar("topic_rssurl",XOBJ_DTYPE_TXTBOX,null,false); + $this->initVar("topic_description",XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("topic_color",XOBJ_DTYPE_TXTBOX,null,false); + } + + function news_topics() + { + $this->__construct(); + } +} +class newsnews_topicsHandler extends XoopsPersistableObjectHandler +{ + function __construct(&$db) + { + parent::__construct($db, "news_topics", "topics", "topic_id", "topic_pid"); + } +} + +?> \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/class/wideimage/Canvas.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/Canvas.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/Canvas.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,48 +1,48 @@ -<?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with WideImage; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - **/ - - class wiCanvas - { - protected $handle = 0; - protected $image = null; - protected $font = null; - - function __construct($img) - { - $this->handle = $img->getHandle(); - $this->image = $img; - } - - function setFont($font) - { - $this->font = $font; - } - - function writeText($x, $y, $text, $angle) - { - $angle = - floatval($angle); - if ($angle < 0) - $angle = 360 + $angle; - $angle = $angle % 360; - - $box = $this->font->getBoundsRect($text); - $this->font->writeText($this->image, $x + $box['offset_x'], $y + $box['offset_y'], $text, $angle); - } - } +<?php + /** + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + **/ + + class wiCanvas + { + protected $handle = 0; + protected $image = null; + protected $font = null; + + function __construct($img) + { + $this->handle = $img->getHandle(); + $this->image = $img; + } + + function setFont($font) + { + $this->font = $font; + } + + function writeText($x, $y, $text, $angle) + { + $angle = - floatval($angle); + if ($angle < 0) + $angle = 360 + $angle; + $angle = $angle % 360; + + $box = $this->font->getBoundsRect($text); + $this->font->writeText($this->image, $x + $box['offset_x'], $y + $box['offset_y'], $text, $angle); + } + } ?> \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/class/wideimage/Dimension.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/Dimension.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/Dimension.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,22 +1,22 @@ <?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with WideImage; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - **/ - + /** + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + **/ + class wiDimension { static function isPercent($dim) Modified: XoopsModules/news/branches/mamba/news/class/wideimage/Exception.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/Exception.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/Exception.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,22 +1,22 @@ <?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with WideImage; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - **/ - + /** + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + **/ + // hack for those without SPL -- define RuntimeException if (!class_exists('RuntimeException')) { Modified: XoopsModules/news/branches/mamba/news/class/wideimage/FileMapperFactory.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/FileMapperFactory.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/FileMapperFactory.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,22 +1,22 @@ <?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with WideImage; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - **/ - + /** + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + **/ + class wiUnsupportedFormatException extends wiException {} abstract class wiFileMapperFactory Modified: XoopsModules/news/branches/mamba/news/class/wideimage/Image.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/Image.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/Image.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,22 +1,22 @@ <?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with WideImage; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - **/ - + /** + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + **/ + if (!defined('WI_LIB_PATH')) define('WI_LIB_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR); @@ -26,7 +26,7 @@ abstract class wiImage { protected $handle = null; - protected $handleReleased = false; + protected $handleReleased = false; protected $canvas = null; function __construct($handle) @@ -272,23 +272,23 @@ function getRGBAt($x, $y) { return $this->getColorRGB($this->getColorAt($x, $y)); - } - - /** - * Writes a pixel at the designated coordinates - * - * Takes an associative array of colours and uses getExactColor() to - * retrieve the exact index color to write to the image with. - * - * @param int $x - * @param int $y - * @param array $color - */ - function setRGBAt($x, $y, $color) { - $this->setColorAt($x, $y, $this->getExactColor($color)); } /** + * Writes a pixel at the designated coordinates + * + * Takes an associative array of colours and uses getExactColor() to + * retrieve the exact index color to write to the image with. + * + * @param int $x + * @param int $y + * @param array $color + */ + function setRGBAt($x, $y, $color) { + $this->setColorAt($x, $y, $this->getExactColor($color)); + } + + /** * @result mixed RGBA array for a color with index $colorIndex */ function getColorRGB($colorIndex) @@ -468,15 +468,15 @@ function copyTo($dest, $left = 0, $top = 0) { imageCopy($dest->getHandle(), $this->handle, $left, $top, 0, 0, $this->getWidth(), $this->getHeight()); - } - - function getCanvas() - { - if ($this->canvas == null) - $this->canvas = new wiCanvas($this); - return $this->canvas; } + function getCanvas() + { + if ($this->canvas == null) + $this->canvas = new wiCanvas($this); + return $this->canvas; + } + abstract function isTrueColor(); abstract function asTrueColor(); abstract function asPalette(); Modified: XoopsModules/news/branches/mamba/news/class/wideimage/OpFactory.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/OpFactory.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/OpFactory.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,22 +1,22 @@ -<?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with WideImage; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - **/ - +<?php + /** + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + **/ + class wiUnknownImageOperationException extends wiException {} class wiOpFactory Modified: XoopsModules/news/branches/mamba/news/class/wideimage/PaletteImage.class.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/wideimage/PaletteImage.class.php 2012-05-16 01:25:21 UTC (rev 9522) +++ XoopsModules/news/branches/mamba/news/class/wideimage/PaletteImage.class.php 2012-05-16 08:28:03 UTC (rev 9523) @@ -1,22 +1,22 @@ -<?php - /** - This file is part of WideImage. - - WideImage is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - WideImage 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser Ge... [truncated message content] |