From a27cfae605c7418d1508d5adf674e28bc79d16b8 Mon Sep 17 00:00:00 2001 From: geekwright Date: Sun, 29 May 2016 16:11:55 -0500 Subject: [PATCH] Merge mambax7/publisher changes --- README.md | 3 +- admin/about.php | 3 +- admin/admin_footer.php | 12 +- admin/admin_header.php | 4 +- admin/category.php | 8 +- admin/clone.php | 14 +- admin/file.php | 13 +- admin/import.php | 1 - admin/import/ams.php | 15 +- admin/import/cjaycontent.php | 9 +- admin/import/fmcontent.php | 27 +- admin/import/news.php | 13 +- admin/import/smartsection.php | 13 +- admin/import/wfsection.php | 13 +- admin/import/xfsection.php | 13 +- admin/import/xnews.php | 15 +- admin/index.php | 3 +- admin/item.php | 15 +- admin/main.php | 12 +- admin/menu.php | 33 +- admin/mimetypes.php | 10 +- admin/pagewrap.php | 1 - admin/permissions.php | 17 +- admin/preferences.php | 16 +- admin/pw_delete_file.php | 1 - admin/pw_upload_file.php | 3 +- archive.php | 39 +- assets/css/publisher.css | 2 +- assets/images/{logo.png => logo_module.png} | Bin assets/js/script.easing.js | 1 - author_items.php | 7 +- backend.php | 4 +- blocks/category_items_sel.php | 4 +- blocks/date_to_date.php | 1 - blocks/items_columns.php | 9 +- blocks/items_menu.php | 6 +- blocks/items_new.php | 9 +- blocks/items_random_item.php | 1 - blocks/items_recent.php | 4 +- blocks/items_spot.php | 14 +- blocks/latest_files.php | 4 +- blocks/latest_news.php | 9 +- blocks/search.php | 9 +- category.php | 7 +- class/blockform.php | 3 +- class/category.php | 35 +- class/constants.php | 53 ++- class/file.php | 33 +- class/form/category.php | 5 +- class/form/file.php | 1 - class/form/item.php | 32 +- class/formdatetime.php | 1 - class/groupperm.php | 12 +- class/highlighter.php | 9 +- class/item.php | 139 +++--- class/metagen.php | 40 +- class/mimetype.php | 62 +-- class/permission.php | 7 +- class/plugins/plugin.tag.php | 4 +- class/publisher.php | 8 +- class/rating.php | 1 - class/session.php | 5 +- class/themetabform.php | 13 +- class/uploader.php | 18 +- class/utilities.php | 29 +- comment_delete.php | 1 - comment_edit.php | 1 - comment_new.php | 5 +- comment_post.php | 1 - comment_reply.php | 1 - docs/changelog.txt | 13 + extra/seo/seo.txt | 6 +- file.php | 6 +- footer.php | 8 +- header.php | 1 - include/ajax_upload.php | 10 +- include/comment_functions.php | 1 - include/common.php | 1 - include/config.php | 11 +- include/functions.php | 66 +-- include/media.textsanitizer.php | 8 +- include/notification.inc.php | 5 +- include/oninstall.php | 9 +- include/onupdate.php | 12 +- include/plugin.tag.php | 4 +- include/search.inc.php | 9 +- include/seo.inc.php | 4 +- index.php | 4 +- item.php | 20 +- language/english/admin.php | 20 +- language/english/blocks.php | 4 +- language/english/common.php | 8 +- language/english/main.php | 6 +- language/english/modinfo.php | 12 +- list.tag.php | 1 - makepdf.php | 34 +- notification_update.php | 1 - pop.php | 1 - print.php | 1 - rate.php | 2 - search.php | 3 +- submit.php | 7 +- templates/publisher_footer.tpl | 4 +- thumb.php | 46 +- view.tag.php | 1 - visit.php | 1 - xoops_version.php | 445 +++++++++++++------- 107 files changed, 990 insertions(+), 741 deletions(-) rename assets/images/{logo.png => logo_module.png} (100%) diff --git a/README.md b/README.md index 3c6ef47e..75b2f916 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/mambax7/publisher.svg?style=flat)](https://scrutinizer-ci.com/g/mambax7/publisher/?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/grade/2d27c0023ee54f0b9ba2b5d17a68b2a5)](https://www.codacy.com/app/mambax7/publisher) [![Code Climate](https://img.shields.io/codeclimate/github/mambax7/publisher.svg?style=flat)](https://codeclimate.com/github/mambax7/publisher) +[![SensioLabsInsight](https://insight.sensiolabs.com/projects/9dc918fe-ea63-4675-832c-8f6c74cdf78f/mini.png)](https://insight.sensiolabs.com/projects/9dc918fe-ea63-4675-832c-8f6c74cdf78f) [![Latest Pre-Resease](https://img.shields.io/github/tag/XoopsModules25x/publisher.svg?style=flat)](https://github.com/XoopsModules25x/publisher/tags/) [![Latest Version](https://img.shields.io/github/release/XoopsModules25x/publisher.svg?style=flat)](https://github.com/XoopsModules25x/publisher/releases/) @@ -16,4 +17,4 @@ To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/ Please visit us on http://xoops.org -The upcoming "next generation" version of XOOPS CMS is being crafted on GitHub at: https://github.com/XOOPS \ No newline at end of file +The upcoming "next generation" version of XOOPS CMS is being crafted on GitHub at: https://github.com/XOOPS diff --git a/admin/about.php b/admin/about.php index 2953f57b..6b15cedc 100644 --- a/admin/about.php +++ b/admin/about.php @@ -17,7 +17,6 @@ * @package Publisher * @since 1.0 * @author Mage, Mamba - * @version $Id: about.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -26,7 +25,7 @@ $aboutAdmin = new ModuleAdmin(); -echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->addNavigation(basename(__FILE__)); echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); // if (version_compare(PHP_VERSION, '5.4.0') >= 0) { diff --git a/admin/admin_footer.php b/admin/admin_footer.php index 81441fd9..b5ed2f0c 100644 --- a/admin/admin_footer.php +++ b/admin/admin_footer.php @@ -10,17 +10,23 @@ */ /** - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @copyright XOOPS Project (http://xoops.org) * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @package * @since * @author XOOPS Development Team - * @version $Id $ */ global $xoopsModule; $pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('sysIcons32'); -echo "
\n" . "
\n" . " XOOPS\n" . "
\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '
'; +echo "
\n" . + "
\n" . + " XOOPS\n" . + "
\n" . + ' ' . + _AM_MODULEADMIN_ADMIN_FOOTER . + "\n" . + '
'; xoops_cp_footer(); diff --git a/admin/admin_header.php b/admin/admin_header.php index a6d239e9..2e9f058d 100644 --- a/admin/admin_header.php +++ b/admin/admin_header.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: admin_header.php 10661 2013-01-04 19:22:48Z trabis $ */ include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; @@ -35,7 +34,8 @@ 'editimg' => "" . _AM_PUBLISHER_ICO_EDIT . "", 'deleteimg' => "" . _AM_PUBLISHER_ICO_DELETE . "", 'online' => "" . _AM_PUBLISHER_ICO_ONLINE . "", - 'offline' => "" . _AM_PUBLISHER_ICO_OFFLINE . ""); + 'offline' => "" . _AM_PUBLISHER_ICO_OFFLINE . "" +); include_once $GLOBALS['xoops']->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); //ModuleAdmin::loadLanguage(); diff --git a/admin/category.php b/admin/category.php index 9e9beff2..0f68ad62 100644 --- a/admin/category.php +++ b/admin/category.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: category.php 10661 2013-01-04 19:22:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -44,7 +43,8 @@ // exit(); } else { xoops_cp_header(); - xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'.

" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE); + xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', + _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'.

" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE); xoops_cp_footer(); } break; @@ -192,7 +192,7 @@ publisherCpHeader(); //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES); - echo "
\n"; + echo "
\n"; echo "
"; echo "  "; //echo "  "; @@ -226,7 +226,7 @@ include_once $GLOBALS['xoops']->path('class/pagenav.php'); $pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory'); echo '
' . $pagenav->renderNav() . '
'; - echo '
'; + echo '
'; publisherCloseCollapsableBar('createdcategories', 'createdcategoriesicon'); echo '
'; //editcat(false); diff --git a/admin/clone.php b/admin/clone.php index 4301cb78..73166e52 100644 --- a/admin/clone.php +++ b/admin/clone.php @@ -15,7 +15,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: clone.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -26,7 +25,7 @@ if ('submit' === XoopsRequest::getString('op', '', 'POST')) { if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('clone.php', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); + redirect_header('clone.php', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); // exit(); } @@ -47,7 +46,8 @@ $patterns = array( strtolower(PUBLISHER_DIRNAME) => strtolower($clone), strtoupper(PUBLISHER_DIRNAME) => strtoupper($clone), - ucfirst(strtolower(PUBLISHER_DIRNAME)) => ucfirst(strtolower($clone))); + ucfirst(strtolower(PUBLISHER_DIRNAME)) => ucfirst(strtolower($clone)) + ); $patKeys = array_keys($patterns); $patValues = array_values($patterns); @@ -56,7 +56,7 @@ $msg = ''; if (is_dir($GLOBALS['xoops']->path('modules/' . strtolower($clone)))) { - $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "" . ucfirst(strtolower($clone)) . '') . "
\n"; + $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "" . ucfirst(strtolower($clone)) . '') . "
\n"; if (!$logocreated) { $msg .= _AM_PUBLISHER_CLONE_IMAGEFAIL; } @@ -86,7 +86,7 @@ function file_put_contents($filename, $data, $file_append = false) { if ($fp == fopen($filename, (!$file_append ? 'w+' : 'a+'))) { - fputs($fp, $data); + fwrite($fp, $data); fclose($fp); } } @@ -154,7 +154,9 @@ public static function createLogo($dirname) // unset($func); } - if (!file_exists($imageBase = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/logo.png')) || !file_exists($font = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/VeraBd.ttf'))) { + if (!file_exists($imageBase = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/logo.png')) || + !file_exists($font = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/VeraBd.ttf')) + ) { return false; } diff --git a/admin/file.php b/admin/file.php index 91c998b3..5062d099 100644 --- a/admin/file.php +++ b/admin/file.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: file.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -43,7 +42,7 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0) // exit(); } - echo "
\n"; + echo "
\n"; echo "" . _AM_PUBLISHER_FILE_EDITING . ''; echo "" . _AM_PUBLISHER_FILE_EDITING_DSC . ''; publisherOpenCollapsableBar('editfile', 'editfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); @@ -111,11 +110,11 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0) // Storing the file if (!$fileObj->store()) { - redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 3, _AM_PUBLISHER_FILE_EDITING_ERROR . publisherFormatErrors($fileObj->getErrors())); + redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 3, _AM_PUBLISHER_FILE_EDITING_ERROR . publisherFormatErrors($fileObj->getErrors())); // exit; } - redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS); + redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS); // exit(); break; @@ -130,18 +129,18 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0) if ($confirm) { if (!$publisher->getHandler('file')->delete($fileObj)) { - redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 2, _AM_PUBLISHER_FILE_DELETE_ERROR); + redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 2, _AM_PUBLISHER_FILE_DELETE_ERROR); // exit; } - redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid().'#tab_2', 2, sprintf(_AM_PUBLISHER_FILEISDELETED, $fileObj->name())); + redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid() . '#tab_2', 2, sprintf(_AM_PUBLISHER_FILEISDELETED, $fileObj->name())); // exit(); } else { // no confirm: show deletion condition $fileid = XoopsRequest::getInt('fileid', 0, 'GET'); publisherCpHeader(); - xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', _AM_PUBLISHER_DELETETHISFILE . '
' . $fileObj->name() . '

', _AM_PUBLISHER_DELETE); + xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', _AM_PUBLISHER_DELETETHISFILE . '
' . $fileObj->name() . '

', _AM_PUBLISHER_DELETE); xoops_cp_footer(); } diff --git a/admin/import.php b/admin/import.php index b790f589..86a9f169 100644 --- a/admin/import.php +++ b/admin/import.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: import.php 12825 2014-10-31 02:42:34Z zyspec $ */ include_once __DIR__ . '/admin_header.php'; diff --git a/admin/import/ams.php b/admin/import/ams.php index 77ab4f88..9049b200 100644 --- a/admin/import/ams.php +++ b/admin/import/ams.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author Marius Scurtescu - * @version $Id: ams.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -58,7 +57,7 @@ // add 'publisher' category to 'imagecategory' table // if (!$GLOBALS['xoopsSecurity']->check()) { - // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); + // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); // } $imageCategoryHandler = xoops_getHandler('imagecategory'); @@ -128,7 +127,7 @@ $cat_cbox_options[$cid] = "$cat_title ($art_count)"; } - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -362,7 +361,7 @@ $fileObj->setVar('short_url', $arrFile['filerealname']); if ($fileObj->store($allowed_mimetypes, true, false)) { - echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; + echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; } } } @@ -371,7 +370,7 @@ //------------------------ $newArticleArray[$arrArticle['storyid']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -406,7 +405,7 @@ unset($oldid, $newCat); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $publisher_module_id = $publisher->getModule()->mid(); @@ -419,9 +418,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/import/cjaycontent.php b/admin/import/cjaycontent.php index dcf770b3..afc484fb 100644 --- a/admin/import/cjaycontent.php +++ b/admin/import/cjaycontent.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author Marius Scurtescu - * @version $Id: cjaycontent.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -146,7 +145,7 @@ continue; } else { $newArticleArray[$arrArticle['id']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -154,7 +153,7 @@ echo '
'; // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $publisher_module_id = $publisher->getModule()->mid(); @@ -167,9 +166,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/import/fmcontent.php b/admin/import/fmcontent.php index 5cb85c13..b25d038c 100644 --- a/admin/import/fmcontent.php +++ b/admin/import/fmcontent.php @@ -18,7 +18,6 @@ * @author The SmartFactory * @author Marius Scurtescu * @author ZySpec - * @version $Id: news.php 12629 2014-06-22 02:42:25Z beckmi $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -81,7 +80,7 @@ echo "" . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $fmContentCount, count($cat_cbox_options)) . ''; $form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname"); - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -191,11 +190,11 @@ } if (!$itemObj->store()) { - echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . '
\n'; + echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . '
\n'; continue; } else { $newArticleArray[$thisFmContentObj->getVar('storyid')] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
\n'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
\n'; ++$cnt_imported_articles; } } @@ -207,7 +206,7 @@ publisherSaveCategoryPermissions($groupsIds, $categoryObj->categoryid(), 'item_submit'); unset($fmContentObjs, $itemObj, $categoryObj, $thisFmContentObj); - echo "
\n"; + echo "
\n"; } // Process all "normal" Topics (categories) from FmContent @@ -238,14 +237,14 @@ } } if (!$publisher->getHandler('category')->insert($categoryObj)) { - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $thisFmTopicObj->getVar('topic_title')) . "
\n"; + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $thisFmTopicObj->getVar('topic_title')) . "
\n"; continue; } $CatIds['newid'] = $categoryObj->categoryid(); ++$cnt_imported_cat; - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->name()) . "
\n"; + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->name()) . "
\n"; // retrieve all articles (content) for this category $criteria = new CriteriaCompo(); @@ -283,11 +282,11 @@ } if (!$itemObj->store()) { - echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . "
\n"; + echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $thisFmContentObj->getVar('title')) . "
\n"; continue; } else { $newArticleArray[$thisFmContentObj->getVar('storyid')] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . "
\n"; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . "
\n"; ++$cnt_imported_articles; } } @@ -300,7 +299,7 @@ $newCatArray[$CatIds['oldid']] = $CatIds; unset($CatIds, $thisFmContentObj); - echo "
\n"; + echo "
\n"; } // unset($thisFmTopicObj); @@ -316,7 +315,7 @@ unset($oldid, $CatIds); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . "
\n"; + echo _AM_PUBLISHER_IMPORT_COMMENTS . "
\n"; $publisher_module_id = $publisher->getModule()->mid(); @@ -329,14 +328,14 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "
\n"; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . "
\n"; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "
\n"; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . "
\n"; } } // unset($comment); - echo '

' . _AM_PUBLISHER_IMPORT_DONE . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "
\n" . "
\n" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "
\n"; + echo '

' . _AM_PUBLISHER_IMPORT_DONE . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . "
\n" . '' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . "
\n" . "
\n" . _AM_PUBLISHER_IMPORT_GOTOMODULE . "
\n"; publisherCloseCollapsableBar('fmimportgo', 'fmimportgoicon'); xoops_cp_footer(); diff --git a/admin/import/news.php b/admin/import/news.php index 4097f4e6..cb8b892b 100644 --- a/admin/import/news.php +++ b/admin/import/news.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author Marius Scurtescu - * @version $Id: news.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -65,7 +64,7 @@ $cat_cbox_options[$cid] = '$cat_title ($art_count)'; } - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -208,14 +207,14 @@ $fileObj->setVar('filename', $arrFile['filerealname']); if ($fileObj->store($allowed_mimetypes, true, false)) { - echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; + echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; } } } } */ $newArticleArray[$arrArticle['storyid']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -247,7 +246,7 @@ unset($oldid, $newCat); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $publisher_module_id = $publisher->getModule()->mid(); @@ -260,9 +259,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/import/smartsection.php b/admin/import/smartsection.php index e5dadada..4d820328 100644 --- a/admin/import/smartsection.php +++ b/admin/import/smartsection.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author Marius Scurtescu - * @version $Id: smartsection.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -65,7 +64,7 @@ $cat_cbox_options[$cid] = "$cat_title ($art_count)"; } - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -185,14 +184,14 @@ $fileObj->setVar('fileid', 0); if ($fileObj->store($allowed_mimetypes, true, false)) { - echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']) . '
'; + echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filename']) . '
'; } } } } $newArticleArray[$arrArticle['itemid']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -224,7 +223,7 @@ unset($oldid, $newCat); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $publisher_module_id = $publisher->getModule()->mid(); @@ -237,9 +236,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/import/wfsection.php b/admin/import/wfsection.php index a72194d8..440bcbc5 100644 --- a/admin/import/wfsection.php +++ b/admin/import/wfsection.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author Marius Scurtescu - * @version $Id: wfsection.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -63,7 +62,7 @@ $cat_title = $myts->displayTarea($cat_title); $cat_cbox_options[$cid] = "$cat_title ($art_count)"; } - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -205,14 +204,14 @@ $fileObj->setVar('filename', $arrFile['filerealname']); if ($fileObj->store($allowed_mimetypes, true, false)) { - echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; + echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; } } } } $newArticleArray[$arrArticle['articleid']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -236,7 +235,7 @@ unset($oldid, $newCat); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $moduleHandler = xoops_getHandler('module'); $moduleObj = $moduleHandler->getByDirname('wfsection'); @@ -253,9 +252,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/import/xfsection.php b/admin/import/xfsection.php index a6eb3cec..06dceec1 100644 --- a/admin/import/xfsection.php +++ b/admin/import/xfsection.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author ohwada - * @version $Id: xfsection.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -63,7 +62,7 @@ $cat_title = $myts->displayTarea($cat_title); $cat_cbox_options[$cid] = "$cat_title ($art_count)"; } - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -204,14 +203,14 @@ $fileObj->setVar('filename', $arrFile['filerealname']); if ($fileObj->store($allowed_mimetypes, true, false)) { - echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; + echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; } } } } $newArticleArray[$arrArticle['articleid']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -235,7 +234,7 @@ unset($oldid, $newCat); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $moduleHandler = xoops_getHandler('module'); $moduleObj = $moduleHandler->getByDirname('xfsection'); @@ -252,9 +251,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/import/xnews.php b/admin/import/xnews.php index c3fda301..64d91e7a 100644 --- a/admin/import/xnews.php +++ b/admin/import/xnews.php @@ -17,7 +17,6 @@ * @author trabis * @author The SmartFactory * @author Marius Scurtescu - * @version $Id: xnews.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(__DIR__) . '/admin_header.php'; @@ -58,7 +57,7 @@ // add 'publisher' category to 'imagecategory' table // if (!$GLOBALS['xoopsSecurity']->check()) { - // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); + // redirect_header('admin.php?fct=images', 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); // } $imageCategoryHandler = xoops_getHandler('imagecategory'); @@ -129,7 +128,7 @@ $cat_cbox_options[$cid] = "$cat_title ($art_count)"; } - $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); + $cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('
', $cat_cbox_options)); $cat_label->setDescription(_AM_PUBLISHER_IMPORT_CATEGORIES_DSC); $form->addElement($cat_label); @@ -361,7 +360,7 @@ $fileObj->setVar('short_url', $arrFile['filerealname']); if ($fileObj->store($allowed_mimetypes, true, false)) { - echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; + echo '    ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '
'; } } } @@ -370,7 +369,7 @@ //------------------------ $newArticleArray[$arrArticle['storyid']] = $itemObj->itemid(); - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->getTitle()) . '
'; ++$cnt_imported_articles; } } @@ -405,7 +404,7 @@ unset($oldid, $newCat); // Looping through the comments to link them to the new articles and module - echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; + echo _AM_PUBLISHER_IMPORT_COMMENTS . '
'; $publisher_module_id = $publisher->getModule()->mid(); @@ -418,9 +417,9 @@ $comment->setVar('com_modid', $publisher_module_id); $comment->setNew(); if (!$commentHandler->insert($comment)) { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '
'; } else { - echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; + echo '  ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '
'; } } // unset($comment); diff --git a/admin/index.php b/admin/index.php index 1302d718..885e5e5c 100644 --- a/admin/index.php +++ b/admin/index.php @@ -17,7 +17,6 @@ * @package Publisher * @since 1.0 * @author Mage, Mamba - * @version $Id: index.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -33,7 +32,7 @@ // $indexAdmin->addConfigBoxLine(array($folder[$i], '777'), 'chmod'); } -echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->addNavigation(basename(__FILE__)); echo $indexAdmin->renderIndex(); include_once __DIR__ . '/admin_footer.php'; diff --git a/admin/item.php b/admin/item.php index eecf2eea..aff8bae5 100644 --- a/admin/item.php +++ b/admin/item.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: item.php 10661 2013-01-04 19:22:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -156,7 +155,7 @@ // exit(); } else { xoops_cp_header(); - xoops_confirm(array('op' => 'del', 'itemid' => $itemObj->itemid(), 'confirm' => 1, 'name' => $itemObj->getTitle()), 'item.php', _AM_PUBLISHER_DELETETHISITEM . "
'" . $itemObj->getTitle() . "'.

", _AM_PUBLISHER_DELETE); + xoops_confirm(array('op' => 'del', 'itemid' => $itemObj->itemid(), 'confirm' => 1, 'name' => $itemObj->getTitle()), 'item.php', _AM_PUBLISHER_DELETETHISITEM . "
'" . $itemObj->getTitle() . "'.

", _AM_PUBLISHER_DELETE); xoops_cp_footer(); } exit(); @@ -168,7 +167,7 @@ //publisher_adminMenu(2, _AM_PUBLISHER_ITEMS); xoops_load('XoopsPageNav'); - echo "
\n"; + echo "
\n"; echo "
"; echo "  "; echo '
'; @@ -218,7 +217,7 @@ echo ''; } echo "\n"; - echo "
\n"; + echo "
\n"; $pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $submittedstartitem, 'submittedstartitem'); echo '
' . $pagenav->renderNav() . '
'; @@ -268,7 +267,7 @@ echo ''; } echo "\n"; - echo "
\n"; + echo "
\n"; $pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $publishedstartitem, 'publishedstartitem'); echo '
' . $pagenav->renderNav() . '
'; @@ -317,7 +316,7 @@ echo ''; } echo "\n"; - echo "
\n"; + echo "
\n"; $pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $offlinestartitem, 'offlinestartitem'); echo '
' . $pagenav->renderNav() . '
'; @@ -365,7 +364,7 @@ echo ''; } echo "\n"; - echo "
\n"; + echo "
\n"; $pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $rejectedstartitem, 'rejectedstartitem'); echo '
' . $pagenav->renderNav() . '
'; @@ -467,7 +466,7 @@ function publisher_editItem($showmenu = false, $itemid = 0, $clone = false) $categoryObj = $itemObj->getCategory(); - echo "
\n"; + echo "
\n"; publisherOpenCollapsableBar('edititemtable', 'edititemicon', $pageTitle, $pageInfo); if ($clone) { diff --git a/admin/main.php b/admin/main.php index ddd1bb11..d7ba98f3 100644 --- a/admin/main.php +++ b/admin/main.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id:main.php 335 2011-12-05 20:24:01Z lusopoemas@gmail.com $ */ include_once __DIR__ . '/admin_header.php'; @@ -60,19 +59,24 @@ $totalrejected = $publisher->getHandler('item')->getItemsCount(-1, array(PublisherConstants::PUBLISHER_STATUS_REJECTED)); // Check Path Configuration -if ((publisherGetPathStatus('root', true) < 0) || (publisherGetPathStatus('images', true) < 0) || (publisherGetPathStatus('images/category', true) < 0) || (publisherGetPathStatus('images/item', true) < 0) || (publisherGetPathStatus('content', true) < 0)) { +if ((publisherGetPathStatus('root', true) < 0) || + (publisherGetPathStatus('images', true) < 0) || + (publisherGetPathStatus('images/category', true) < 0) || + (publisherGetPathStatus('images/item', true) < 0) || + (publisherGetPathStatus('content', true) < 0) +) { PublisherUtilities::createDir(); } publisherOpenCollapsableBar('inventorytable', 'inventoryicon', _AM_PUBLISHER_INVENTORY); -echo '
'; +echo '
'; echo ""; echo "'; echo "'; echo "'; echo "'; echo '
" . _AM_PUBLISHER_TOTALCAT . "" . $totalcategories . '" . _AM_PUBLISHER_TOTALSUBMITTED . "" . $totalsubmitted . '" . _AM_PUBLISHER_TOTALPUBLISHED . "" . $totalpublished . '" . _AM_PUBLISHER_TOTAL_OFFLINE . "" . $totaloffline . '
'; -echo '
'; +echo '
'; echo "
"; echo "  "; diff --git a/admin/menu.php b/admin/menu.php index 097e6940..410fa5bc 100644 --- a/admin/menu.php +++ b/admin/menu.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: menu.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -24,8 +23,8 @@ $dirname = basename(dirname(__DIR__)); $moduleHandler = xoops_getHandler('module'); $module = $moduleHandler->getByDirname($dirname); -$pathIcon32 = '../../' . $module->getInfo('sysIcons32'); -$pathModIcon32 = $module->getInfo('modIcons32'); +$pathIcon32 = '../../' . $module->getInfo('sysIcons32'); +$pathModIcon32 = $module->getInfo('modIcons32'); include_once dirname(__DIR__) . '/include/config.php'; @@ -35,36 +34,42 @@ array( 'title' => _MI_PUBLISHER_ADMENU0, 'link' => 'admin/index.php', - 'icon' => $pathIcon32 . '/home.png'), + 'icon' => $pathIcon32 . '/home.png' + ), array( 'title' => _MI_PUBLISHER_ADMENU1, 'link' => 'admin/main.php', - 'icon' => $pathIcon32 . '/manage.png'), + 'icon' => $pathIcon32 . '/manage.png' + ), // Category array( 'title' => _MI_PUBLISHER_ADMENU2, 'link' => 'admin/category.php', - 'icon' => $pathIcon32 . '/category.png'), + 'icon' => $pathIcon32 . '/category.png' + ), // Items array( 'title' => _MI_PUBLISHER_ADMENU3, 'link' => 'admin/item.php', - 'icon' => $pathIcon32 . '/content.png'), + 'icon' => $pathIcon32 . '/content.png' + ), // Permissions array( 'title' => _MI_PUBLISHER_ADMENU4, 'link' => 'admin/permissions.php', - 'icon' => $pathIcon32 . '/permissions.png'), + 'icon' => $pathIcon32 . '/permissions.png' + ), // Mimetypes array( 'title' => _MI_PUBLISHER_ADMENU6, 'link' => 'admin/mimetypes.php', - 'icon' => $pathIcon32 . '/type.png'), + 'icon' => $pathIcon32 . '/type.png' + ), // Preferences // array( @@ -84,18 +89,22 @@ array( 'title' => _AM_PUBLISHER_IMPORT, 'link' => 'admin/import.php', - 'icon' => $pathIcon32 . '/download.png'), + 'icon' => $pathIcon32 . '/download.png' + ), //Clone array( 'title' => _AM_PUBLISHER_CLONE, 'link' => 'admin/clone.php', - 'icon' => $pathModIcon32.'/editcopy.png'), + 'icon' => $pathModIcon32 . '/editcopy.png' + ), //About array( 'title' => _AM_PUBLISHER_ABOUT, 'link' => 'admin/about.php', - 'icon' => $pathIcon32 . '/about.png')); + 'icon' => $pathIcon32 . '/about.png' + ) +); $GLOBALS['xoTheme']->addStylesheet('modules/' . $dirname . '/assets/css/style.css'); diff --git a/admin/mimetypes.php b/admin/mimetypes.php index 58d6252d..03a0b634 100644 --- a/admin/mimetypes.php +++ b/admin/mimetypes.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: mimetypes.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -40,7 +39,8 @@ 'mime_name' => _AM_PUBLISHER_MIME_NAME, 'mime_ext' => _AM_PUBLISHER_MIME_EXT, 'mime_admin' => _AM_PUBLISHER_MIME_ADMIN, - 'mime_user' => _AM_PUBLISHER_MIME_USER); + 'mime_user' => _AM_PUBLISHER_MIME_USER +); $aOrderBy = array('ASC' => _AM_PUBLISHER_TEXT_ASCENDING, 'DESC' => _AM_PUBLISHER_TEXT_DESCENDING); $aLimitBy = array('10' => 10, '15' => 15, '20' => 20, '25' => 25, '50' => 50, '100' => 100); $aSearchBy = array('mime_id' => _AM_PUBLISHER_MIME_ID, 'mime_name' => _AM_PUBLISHER_MIME_NAME, 'mime_ext' => _AM_PUBLISHER_MIME_EXT); @@ -334,7 +334,7 @@ public static function edit() echo ''; // end of edit form publisherCloseCollapsableBar('mimeedittable', 'mimeediticon'); -// xoops_cp_footer(); + // xoops_cp_footer(); include_once __DIR__ . '/admin_footer.php'; } else { $mimeAdmin = 0; @@ -526,7 +526,7 @@ public static function manage() publisherCloseCollapsableBar('mimemanagetable', 'mimemanageicon'); -// xoops_cp_footer(); + // xoops_cp_footer(); include_once __DIR__ . '/admin_footer.php'; } @@ -703,7 +703,7 @@ public static function search() echo "'; } publisherCloseCollapsableBar('mimesearchtable', 'mimesearchicon'); -// include_once __DIR__ . '/admin_footer.php'; + // include_once __DIR__ . '/admin_footer.php'; xoops_cp_footer(); } diff --git a/admin/pagewrap.php b/admin/pagewrap.php index 24d584f4..a957ed1f 100644 --- a/admin/pagewrap.php +++ b/admin/pagewrap.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: pagewrap.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; diff --git a/admin/permissions.php b/admin/permissions.php index b030ed4b..cedc80fc 100644 --- a/admin/permissions.php +++ b/admin/permissions.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: permissions.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -44,7 +43,7 @@ publisherCloseCollapsableBar('permissionstable_view', 'permissionsicon_view'); // Submit Categories permissions -echo "
\n"; +echo "
\n"; publisherOpenCollapsableBar('permissionstable_submit', 'permissionsicon_submit', _AM_PUBLISHER_PERMISSIONS_CAT_SUBMIT, _AM_PUBLISHER_PERMISSIONS_CAT_SUBMIT_DSC); $result_view = $GLOBALS['xoopsDB']->query('SELECT categoryid, name FROM ' . $GLOBALS['xoopsDB']->prefix('publisher_categories') . ' '); if ($GLOBALS['xoopsDB']->getRowsNum($result_view)) { @@ -59,7 +58,7 @@ publisherCloseCollapsableBar('permissionstable_submit', 'permissionsicon_submit'); // Moderators Categories permissions -echo "
\n"; +echo "
\n"; publisherOpenCollapsableBar('permissionstable_moderation', 'permissionsicon_moderation', _AM_PUBLISHER_PERMISSIONS_CAT_MODERATOR, _AM_PUBLISHER_PERMISSIONS_CAT_MODERATOR_DSC); $result_view = $GLOBALS['xoopsDB']->query('SELECT categoryid, name FROM ' . $GLOBALS['xoopsDB']->prefix('publisher_categories') . ' '); if ($GLOBALS['xoopsDB']->getRowsNum($result_view)) { @@ -74,7 +73,7 @@ publisherCloseCollapsableBar('permissionstable_moderation', 'permissionsicon_moderation'); // Form permissions -echo "
\n"; +echo "
\n"; publisherOpenCollapsableBar('permissionstable_form', 'permissionsicon_form', _AM_PUBLISHER_PERMISSIONS_FORM, _AM_PUBLISHER_PERMISSIONS_FORM_DSC); $form_options = array( PublisherConstants::PUBLISHER_SUMMARY => _AM_PUBLISHER_SUMMARY, @@ -102,7 +101,8 @@ PublisherConstants::PUBLISHER_DOLINEBREAK => _CO_PUBLISHER_DOLINEBREAK, PublisherConstants::PUBLISHER_NOTIFY => _AM_PUBLISHER_NOTIFY, PublisherConstants::PUBLISHER_SUBTITLE => _CO_PUBLISHER_SUBTITLE, - PublisherConstants::PUBLISHER_AUTHOR_ALIAS => _CO_PUBLISHER_AUTHOR_ALIAS); + PublisherConstants::PUBLISHER_AUTHOR_ALIAS => _CO_PUBLISHER_AUTHOR_ALIAS +); $form_submit = new XoopsGroupPermForm('', $publisher->getModule()->mid(), 'form_view', '', 'admin/permissions.php'); foreach ($form_options as $key => $value) { $form_submit->addItem($key, $value); @@ -112,7 +112,7 @@ publisherCloseCollapsableBar('permissionstable_form', 'permissionsicon_form'); // Editors permissions -echo "
\n"; +echo "
\n"; publisherOpenCollapsableBar('permissionstable_editors', 'permissions_editors', _AM_PUBLISHER_PERMISSIONS_EDITORS, _AM_PUBLISHER_PERMISSIONS_EDITORS_DSC); $editors = publisherGetEditors(); $form_submit = new XoopsGroupPermForm('', $publisher->getModule()->mid(), 'editors', '', 'admin/permissions.php'); @@ -124,11 +124,12 @@ publisherCloseCollapsableBar('permissionstable_editors', 'permissionsicon_editors'); // Global permissions -echo "
\n"; +echo "
\n"; publisherOpenCollapsableBar('permissionstable_global', 'permissionsicon_global', _AM_PUBLISHER_PERMISSIONS_GLOBAL, _AM_PUBLISHER_PERMISSIONS_GLOBAL_DSC); $form_options = array( PublisherConstants::PUBLISHER_SEARCH => _AM_PUBLISHER_SEARCH, - PublisherConstants::PUBLISHER_RATE => _AM_PUBLISHER_RATE); + PublisherConstants::PUBLISHER_RATE => _AM_PUBLISHER_RATE +); $form_submit = new XoopsGroupPermForm('', $publisher->getModule()->mid(), 'global', '', 'admin/permissions.php'); foreach ($form_options as $key => $value) { $form_submit->addItem($key, $value); diff --git a/admin/preferences.php b/admin/preferences.php index 60188af0..c9b5fcd8 100644 --- a/admin/preferences.php +++ b/admin/preferences.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author Kazumi Ono (AKA onokazu) - * @version $Id: preferences.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -55,7 +54,8 @@ if (!array_key_exists('others', $config_cats)) { $config_cats['others'] = array( 'name' => _MI_PUBLISHER_CONFCAT_OTHERS, - 'description' => _MI_PUBLISHER_CONFCAT_OTHERS_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_OTHERS_DSC + ); } $cat_others_used = false; @@ -92,13 +92,19 @@ $cat_others_used = true; } - $title = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? constant($config[$i]->getVar('conf_title')) : constant($config[$i]->getVar('conf_title')) . '

' . constant($config[$i]->getVar('conf_desc')) . ''; + $title = (!defined($config[$i]->getVar('conf_desc')) || + constant($config[$i]->getVar('conf_desc')) == '') ? constant($config[$i]->getVar('conf_title')) : constant($config[$i]->getVar('conf_title')) . + '

' . + constant($config[$i]->getVar('conf_desc')) . + ''; switch ($config[$i]->getVar('conf_formtype')) { case 'textarea': $myts = MyTextSanitizer::getInstance(); if ($config[$i]->getVar('conf_valuetype') === 'array') { // this is exceptional.. only when value type is arrayneed a smarter way for this - $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50); + $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), + $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, + 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50); } else { $ele = new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()), 5, 50); } @@ -185,7 +191,7 @@ if ($op === 'save') { if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($module->getInfo('adminindex'), 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); + redirect_header($module->getInfo('adminindex'), 3, implode('
', $GLOBALS['xoopsSecurity']->getErrors())); } $count = count($confIds); $configHandler = xoops_getHandler('config'); diff --git a/admin/pw_delete_file.php b/admin/pw_delete_file.php index df465e47..cdc0baf3 100644 --- a/admin/pw_delete_file.php +++ b/admin/pw_delete_file.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: pw_delete_file.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; diff --git a/admin/pw_upload_file.php b/admin/pw_upload_file.php index 738aac50..55b5deb9 100644 --- a/admin/pw_upload_file.php +++ b/admin/pw_upload_file.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: pw_upload_file.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/admin_header.php'; @@ -26,7 +25,7 @@ if (publisher_pagewrap_upload($errors)) { redirect_header(XoopsRequest::getString('backto', '', 'POST'), 2, _AM_PUBLISHER_FILEUPLOAD_SUCCESS); } else { - $errorstxt = implode('
', $errors); + $errorstxt = implode('
', $errors); $message = sprintf(_CO_PUBLISHER_MESSAGE_FILE_ERROR, $errorstxt); redirect_header(XoopsRequest::getString('backto', '', 'POST'), 5, $message); } diff --git a/archive.php b/archive.php index f92903e9..440b190b 100644 --- a/archive.php +++ b/archive.php @@ -17,7 +17,6 @@ * @author Bandit-X * @author trabis * @author Xoops Modules Dev Team - * @version $Id: archive.php 10645 2013-01-03 19:31:21Z trabis $ */ ###################################################################### # Original version: @@ -34,7 +33,20 @@ $lastyear = 0; $lastmonth = 0; -$monthsArray = array(1 => _CAL_JANUARY, 2 => _CAL_FEBRUARY, 3 => _CAL_MARCH, 4 => _CAL_APRIL, 5 => _CAL_MAY, 6 => _CAL_JUNE, 7 => _CAL_JULY, 8 => _CAL_AUGUST, 9 => _CAL_SEPTEMBER, 10 => _CAL_OCTOBER, 11 => _CAL_NOVEMBER, 12 => _CAL_DECEMBER); +$monthsArray = array( + 1 => _CAL_JANUARY, + 2 => _CAL_FEBRUARY, + 3 => _CAL_MARCH, + 4 => _CAL_APRIL, + 5 => _CAL_MAY, + 6 => _CAL_JUNE, + 7 => _CAL_JULY, + 8 => _CAL_AUGUST, + 9 => _CAL_SEPTEMBER, + 10 => _CAL_OCTOBER, + 11 => _CAL_NOVEMBER, + 12 => _CAL_DECEMBER +); $fromyear = XoopsRequest::getInt('year'); $frommonth = XoopsRequest::getInt('month'); @@ -179,11 +191,30 @@ foreach ($storyarray as $item) { $story = array(); $htmltitle = ''; - $story['title'] = "" . $item->getCategoryName() . ": ' . $item->getTitle() . ''; + $story['title'] = "" . + $item->getCategoryName() . + ": ' . + $item->getTitle() . + ''; $story['counter'] = $item->counter(); $story['date'] = $item->getDatesub(); $story['print_link'] = XOOPS_URL . '/modules/' . PUBLISHER_DIRNAME . '/print.php?itemid=' . $item->itemid(); - $story['mail_link'] = 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $GLOBALS['xoopsConfig']['sitename']) . '&body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $GLOBALS['xoopsConfig']['sitename']) . ': ' . $item->getItemUrl(); + $story['mail_link'] = 'mailto:?subject=' . + sprintf(_CO_PUBLISHER_INTITEM, $GLOBALS['xoopsConfig']['sitename']) . + '&body=' . + sprintf(_CO_PUBLISHER_INTITEMFOUND, $GLOBALS['xoopsConfig']['sitename']) . + ': ' . + $item->getItemUrl(); $xoopsTpl->append('stories', $story); } diff --git a/assets/css/publisher.css b/assets/css/publisher.css index 929128f7..e498bfa4 100644 --- a/assets/css/publisher.css +++ b/assets/css/publisher.css @@ -1,5 +1,5 @@ /** -* $Id: module.css,v 1.1 2007/06/05 18:28:24 marcan Exp $ +* * Module: SmartFAQ * Author: marcan * Licence: GNU diff --git a/assets/images/logo.png b/assets/images/logo_module.png similarity index 100% rename from assets/images/logo.png rename to assets/images/logo_module.png diff --git a/assets/js/script.easing.js b/assets/js/script.easing.js index a94ce2f3..341c05aa 100644 --- a/assets/js/script.easing.js +++ b/assets/js/script.easing.js @@ -61,7 +61,6 @@ })(jQuery); /** - * @version $Id: $Revision * @package jquery * @subpackage lofslidernews * @copyright Copyright (C) JAN 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>. All rights reserved. diff --git a/author_items.php b/author_items.php index ff8b69bf..2c3423ed 100644 --- a/author_items.php +++ b/author_items.php @@ -16,7 +16,6 @@ * @subpackage Action * @since 1.0 * @author trabis - * @version $Id: author_items.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -70,7 +69,8 @@ 'count_items' => 0, 'count_hits' => 0, 'title' => $item->getCategoryName(), - 'link' => $item->getCategoryLink()); + 'link' => $item->getCategoryLink() + ); } $categories[$catid]['count_items']++; @@ -80,7 +80,8 @@ 'hits' => $item->counter(), 'link' => $item->getItemLink(), 'published' => $item->getDatesub(), - 'rating' => $item->rating()); + 'rating' => $item->rating() + ); } } unset($item); diff --git a/backend.php b/backend.php index 9ecbf9cd..90a62c61 100644 --- a/backend.php +++ b/backend.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: backend.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -89,7 +88,8 @@ 'guid' => $item->getItemUrl(), //mb 'pubdate' => XoopsLocal::formatTimestamp($item->getVar('datesub'), 'rss'), 'pubdate' => formatTimestamp($item->getVar('datesub'), 'rss'), - 'description' => htmlspecialchars($item->getBlockSummary(300, true), ENT_QUOTES))); + 'description' => htmlspecialchars($item->getBlockSummary(300, true), ENT_QUOTES) + )); } // unset($item); } diff --git a/blocks/category_items_sel.php b/blocks/category_items_sel.php index 99d049e7..746e78a7 100644 --- a/blocks/category_items_sel.php +++ b/blocks/category_items_sel.php @@ -16,7 +16,6 @@ * @subpackage Blocks * @since 1.0 * @author trabis - * @version $Id: category_items_sel.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -99,7 +98,8 @@ function publisher_category_items_sel_edit($options) $orderEle->addOptionArray(array( 'datesub' => _MB_PUBLISHER_DATE, 'counter' => _MB_PUBLISHER_HITS, - 'weight' => _MB_PUBLISHER_WEIGHT)); + 'weight' => _MB_PUBLISHER_WEIGHT + )); $dispEle = new XoopsFormText(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]); $charsEle = new XoopsFormText(_MB_PUBLISHER_CHARS, 'options[3]', 10, 255, $options[3]); diff --git a/blocks/date_to_date.php b/blocks/date_to_date.php index d6170fcf..a2269332 100644 --- a/blocks/date_to_date.php +++ b/blocks/date_to_date.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: date_to_date.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); diff --git a/blocks/items_columns.php b/blocks/items_columns.php index f53e0014..a68a811b 100644 --- a/blocks/items_columns.php +++ b/blocks/items_columns.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author Bandit-x - * @version $Id: items_columns.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -38,7 +37,7 @@ function publisher_items_columns_show($options) //Column Settings $optNumColumns = isset($options[0]) ? (int)$options[0] : '2'; - $selCategories = isset($options[1]) ? explode(',', $options[1]) : array(); + $selCategories = isset($options[1]) ? explode(',', $options[1]) : array(); $optCatItems = (int)$options[2]; $optCatTruncate = isset($options[3]) ? (int)$options[3] : '0'; @@ -155,7 +154,8 @@ function publisher_items_columns_edit($options) '2' => 2, '3' => 3, '4' => 4, - '5' => 5)); + '5' => 5 + )); $catEle = new XoopsFormLabel(_MB_PUBLISHER_SELECTCAT, publisherCreateCategorySelect($options[1], 0, true, 'options[1]')); $cItemsEle = new XoopsFormText(_MB_PUBLISHER_NUMBER_ITEMS_CAT, 'options[2]', 4, 255, $options[2]); $truncateEle = new XoopsFormText(_MB_PUBLISHER_TRUNCATE, 'options[3]', 4, 255, $options[3]); @@ -163,7 +163,8 @@ function publisher_items_columns_edit($options) $tempEle = new XoopsFormSelect(_MB_PUBLISHER_TEMPLATE, 'options[4]', $options[4]); $tempEle->addOptionArray(array( 'normal' => _MB_PUBLISHER_TEMPLATE_NORMAL, - 'extended' => _MB_PUBLISHER_TEMPLATE_EXTENDED)); + 'extended' => _MB_PUBLISHER_TEMPLATE_EXTENDED + )); $form->addElement($colEle); $form->addElement($catEle); diff --git a/blocks/items_menu.php b/blocks/items_menu.php index 95ec6ad6..22039053 100644 --- a/blocks/items_menu.php +++ b/blocks/items_menu.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: items_menu.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -57,7 +56,7 @@ function publisher_items_menu_show($options) // if we are in a category, then the $categoryObj is already defined in publisher/category.php global $categoryObj; $block['currentcat'] = $categoryObj->getCategoryLink('menuTop'); - $catLinkClass = 'menuSub'; + $catLinkClass = 'menuSub'; } } @@ -87,7 +86,8 @@ function publisher_items_menu_edit($options) $orderEle->addOptionArray(array( 'datesub' => _MB_PUBLISHER_DATE, 'counter' => _MB_PUBLISHER_HITS, - 'weight' => _MB_PUBLISHER_WEIGHT)); + 'weight' => _MB_PUBLISHER_WEIGHT + )); $dispEle = new XoopsFormText(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]); $form->addElement($catEle); diff --git a/blocks/items_new.php b/blocks/items_new.php index 5ef5f215..0ec40f24 100644 --- a/blocks/items_new.php +++ b/blocks/items_new.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: items_new.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -35,7 +34,7 @@ function publisher_items_new_show($options) $selectedcatids = explode(',', $options[0]); - $block = array(); + $block = array(); $allcats = false; if (in_array(0, $selectedcatids)) { $allcats = true; @@ -148,7 +147,8 @@ function publisher_items_new_edit($options) 'weight' => _MB_PUBLISHER_WEIGHT, 'rating' => _MI_PUBLISHER_ORDERBY_RATING, 'votes' => _MI_PUBLISHER_ORDERBY_VOTES, - 'comments' => _MI_PUBLISHER_ORDERBY_COMMENTS)); + 'comments' => _MI_PUBLISHER_ORDERBY_COMMENTS + )); $showEle = new XoopsFormRadioYN(_MB_PUBLISHER_ORDER_SHOW, 'options[2]', $options[2]); $dispEle = new XoopsFormText(_MB_PUBLISHER_DISP, 'options[3]', 10, 255, $options[3]); @@ -159,7 +159,8 @@ function publisher_items_new_edit($options) 'none' => _NONE, 'article' => _MB_PUBLISHER_IMAGE_ARTICLE, 'category' => _MB_PUBLISHER_IMAGE_CATEGORY, - 'avatar' => _MB_PUBLISHER_IMAGE_AVATAR)); + 'avatar' => _MB_PUBLISHER_IMAGE_AVATAR + )); $form->addElement($catEle); $form->addElement($orderEle); diff --git a/blocks/items_random_item.php b/blocks/items_random_item.php index 335720ba..fe3bc056 100644 --- a/blocks/items_random_item.php +++ b/blocks/items_random_item.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: items_random_item.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); diff --git a/blocks/items_recent.php b/blocks/items_recent.php index a49b5918..9c7ffb4e 100644 --- a/blocks/items_recent.php +++ b/blocks/items_recent.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: items_recent.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -101,7 +100,8 @@ function publisher_items_recent_edit($options) $orderEle->addOptionArray(array( 'datesub' => _MB_PUBLISHER_DATE, 'counter' => _MB_PUBLISHER_HITS, - 'weight' => _MB_PUBLISHER_WEIGHT)); + 'weight' => _MB_PUBLISHER_WEIGHT + )); $dispEle = new XoopsFormText(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]); $charsEle = new XoopsFormText(_MB_PUBLISHER_CHARS, 'options[3]', 10, 255, $options[3]); diff --git a/blocks/items_spot.php b/blocks/items_spot.php index 0d4ef0e1..cf521d4e 100644 --- a/blocks/items_spot.php +++ b/blocks/items_spot.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: items_spot.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -30,16 +29,16 @@ function publisher_items_spot_show($options) { // global $xoTheme; - $publisher = PublisherPublisher::getInstance(); + $publisher = PublisherPublisher::getInstance(); $optDisplayLast = $options[0]; $optItemsCount = $options[1]; - $optCategoryId = $options[2]; - $selItems = isset($options[3]) ? explode(',', $options[3]) : ''; + $optCategoryId = $options[2]; + $selItems = isset($options[3]) ? explode(',', $options[3]) : ''; $optDisplayPoster = $options[4]; $optDisplayComment = $options[5]; $optDisplayType = $options[6]; - $optTruncate = (int)$options[7]; - $optCatImage = $options[8]; + $optTruncate = (int)$options[7]; + $optCatImage = $options[8]; if ($optCategoryId == 0) { $optCategoryId = -1; } @@ -144,7 +143,8 @@ function publisher_items_spot_edit($options) $typeEle = new XoopsFormSelect(_MB_PUBLISHER_DISPLAY_TYPE, 'options[6]', $options[6]); $typeEle->addOptionArray(array( 'block' => _MB_PUBLISHER_DISPLAY_TYPE_BLOCK, - 'bullet' => _MB_PUBLISHER_DISPLAY_TYPE_BULLET)); + 'bullet' => _MB_PUBLISHER_DISPLAY_TYPE_BULLET + )); $truncateEle = new XoopsFormText(_MB_PUBLISHER_TRUNCATE, 'options[7]', 4, 255, $options[7]); $imageEle = new XoopsFormRadioYN(_MB_PUBLISHER_DISPLAY_CATIMAGE, 'options[8]', $options[8]); $form->addElement($autoEle); diff --git a/blocks/latest_files.php b/blocks/latest_files.php index 8d954b56..7aa2c6eb 100644 --- a/blocks/latest_files.php +++ b/blocks/latest_files.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: latest_files.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -81,7 +80,8 @@ function publisher_latest_files_edit($options) $orderEle->addOptionArray(array( 'datesub' => _MB_PUBLISHER_DATE, 'counter' => _MB_PUBLISHER_HITS, - 'weight' => _MB_PUBLISHER_WEIGHT)); + 'weight' => _MB_PUBLISHER_WEIGHT + )); $dispEle = new XoopsFormText(_MB_PUBLISHER_DISP, 'options[2]', 10, 255, $options[2]); $directEle = new XoopsFormRadioYN(_MB_PUBLISHER_DIRECTDOWNLOAD, 'options[3]', $options[3]); diff --git a/blocks/latest_news.php b/blocks/latest_news.php index 9cd3cce9..78641ca6 100644 --- a/blocks/latest_news.php +++ b/blocks/latest_news.php @@ -18,7 +18,6 @@ * @author trabis * @author Bandit-x * @author Mowaffak - * @version $Id: latest_news.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -377,7 +376,13 @@ function publisher_latest_news_edit($options) $form .= $tabletag1 . _MB_PUBLISHER_TEMPLATE . $tabletag2; $form .= "'; $block['typeSelect'] = $typeSelect; - $block['searchSelect'] = $searchSelect; + $block['searchSelect'] = $searchSelect; $block['categorySelect'] = $categorySelect; $block['sortbySelect'] = $sortbySelect; - $block['search_term'] = $term; - $block['search_user'] = $username; - $block['moduleUrl'] = PUBLISHER_URL; + $block['search_term'] = $term; + $block['search_user'] = $username; + $block['moduleUrl'] = PUBLISHER_URL; return $block; } diff --git a/category.php b/category.php index b5a4f683..230edad1 100644 --- a/category.php +++ b/category.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: category.php 10746 2013-01-10 20:54:35Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -239,12 +238,14 @@ /** * Generating meta information for this page */ -$publisherMetagen = new PublisherMetagen($categoryObj->getVar('name'), $categoryObj->getVar('meta_keywords', 'n'), $categoryObj->getVar('meta_description', 'n'), $categoryObj->getCategoryPathForMetaTitle()); +$publisherMetagen = + new PublisherMetagen($categoryObj->getVar('name'), $categoryObj->getVar('meta_keywords', 'n'), $categoryObj->getVar('meta_description', 'n'), $categoryObj->getCategoryPathForMetaTitle()); $publisherMetagen->createMetaTags(); // RSS Link if ($publisher->getConfig('idxcat_show_rss_link') == 1) { - $link = sprintf("%s", PUBLISHER_URL . '/backend.php?categoryid=' . $categoryid, _MD_PUBLISHER_RSSFEED, PUBLISHER_URL . '/assets/images/rss.gif', _MD_PUBLISHER_RSSFEED); + $link = sprintf("%s", PUBLISHER_URL . '/backend.php?categoryid=' . $categoryid, _MD_PUBLISHER_RSSFEED, + PUBLISHER_URL . '/assets/images/rss.gif', _MD_PUBLISHER_RSSFEED); $xoopsTpl->assign('rssfeed_link', $link); } diff --git a/class/blockform.php b/class/blockform.php index b78b286c..05066f37 100644 --- a/class/blockform.php +++ b/class/blockform.php @@ -17,7 +17,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: blockform.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -61,7 +60,7 @@ public function render() $ret .= ''; $ret .= '' . $ele->getCaption() . ''; if (isset($eleDesc) && $eleDesc == $ele->getDescription()) { - $ret .= '

' . $eleDesc . ''; + $ret .= '

' . $eleDesc . ''; } $ret .= '' . $ele->render() . ''; } else { diff --git a/class/category.php b/class/category.php index 62772251..bd21e77a 100644 --- a/class/category.php +++ b/class/category.php @@ -15,7 +15,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: category.php 10661 2013-01-04 19:22:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -66,7 +65,7 @@ public function __construct() /** * @param string $method - * @param array $args + * @param array $args * * @return mixed */ @@ -377,11 +376,11 @@ public function __construct(XoopsDatabase $db) /** * retrieve an item * - * @param int $id itemid of the user + * @param int $id itemid of the user * - * @param null $fields + * @param null $fields * @return mixed reference to the PublisherCategory object, FALSE if failed - * object, FALSE if failed + * object, FALSE if failed */ public function get($id = null, $fields = null) { @@ -398,9 +397,9 @@ public function get($id = null, $fields = null) /** * insert a new category in the database * - * @param object|XoopsObject $category reference to the {@link PublisherCategory} - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful + * @param object|XoopsObject $category reference to the {@link PublisherCategory} + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ public function insert(XoopsObject $category, $force = false) //insert(&$category, $force = false) { @@ -427,7 +426,7 @@ public function insert(XoopsObject $category, $force = false) //insert(&$categor * delete a category from the database * * @param XoopsObject $category reference to the category to delete - * @param bool $force + * @param bool $force * * @return bool FALSE if failed. */ @@ -459,9 +458,9 @@ public function delete(XoopsObject $category, $force = false) //delete(&$categor * retrieve categories from the database * * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $idAsKey use the categoryid as key for the array? + * @param bool $idAsKey use the categoryid as key for the array? * - * @param bool $as_object + * @param bool $as_object * @return array array of XoopsItem objects */ public function &getObjects(CriteriaElement $criteria = null, $idAsKey = false, $as_object = true) //&getObjects($criteria = null, $idAsKey = false) @@ -481,12 +480,12 @@ public function &getObjects(CriteriaElement $criteria = null, $idAsKey = false, } /** - * @param int $limit - * @param int $start - * @param int $parentid + * @param int $limit + * @param int $start + * @param int $parentid * @param string $sort * @param string $order - * @param bool $idAsKey + * @param bool $idAsKey * * @return array */ @@ -692,8 +691,8 @@ public function getSubCats($categories) * * @param CriteriaElement $criteria {@link CriteriaElement} * - * @param bool $force - * @param bool $asObject + * @param bool $force + * @param bool $asObject * @return bool FALSE if deletion failed */ public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) //deleteAll($criteria = null) @@ -719,7 +718,7 @@ public function publishedItemsCount($catId = 0) } /** - * @param int $catId + * @param int $catId * @param string $status * * @return mixed diff --git a/class/constants.php b/class/constants.php index de879f56..775078cf 100644 --- a/class/constants.php +++ b/class/constants.php @@ -16,7 +16,6 @@ * @subpackage Include * @since 1.0 * @author trabis - * @version $Id: constants.php 10374 2012-12-12 23:39:48Z trabis $ */ defined('XOOPS_ROOT_PATH') || exit('Restricted access'); @@ -27,52 +26,52 @@ interface PublisherConstants { // ITEM status - const PUBLISHER_STATUS_NOTSET = -1; - const PUBLISHER_STATUS_ALL = 0; + const PUBLISHER_STATUS_NOTSET = -1; + const PUBLISHER_STATUS_ALL = 0; const PUBLISHER_STATUS_SUBMITTED = 1; const PUBLISHER_STATUS_PUBLISHED = 2; - const PUBLISHER_STATUS_OFFLINE = 3; - const PUBLISHER_STATUS_REJECTED = 4; + const PUBLISHER_STATUS_OFFLINE = 3; + const PUBLISHER_STATUS_REJECTED = 4; // Notification Events - const PUBLISHER_NOT_CATEGORY_CREATED = 1; + const PUBLISHER_NOT_CATEGORY_CREATED = 1; const PUBLISHER_NOTIFY_ITEM_SUBMITTED = 2; const PUBLISHER_NOTIFY_ITEM_PUBLISHED = 3; - const PUBLISHER_NOTIFY_ITEM_REJECTED = 4; + const PUBLISHER_NOTIFY_ITEM_REJECTED = 4; // Form constants const PUBLISHER_SUMMARY = 1; //const PUBLISHER_DISPLAY_SUMMARY = 2; const PUBLISHER_AVAILABLE_PAGE_WRAP = 3; - const PUBLISHER_ITEM_TAG = 4; - const PUBLISHER_IMAGE_ITEM = 5; + const PUBLISHER_ITEM_TAG = 4; + const PUBLISHER_IMAGE_ITEM = 5; //const PUBLISHER_IMAGE_UPLOAD = 6; - const PUBLISHER_ITEM_UPLOAD_FILE = 7; - const PUBLISHER_UID = 8; - const PUBLISHER_DATESUB = 9; - const PUBLISHER_STATUS = 10; - const PUBLISHER_ITEM_SHORT_URL = 11; - const PUBLISHER_ITEM_META_KEYWORDS = 12; + const PUBLISHER_ITEM_UPLOAD_FILE = 7; + const PUBLISHER_UID = 8; + const PUBLISHER_DATESUB = 9; + const PUBLISHER_STATUS = 10; + const PUBLISHER_ITEM_SHORT_URL = 11; + const PUBLISHER_ITEM_META_KEYWORDS = 12; const PUBLISHER_ITEM_META_DESCRIPTION = 13; - const PUBLISHER_WEIGHT = 14; - const PUBLISHER_ALLOWCOMMENTS = 15; + const PUBLISHER_WEIGHT = 14; + const PUBLISHER_ALLOWCOMMENTS = 15; //const PUBLISHER_PERMISSIONS_ITEM = 16; //const PUBLISHER_PARTIAL_VIEW = 17; - const PUBLISHER_DOHTML = 18; - const PUBLISHER_DOSMILEY = 19; - const PUBLISHER_DOXCODE = 20; - const PUBLISHER_DOIMAGE = 21; - const PUBLISHER_DOLINEBREAK = 22; - const PUBLISHER_NOTIFY = 23; - const PUBLISHER_SUBTITLE = 24; + const PUBLISHER_DOHTML = 18; + const PUBLISHER_DOSMILEY = 19; + const PUBLISHER_DOXCODE = 20; + const PUBLISHER_DOIMAGE = 21; + const PUBLISHER_DOLINEBREAK = 22; + const PUBLISHER_NOTIFY = 23; + const PUBLISHER_SUBTITLE = 24; const PUBLISHER_AUTHOR_ALIAS = 25; // Global constants const PUBLISHER_SEARCH = 1; - const PUBLISHER_RATE = 2; + const PUBLISHER_RATE = 2; // File status - const PUBLISHER_STATUS_FILE_NOTSET = -1; - const PUBLISHER_STATUS_FILE_ACTIVE = 1; + const PUBLISHER_STATUS_FILE_NOTSET = -1; + const PUBLISHER_STATUS_FILE_ACTIVE = 1; const PUBLISHER_STATUS_FILE_INACTIVE = 2; } diff --git a/class/file.php b/class/file.php index c9234157..d3b2900c 100644 --- a/class/file.php +++ b/class/file.php @@ -15,7 +15,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: file.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -65,7 +64,7 @@ public function __construct($id = null) /** * @param string $method - * @param array $args + * @param array $args * * @return mixed */ @@ -78,8 +77,8 @@ public function __call($method, $args) /** * @param string $postField - * @param array $allowedMimetypes - * @param array $errors + * @param array $allowedMimetypes + * @param array $errors * * @return bool */ @@ -110,8 +109,8 @@ public function checkUpload($postField, $allowedMimetypes = array(), &$errors) /** * @param string $postField - * @param array $allowedMimetypes - * @param array $errors + * @param array $allowedMimetypes + * @param array $errors * * @return bool */ @@ -153,8 +152,8 @@ public function storeUpload($postField, $allowedMimetypes = array(), &$errors) /** * @param null|array $allowedMimetypes - * @param bool $force - * @param bool $doupload + * @param bool $force + * @param bool $doupload * * @return bool */ @@ -260,7 +259,7 @@ public function getNameFromFilename() { $ret = $this->filename(); $sepPos = strpos($ret, '_'); - $ret = substr($ret, $sepPos + 1, strlen($ret) - $sepPos); + $ret = substr($ret, $sepPos + 1, -$sepPos); return $ret; } @@ -303,7 +302,7 @@ public function __construct(XoopsDatabase $db) * delete a file from the database * * @param XoopsObject $file reference to the file to delete - * @param bool $force + * @param bool $force * * @return bool FALSE if failed. */ @@ -321,11 +320,11 @@ public function delete(XoopsObject $file, $force = false) //delete(&$file, $forc /** * delete files related to an item from the database * - * @param object $itemObj reference to the item which files to delete + * @param XoopsObject $itemObj reference to the item which files to delete * * @return bool */ - public function deleteItemFiles(&$itemObj) + public function deleteItemFiles(XoopsObject $itemObj) { if (strtolower(get_class($itemObj)) !== 'publisheritem') { return false; @@ -344,13 +343,13 @@ public function deleteItemFiles(&$itemObj) /** * retrieve all files * - * @param int $itemid - * @param int $status - * @param int $limit - * @param int $start + * @param int $itemid + * @param int $status + * @param int $limit + * @param int $start * @param string $sort * @param string $order - * @param array $category + * @param array $category * * @return array array of {@link PublisherFile} objects */ diff --git a/class/form/category.php b/class/form/category.php index 5ed4d46a..1e7e5e2f 100644 --- a/class/form/category.php +++ b/class/form/category.php @@ -17,7 +17,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: category.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit("XOOPS root path not defined"); @@ -126,7 +125,7 @@ public function createElements() $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"image\", \"" . 'uploads/' . PUBLISHER_DIRNAME . '/images/category/' . "\", \"\", \"" . XOOPS_URL . "\")'"); $imageTray = new XoopsFormElementTray(_AM_PUBLISHER_IMAGE, ' '); $imageTray->addElement($imageSelect); - $imageTray->addElement(new XoopsFormLabel('', "

targetObject->getImage() . "' name='image3' id='image3' alt='' />")); + $imageTray->addElement(new XoopsFormLabel('', "

targetObject->getImage() . "' name='image3' id='image3' alt='' />")); $imageTray->setDescription(_AM_PUBLISHER_IMAGE_DSC); $this->addElement($imageTray); @@ -215,7 +214,7 @@ public function createElements() $this->addElement($moderator); //SUBCATEGORY - $catTray = new XoopsFormElementTray(_AM_PUBLISHER_SCATEGORYNAME, '

'); + $catTray = new XoopsFormElementTray(_AM_PUBLISHER_SCATEGORYNAME, '

'); for ($i = 0; $i < $this->subCatsCount; ++$i) { $subname = ''; if ($i < (($scname = XoopsRequest::getArray('scname', array(), 'POST')) ? count($scname) : 0)) { diff --git a/class/form/file.php b/class/form/file.php index 6b6ca87e..9c936a0c 100644 --- a/class/form/file.php +++ b/class/form/file.php @@ -17,7 +17,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: file.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit("XOOPS root path not defined"); diff --git a/class/form/item.php b/class/form/item.php index a364f34d..474693ba 100644 --- a/class/form/item.php +++ b/class/form/item.php @@ -18,7 +18,6 @@ * @subpackage Forms * @since 1.0 * @author trabis - * @version $Id: item.php 10645 2013-01-03 19:31:21Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit("XOOPS root path not defined"); @@ -41,7 +40,8 @@ class PublisherItemForm extends PublisherThemeTabForm _CO_PUBLISHER_TAB_MAIN => 'mainTab', _CO_PUBLISHER_TAB_IMAGES => 'imagesTab', _CO_PUBLISHER_TAB_FILES => 'filesTab', - _CO_PUBLISHER_TAB_OTHERS => 'othersTab'); + _CO_PUBLISHER_TAB_OTHERS => 'othersTab' + ); public $mainTab = array( PublisherConstants::PUBLISHER_SUBTITLE, @@ -58,19 +58,23 @@ class PublisherItemForm extends PublisherThemeTabForm PublisherConstants::PUBLISHER_AUTHOR_ALIAS, PublisherConstants::PUBLISHER_NOTIFY, PublisherConstants::PUBLISHER_AVAILABLE_PAGE_WRAP, - PublisherConstants::PUBLISHER_UID); + PublisherConstants::PUBLISHER_UID + ); public $imagesTab = array( - PublisherConstants::PUBLISHER_IMAGE_ITEM); + PublisherConstants::PUBLISHER_IMAGE_ITEM + ); public $filesTab = array( - PublisherConstants::PUBLISHER_ITEM_UPLOAD_FILE); + PublisherConstants::PUBLISHER_ITEM_UPLOAD_FILE + ); public $othersTab = array( PublisherConstants::PUBLISHER_ITEM_META_KEYWORDS, PublisherConstants::PUBLISHER_ITEM_META_DESCRIPTION, PublisherConstants::PUBLISHER_WEIGHT, - PublisherConstants::PUBLISHER_ALLOWCOMMENTS); + PublisherConstants::PUBLISHER_ALLOWCOMMENTS + ); /** * @param $checkperm @@ -215,7 +219,12 @@ public function createElements($obj) $this->addElement($bodyText); // VARIOUS OPTIONS - if ($this->isGranted(PublisherConstants::PUBLISHER_DOHTML) || $this->isGranted(PublisherConstants::PUBLISHER_DOSMILEY) || $this->isGranted(PublisherConstants::PUBLISHER_DOXCODE) || $this->isGranted(PublisherConstants::PUBLISHER_DOIMAGE) || $this->isGranted(PublisherConstants::PUBLISHER_DOLINEBREAK)) { + if ($this->isGranted(PublisherConstants::PUBLISHER_DOHTML) || + $this->isGranted(PublisherConstants::PUBLISHER_DOSMILEY) || + $this->isGranted(PublisherConstants::PUBLISHER_DOXCODE) || + $this->isGranted(PublisherConstants::PUBLISHER_DOIMAGE) || + $this->isGranted(PublisherConstants::PUBLISHER_DOLINEBREAK) + ) { if ($this->isGranted(PublisherConstants::PUBLISHER_DOHTML)) { $html_radio = new XoopsFormRadioYN(_CO_PUBLISHER_DOHTML, 'dohtml', $obj->dohtml(), _YES, _NO); $this->addElement($html_radio); @@ -288,7 +297,8 @@ public function createElements($obj) PublisherConstants::PUBLISHER_STATUS_SUBMITTED => _CO_PUBLISHER_SUBMITTED, PublisherConstants::PUBLISHER_STATUS_PUBLISHED => _CO_PUBLISHER_PUBLISHED, PublisherConstants::PUBLISHER_STATUS_OFFLINE => _CO_PUBLISHER_OFFLINE, - PublisherConstants::PUBLISHER_STATUS_REJECTED => _CO_PUBLISHER_REJECTED); + PublisherConstants::PUBLISHER_STATUS_REJECTED => _CO_PUBLISHER_REJECTED + ); $statusSelect = new XoopsFormSelect(_CO_PUBLISHER_STATUS, 'status', $obj->getVar('status')); $statusSelect->addOptionArray($options); $statusSelect->setDescription(_CO_PUBLISHER_STATUS_DSC); @@ -363,7 +373,9 @@ public function createElements($obj) $imageSelect2 = new XoopsFormSelect('', 'image_item', '', 5, true); $imageSelect2->addOptionArray($objimage_array); - $imageSelect2->setExtra("onchange='publisher_updateSelectOption(\"image_item\", \"image_featured\"), showImgSelected(\"image_display\", \"image_item\", \"uploads/\", \"\", \"" . XOOPS_URL . "\")'"); + $imageSelect2->setExtra("onchange='publisher_updateSelectOption(\"image_item\", \"image_featured\"), showImgSelected(\"image_display\", \"image_item\", \"uploads/\", \"\", \"" . + XOOPS_URL . + "\")'"); $buttonadd = new XoopsFormButton('', 'buttonadd', _CO_PUBLISHER_ADD); $buttonadd->setExtra("onclick='publisher_appendSelectOption(\"image_notused\", \"image_item\"), publisher_updateSelectOption(\"image_item\", \"image_featured\")'"); @@ -373,7 +385,7 @@ public function createElements($obj) $opentable = new XoopsFormLabel('', '
'); $addcol = new XoopsFormLabel('', ''); - $addbreak = new XoopsFormLabel('', '
'); + $addbreak = new XoopsFormLabel('', '
'); $closetable = new XoopsFormLabel('', '
'); $GLOBALS['xoTheme']->addScript(PUBLISHER_URL . '/assets/js/ajaxupload.3.9.js'); diff --git a/class/formdatetime.php b/class/formdatetime.php index 1f462f39..92d68265 100644 --- a/class/formdatetime.php +++ b/class/formdatetime.php @@ -16,7 +16,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: formdatetime.php 10276 2012-11-27 13:58:28Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); diff --git a/class/groupperm.php b/class/groupperm.php index bdd5f3db..06dfea62 100644 --- a/class/groupperm.php +++ b/class/groupperm.php @@ -17,7 +17,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: groupperm.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -34,12 +33,12 @@ class PublisherGroupPermHandler extends XoopsGroupPermHandler /** * Check permission * - * @param string $gpermName Name of permission - * @param int $gpermItemId ID of an item - * @param $gpermGroupId - * @param int $gpermModId ID of a module + * @param string $gpermName Name of permission + * @param int $gpermItemId ID of an item + * @param $gpermGroupId + * @param int $gpermModId ID of a module * - * @param bool $trueifadmin + * @param bool $trueifadmin * @return bool TRUE if permission is enabled * @internal param $int /array $gpermGroupId A group ID or an array of group IDs */ @@ -60,6 +59,7 @@ public function checkRight($gpermName, $gpermItemId, $gpermGroupId, $gpermModId } else { $criteria->add(new Criteria('gperm_groupid', $gpermGroupId)); } + return $this->getCount($criteria) > 0; } } diff --git a/class/highlighter.php b/class/highlighter.php index 374758c5..d126eab7 100644 --- a/class/highlighter.php +++ b/class/highlighter.php @@ -10,12 +10,11 @@ */ /** - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @copyright XOOPS Project (http://xoops.org) * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author trabis * @author Aidan Lister * @link http://aidanlister.com/2004/04/highlighting-a-search-string-in-html-text/ - * @version $Id: highlighter.php 10374 2012-12-12 23:39:48Z trabis $ */ class PublisherHighlighter { @@ -110,10 +109,10 @@ public function highlight($text, $needle) { // Select pattern to use if ($this->simple) { - $pattern = '#(%s)#'; + $pattern = '#(%s)#'; $slPattern = '#(%s)#'; } else { - $pattern = '#(?!<.*?)(%s)(?![^<>]*?>)#'; + $pattern = '#(?!<.*?)(%s)(?![^<>]*?>)#'; $slPattern = '#(%s)#'; } // Case sensitivity @@ -131,7 +130,7 @@ public function highlight($text, $needle) // Strip links if ($this->stripLinks) { $slRegex = sprintf($slPattern, $needleS); - $text = preg_replace($slRegex, '\1', $text); + $text = preg_replace($slRegex, '\1', $text); } $regex = sprintf($pattern, $needleS); $text = preg_replace($regex, $this->replacementString, $text); diff --git a/class/item.php b/class/item.php index c1bdf646..772b7632 100644 --- a/class/item.php +++ b/class/item.php @@ -15,7 +15,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: item.php 10728 2013-01-09 22:09:22Z trabis $ */ //namespace Publisher; @@ -88,7 +87,7 @@ public function __construct($id = null) /** * @param string $method - * @param array $args + * @param array $args * * @return mixed */ @@ -112,7 +111,7 @@ public function getCategory() } /** - * @param int $maxLength + * @param int $maxLength * @param string $format * * @return mixed|string @@ -132,7 +131,7 @@ public function getTitle($maxLength = 0, $format = 'S') } /** - * @param int $maxLength + * @param int $maxLength * @param string $format * * @return mixed|string @@ -152,7 +151,7 @@ public function getSubtitle($maxLength = 0, $format = 'S') } /** - * @param int $maxLength + * @param int $maxLength * @param string $format * @param string $stripTags * @@ -177,7 +176,7 @@ public function getSummary($maxLength = 0, $format = 'S', $stripTags = '') } /** - * @param int $maxLength + * @param int $maxLength * @param bool $fullSummary * * @return mixed|string @@ -231,7 +230,7 @@ public function wrapPage($fileName) /** * This method returns the body to be displayed. Not to be used for editing * - * @param int $maxLength + * @param int $maxLength * @param string $format * @param string $stripTags * @@ -564,7 +563,7 @@ public function getItemUrl() /** * @param bool $class - * @param int $maxsize + * @param int $maxsize * * @return string */ @@ -619,13 +618,13 @@ public function plainMaintext($body = null) if (!$body) { $body = $this->body(); } - $ret .= str_replace('[pagebreak]', '

', $body); + $ret .= str_replace('[pagebreak]', '

', $body); return $ret; } /** - * @param int $itemPageId + * @param int $itemPageId * @param null|string $body * * @return string @@ -696,9 +695,9 @@ public function getImages() /** * @param string $display - * @param int $maxCharTitle - * @param int $maxCharSummary - * @param bool $fullSummary + * @param int $maxCharTitle + * @param int $maxCharSummary + * @param bool $fullSummary * * @return array */ @@ -780,7 +779,7 @@ public function toArrayFull($item) /** * @param array $item - * @param int $itemPageId + * @param int $itemPageId * * @return array */ @@ -848,7 +847,7 @@ public function getOtherImages($item = array()) } /** - * @param string $content + * @param string $content * @param string|array $keywords * * @return Text @@ -856,7 +855,7 @@ public function getOtherImages($item = array()) public function highlight($content, $keywords) { $color = $this->publisher->getConfig('format_highlight_color'); - if (substr($color, 0, 1) !== '#') { + if (0 !== strpos($color, '#')) { $color = '#' . $color; } include_once __DIR__ . '/highlighter.php'; @@ -916,7 +915,7 @@ protected function convertForJapanese($str) /** * @param string $title - * @param bool $checkperm + * @param bool $checkperm * * @return PublisherItemForm */ @@ -1108,11 +1107,11 @@ public function create($isNew = true) /** * retrieve an item * - * @param int $id itemid of the user + * @param int $id itemid of the user * - * @param null $fields + * @param null $fields * @return mixed reference to the PublisherItem object, FALSE if failed - * object, FALSE if failed + * object, FALSE if failed */ public function get($id = null, $fields = null) { @@ -1128,7 +1127,7 @@ public function get($id = null, $fields = null) * insert a new item in the database * * @param XoopsObject $item reference to the {@link PublisherItem} object - * @param bool $force + * @param bool $force * * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ @@ -1164,7 +1163,7 @@ public function insert(XoopsObject $item, $force = false) //insert(&$item, $for * delete an item from the database * * @param XoopsObject $item reference to the ITEM to delete - * @param bool $force + * @param bool $force * * @return bool FALSE if failed. */ @@ -1172,10 +1171,10 @@ public function delete(XoopsObject $item, $force = false) { // Deleting the files if (!$this->publisher->getHandler('file')->deleteItemFiles($item)) { - $item->setErrors('An error while deleting a file.'); + $item->setErrors(_AM_PUBLISHER_FILE_DELETE_ERROR); } if (!parent::delete($item, $force)) { - $item->setErrors('An error while deleting.'); + $item->setErrors(_AM_PUBLISHER_ITEM_DELETE_ERROR); return false; } @@ -1191,14 +1190,14 @@ public function delete(XoopsObject $item, $force = false) /** * retrieve items from the database * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool|string $idKey what shall we use as array key ? none, itemid, categoryid - * @param bool $as_object - * @param string $notNullFields - * @return array array of PublisherItem objects - * objects + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool|string $idKey what shall we use as array key ? none, itemid, categoryid + * @param bool $as_object + * @param string $notNullFields + * @return array array of PublisherItem objects + * objects */ - public function &getObjects(CriteriaElement $criteria = null, $idKey = false, $as_object = true, $notNullFields = '') //&getObjects($criteria = null, $idKey = 'none', $notNullFields = '') + public function &getObjects(CriteriaElement $criteria = null, $idKey = 'none', $as_object = true, $notNullFields = '') //&getObjects($criteria = null, $idKey = 'none', $notNullFields = '') { $ret = array(); $limit = $start = 0; @@ -1250,7 +1249,7 @@ public function &getObjects(CriteriaElement $criteria = null, $idKey = false, $a * count items matching a condition * * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @param string $notNullFields + * @param string $notNullFields * * @return int count of items */ @@ -1280,9 +1279,9 @@ public function getCount(CriteriaElement $criteria = null, $notNullFields = '') } /** - * @param int $categoryid - * @param string $status - * @param string $notNullFields + * @param int $categoryid + * @param string $status + * @param string $notNullFields * @param $criteriaPermissions * @return CriteriaCompo */ @@ -1350,7 +1349,7 @@ public function getItemsCount($categoryid = -1, $status = '', $notNullFields = ' } } // $ret = array(); - $criteria = self::getItemsCriteria($categoryid, $status, $notNullFields, $criteriaPermissions); + $criteria = $this->getItemsCriteria($categoryid, $status, $notNullFields, $criteriaPermissions); /* if (isset($categoryid) && $categoryid != -1) { $criteriaCategory = new criteria('categoryid', $categoryid); @@ -1380,13 +1379,13 @@ public function getItemsCount($categoryid = -1, $status = '', $notNullFields = ' } /** - * @param int $limit - * @param int $start - * @param int $categoryid + * @param int $limit + * @param int $start + * @param int $categoryid * @param string $sort * @param string $order * @param string $notNullFields - * @param bool $asObject + * @param bool $asObject * @param string $idKey * * @return array @@ -1436,13 +1435,13 @@ public function getNextPublished($obj) } /** - * @param int $limit - * @param int $start - * @param int $categoryid + * @param int $limit + * @param int $start + * @param int $categoryid * @param string $sort * @param string $order * @param string $notNullFields - * @param bool $asObject + * @param bool $asObject * @param string $idKey * * @return array @@ -1453,13 +1452,13 @@ public function getAllSubmitted($limit = 0, $start = 0, $categoryid = -1, $sort } /** - * @param int $limit - * @param int $start - * @param int $categoryid + * @param int $limit + * @param int $start + * @param int $categoryid * @param string $sort * @param string $order * @param string $notNullFields - * @param bool $asObject + * @param bool $asObject * @param string $idKey * * @return array @@ -1470,13 +1469,13 @@ public function getAllOffline($limit = 0, $start = 0, $categoryid = -1, $sort = } /** - * @param int $limit - * @param int $start - * @param int $categoryid + * @param int $limit + * @param int $start + * @param int $categoryid * @param string $sort * @param string $order * @param string $notNullFields - * @param bool $asObject + * @param bool $asObject * @param string $idKey * * @return array @@ -1487,15 +1486,15 @@ public function getAllRejected($limit = 0, $start = 0, $categoryid = -1, $sort = } /** - * @param int $limit - * @param int $start + * @param int $limit + * @param int $start * @param string $status - * @param int $categoryid + * @param int $categoryid * @param string $sort * @param string $order * @param string $notNullFields - * @param bool $asObject - * @param null $otherCriteria + * @param bool $asObject + * @param null $otherCriteria * @param string $idKey * @return array * @internal param bool $asObject @@ -1516,7 +1515,7 @@ public function getItems($limit = 0, $start = 0, $status = '', $categoryid = -1, } } - $criteria = self::getItemsCriteria($categoryid, $status, $notNullFields, $criteriaPermissions); + $criteria = $this->getItemsCriteria($categoryid, $status, $notNullFields, $criteriaPermissions); /* if (isset($categoryid) && $categoryid != -1) { $criteriaCategory = new criteria('categoryid', $categoryid); @@ -1557,7 +1556,7 @@ public function getItems($limit = 0, $start = 0, $status = '', $categoryid = -1, /** * @param string $field * @param string $status - * @param int $categoryId + * @param int $categoryId * * @return bool */ @@ -1585,8 +1584,8 @@ public function getRandomItem($field = '', $status = '', $categoryId = -1) * * @param CriteriaElement $criteria {@link CriteriaElement} * - * @param bool $force - * @param bool $asObject + * @param bool $force + * @param bool $asObject * @return bool FALSE if deletion failed */ public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) //deleteAll($criteria = null) @@ -1617,7 +1616,7 @@ public function updateCounter($itemid) /** * @param string|array $notNullFields - * @param bool $withAnd + * @param bool $withAnd * * @return string */ @@ -1639,13 +1638,13 @@ public function notNullFieldClause($notNullFields = '', $withAnd = false) } /** - * @param array $queryarray + * @param array $queryarray * @param string $andor - * @param int $limit - * @param int $offset - * @param int $userid - * @param array $categories - * @param int $sortby + * @param int $limit + * @param int $offset + * @param int $userid + * @param array $categories + * @param int $sortby * @param string $searchin * @param string $extra * @@ -1827,9 +1826,9 @@ public function countArticlesByCat($parentid, $catsCount, $spaces = '') } /** - * @param int $catId + * @param int $catId * @param array $status - * @param bool $inSubCat + * @param bool $inSubCat * * @return array */ diff --git a/class/metagen.php b/class/metagen.php index 112178f9..b74b1ead 100644 --- a/class/metagen.php +++ b/class/metagen.php @@ -15,7 +15,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: metagen.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -256,7 +255,7 @@ public function createMetaTags() * Return true if the string is length > 0 * * @credit psylove - * @var string $string Chaine de caractère + * @var string $string Chaine de caractère * @return boolean */ public function emptyString($var) @@ -280,8 +279,37 @@ public static function generateSeoTitle($title = '', $withExt = true) // Codage de la chaine afin d'éviter les erreurs 500 en cas de caractères imprévus $title = rawurlencode(strtolower($title)); // Transformation des ponctuations - // Tab Space ! " # % & ' ( ) , / : ; < = > ? @ [ \ ] ^ { | } ~ . - $pattern = array('/%09/', '/%20/', '/%21/', '/%22/', '/%23/', '/%25/', '/%26/', '/%27/', '/%28/', '/%29/', '/%2C/', '/%2F/', '/%3A/', '/%3B/', '/%3C/', '/%3D/', '/%3E/', '/%3F/', '/%40/', '/%5B/', '/%5C/', '/%5D/', '/%5E/', '/%7B/', '/%7C/', '/%7D/', '/%7E/', "/\./"); + + $pattern = array( + '/%09/', // Tab + '/%20/', // Space + '/%21/', // ! + '/%22/', // " + '/%23/', // # + '/%25/', // % + '/%26/', // & + '/%27/', // ' + '/%28/', // ( + '/%29/', // ) + '/%2C/', // , + '/%2F/', // / + '/%3A/', // : + '/%3B/', // ; + '/%3C/', // < + '/%3D/', // = + '/%3E/', // > + '/%3F/', // ? + '/%40/', // @ + '/%5B/', // [ + '/%5C/', // \ + '/%5D/', // ] + '/%5E/', // ^ + '/%7B/', // { + '/%7C/', // | + '/%7D/', // } + '/%7E/', // ~ + "/\./" // . + ); $repPat = array('-', '-', '-', '-', '-', '-100', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-at-', '-', '-', '-', '-', '-', '-', '-', '-', '-'); $title = preg_replace($pattern, $repPat, $title); // Transformation des caractères accentués @@ -311,9 +339,9 @@ public static function generateSeoTitle($title = '', $withExt = true) */ public function purifyText($text, $keyword = false) { - // $text = str_replace([' ', ' '], ['
', ' '], $text); //for php 5.4 + // $text = str_replace([' ', ' '], ['
', ' '], $text); //for php 5.4 $text = str_replace(' ', ' ', $text); - $text = str_replace('
', ' ', $text); + $text = str_replace('
', ' ', $text); $text = strip_tags($text); $text = html_entity_decode($text); $text = $this->myts->undoHtmlSpecialChars($text); diff --git a/class/mimetype.php b/class/mimetype.php index dfaa54a1..c714d3c5 100644 --- a/class/mimetype.php +++ b/class/mimetype.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: mimetype.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -32,7 +31,6 @@ * @since 1.0 * @author trabis * @author Nazar Aziz - * @version $Id: mimetype.php 10374 2012-12-12 23:39:48Z trabis $ */ class PublisherBaseObjectHandler extends XoopsPersistableObjectHandler { @@ -68,7 +66,7 @@ public function init(XoopsDatabase $db) /** * create a new object * - * @param bool $isNew + * @param bool $isNew * @return object publisherBaseObject * @access public */ @@ -80,9 +78,9 @@ public function create($isNew = true) /** * retrieve an object from the database, based on. use in child classes * - * @param int $id ID + * @param int $id ID * - * @param null $fields + * @param null $fields * @return mixed object if id exists, false if not * @access public */ @@ -110,9 +108,9 @@ public function get($id = null, $fields = null) * * @param CriteriaElement|object $criteria {@link CriteriaElement} * conditions to be met - * @param bool $idAsKey Should the department ID be used as array key + * @param bool $idAsKey Should the department ID be used as array key * - * @param bool $asObject + * @param bool $asObject * @return array array of objects * @access public */ @@ -147,11 +145,11 @@ public function &getObjects(CriteriaElement $criteria = null, $idAsKey = false, /** * @param XoopsObject $obj - * @param bool $force + * @param bool $force * * @return bool|void */ - public function insert(XoopsObject $obj, $force = false)// insert(&$obj, $force = false) + public function insert(XoopsObject $obj, $force = false)// insert($obj, $force = false) { // Make sure object is of correct type if (strcasecmp($this->className, get_class($obj)) != 0) { @@ -239,13 +237,13 @@ public function getCount(CriteriaElement $criteria = null) //getCount($criteria /** * delete object based on id * - * @param XoopsObject $obj {@link XoopsObject} to delete - * @param bool $force override XOOPS delete protection + * @param XoopsObject $obj {@link XoopsObject} to delete + * @param bool $force override XOOPS delete protection * * @return bool deletion successful? * @access public */ - public function delete(XoopsObject $obj, $force = false) //delete(&$obj, $force = false) + public function delete(XoopsObject $obj, $force = false) //delete($obj, $force = false) { if (strcasecmp($this->className, get_class($obj)) != 0) { return false; @@ -268,8 +266,8 @@ public function delete(XoopsObject $obj, $force = false) //delete(&$obj, $force * * @param CriteriaElement|object $criteria {@link CriteriaElement} * - * @param bool $force - * @param bool $asObject + * @param bool $force + * @param bool $asObject * @return bool FALSE if deletion failed * @access public */ @@ -289,11 +287,11 @@ public function deleteAll(CriteriaElement $criteria = null, $force = true, $asOb /** * Assign a value to 1 field for tickets matching a set of conditions * - * @param string $fieldname - * @param string $fieldvalue + * @param string $fieldname + * @param string $fieldvalue * @param CriteriaElement|object $criteria {@link CriteriaElement} * - * @param bool $force + * @param bool $force * @return bool FALSE if update failed * @access public */ @@ -316,7 +314,7 @@ public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = n * * @return bool */ - protected function insertQuery(&$obj) + protected function insertQuery($obj) { return false; } @@ -326,7 +324,7 @@ protected function insertQuery(&$obj) * * @return bool */ - protected function updateQuery(&$obj) + protected function updateQuery($obj) { return false; } @@ -336,7 +334,7 @@ protected function updateQuery(&$obj) * * @return bool */ - protected function deleteQuery(&$obj) + protected function deleteQuery($obj) { return false; } @@ -416,9 +414,9 @@ public function __construct(XoopsDatabase $db) /** * retrieve a mimetype object from the database * - * @param int $id ID of mimetype + * @param int $id ID of mimetype * - * @param null $fields + * @param null $fields * @return object PublisherMimetype * @access public */ @@ -447,8 +445,8 @@ public function get($id = null, $fields = null) * @param CriteriaElement|object $criteria {@link CriteriaElement} * conditions to be met * - * @param bool $idAsKey - * @param bool $asObject + * @param bool $idAsKey + * @param bool $asObject * @return array array of PublisherMimetype objects * objects * @access public @@ -462,7 +460,7 @@ public function &getObjects(CriteriaElement $criteria = null, $idAsKey = false, $limit = $criteria->getLimit(); $start = $criteria->getStart(); } - //echo "
$sql
"; + //echo "
$sql
"; $result = $this->db->query($sql, $limit, $start); // if no records from db, return empty array if (!$result) { @@ -561,7 +559,7 @@ public function getArrayByType() * Create a "select" SQL query * * @param null|object $criteria {@link CriteriaElement} to match - * @param bool $join + * @param bool $join * * @return string string SQL query * @access private @@ -600,14 +598,15 @@ private function selectQuery($criteria = null, $join = false) * * @return bool|string */ - protected function insertQuery(&$obj) + protected function insertQuery($obj) { // Copy all object vars into local variables foreach ($obj->cleanVars as $k => $v) { ${$k} = $v; } $sql = sprintf('INSERT INTO %s (mime_id, mime_ext, mime_types, mime_name, mime_admin, mime_user) VALUES - (%u, %s, %s, %s, %u, %u)', $this->db->prefix($this->dbtable), $obj->getVar('mime_id'), $this->db->quoteString($obj->getVar('mime_ext')), $this->db->quoteString($obj->getVar('mime_types')), $this->db->quoteString($obj->getVar('mime_name')), $obj->getVar('mime_admin'), $obj->getVar('mime_user')); + (%u, %s, %s, %s, %u, %u)', $this->db->prefix($this->dbtable), $obj->getVar('mime_id'), $this->db->quoteString($obj->getVar('mime_ext')), $this->db->quoteString($obj->getVar('mime_types')), + $this->db->quoteString($obj->getVar('mime_name')), $obj->getVar('mime_admin'), $obj->getVar('mime_user')); return $sql; } @@ -617,14 +616,15 @@ protected function insertQuery(&$obj) * * @return bool|string */ - protected function updateQuery(&$obj) + protected function updateQuery($obj) { // Copy all object vars into local variables foreach ($obj->cleanVars as $k => $v) { ${$k} = $v; } $sql = sprintf('UPDATE %s SET mime_ext = %s, mime_types = %s, mime_name = %s, mime_admin = %u, mime_user = %u WHERE - mime_id = %u', $this->db->prefix($this->dbtable), $this->db->quoteString($obj->getVar('mime_ext')), $this->db->quoteString($obj->getVar('mime_types')), $this->db->quoteString($obj->getVar('mime_name')), $obj->getVar('mime_admin'), $obj->getVar('mime_user'), $obj->getVar('mime_id')); + mime_id = %u', $this->db->prefix($this->dbtable), $this->db->quoteString($obj->getVar('mime_ext')), $this->db->quoteString($obj->getVar('mime_types')), + $this->db->quoteString($obj->getVar('mime_name')), $obj->getVar('mime_admin'), $obj->getVar('mime_user'), $obj->getVar('mime_id')); return $sql; } @@ -634,7 +634,7 @@ protected function updateQuery(&$obj) * * @return bool|string */ - protected function deleteQuery(&$obj) + protected function deleteQuery($obj) { $sql = sprintf('DELETE FROM %s WHERE mime_id = %u', $this->db->prefix($this->dbtable), $obj->getVar('mime_id')); diff --git a/class/permission.php b/class/permission.php index 5d53a7be..4a949162 100644 --- a/class/permission.php +++ b/class/permission.php @@ -18,7 +18,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: permission.php 10661 2013-01-04 19:22:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); include_once dirname(__DIR__) . '/include/common.php'; @@ -148,7 +147,7 @@ public function isGranted($gpermName, $id) */ public function saveItemPermissions($groups, $itemId, $permName) { - $result = true; + $result = true; $moduleId = $this->publisher->getModule()->getVar('mid'); $gpermHandler = xoops_getHandler('groupperm'); // First, if the permissions are already there, delete them @@ -168,14 +167,14 @@ public function saveItemPermissions($groups, $itemId, $permName) * Delete all permission for a specific item * deletePermissions() * - * @param integer $itemId : id of the item for which to delete the permissions + * @param integer $itemId : id of the item for which to delete the permissions * @param string $gpermName * * @return boolean : TRUE if the no errors occured */ public function deletePermissions($itemId, $gpermName) { - $result = true; + $result = true; $gpermHandler = xoops_getHandler('groupperm'); $gpermHandler->deleteByModule($this->publisher->getModule()->getVar('mid'), $gpermName, $itemId); diff --git a/class/plugins/plugin.tag.php b/class/plugins/plugin.tag.php index fdeaddc8..b9acc646 100644 --- a/class/plugins/plugin.tag.php +++ b/class/plugins/plugin.tag.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: plugin.tag.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -50,7 +49,8 @@ function publisher_tag_iteminfo(&$items) 'link' => "item.php?itemid={$itemId}", 'time' => $itemObj->getVar('datesub'), 'tags' => tag_parse_tag($itemObj->getVar('item_tag', 'n')), // optional - 'content' => ''); + 'content' => '' + ); } } unset($itemsObj); diff --git a/class/publisher.php b/class/publisher.php index 29f6fcd9..41ef9585 100644 --- a/class/publisher.php +++ b/class/publisher.php @@ -17,7 +17,6 @@ * @subpackage Utils * @since 1.0 * @author trabis - * @version $Id: publisher.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -46,11 +45,10 @@ protected function __construct($debug) */ public static function getInstance($debug = false) { - static $instance = false; - if (!$instance) { - $instance = new self($debug); + static $instance; + if (!isset($instance)) { + $instance = new static($debug); } - return $instance; } diff --git a/class/rating.php b/class/rating.php index b70baa6b..0bcc9aaf 100644 --- a/class/rating.php +++ b/class/rating.php @@ -16,7 +16,6 @@ * @package Publisher * @since 1.0 * @author trabis - * @version $Id: rating.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); diff --git a/class/session.php b/class/session.php index 82c63c8e..63533e26 100644 --- a/class/session.php +++ b/class/session.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author Harry Fuecks (PHP Anthology Volume II) - * @version $Id: session.php 10283 2012-11-28 13:39:36Z trabis $ */ //namespace Publisher; @@ -31,7 +30,7 @@ class PublisherSession { /** - * Session constructor
+ * Session constructor
* Starts the session with session_start() * Note: that if the session has already started, * session_start() does nothing @@ -100,7 +99,7 @@ public function destroy() /** * @return PublisherSession */ - public static function &getInstance() + public static function getInstance() { static $_sess; if (!isset($_sess)) { diff --git a/class/themetabform.php b/class/themetabform.php index bf3d7f72..8c3c5c02 100644 --- a/class/themetabform.php +++ b/class/themetabform.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author John Neill - * @version $Id: themetabform.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -29,7 +28,6 @@ * @package * @author John * @copyright Copyright (c) 2009 - * @version $Id: themetabform.php 10374 2012-12-12 23:39:48Z trabis $ * @access public */ class PublisherThemeTabForm extends XoopsForm @@ -97,7 +95,7 @@ class PublisherThemeTabForm extends XoopsForm * @param string $name * @param string $action * @param string $method - * @param bool $addtoken + * @param bool $addtoken * @param string $summary */ public function __construct($title, $name, $action, $method = 'post', $addtoken = false, $summary = '') @@ -170,7 +168,8 @@ public function assign(XoopsTpl $tpl) 'extra' => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '();"' . $this->getExtra(), 'javascript' => $js, 'tabs' => $this->formTabs, - 'elements' => $elements)); + 'elements' => $elements + )); } /** @@ -282,7 +281,7 @@ public function getMethod() * Add an element to the form * * @param object $formElement reference to a {@link XoopsFormElement} - * @param bool $required is this a "required" element? + * @param bool $required is this a "required" element? */ public function addElement($formElement, $required = false) { @@ -400,8 +399,8 @@ public function setElementValues($values) /** * Gets the "value" attribute of a form element * - * @param string $name the "name" attribute of a form element - * @param bool $encode To sanitizer the text? + * @param string $name the "name" attribute of a form element + * @param bool $encode To sanitizer the text? * * @return string the "value" attribute assigned to a form element, null if not set */ diff --git a/class/uploader.php b/class/uploader.php index fdb55608..a1d21d3a 100644 --- a/class/uploader.php +++ b/class/uploader.php @@ -1,8 +1,8 @@ // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // @@ -42,7 +42,7 @@ * echo $uploader->getErrors(); * } else { * echo '

File uploaded successfully!

' - * echo 'Saved as: ' . $uploader->getSavedFileName() . '
'; + * echo 'Saved as: ' . $uploader->getSavedFileName() . '
'; * echo 'Full path: ' . $uploader->getSavedDestination(); * } * } else { @@ -64,7 +64,7 @@ * echo $uploader->getErrors(); * } else { * echo '

File uploaded successfully!

' - * echo 'Saved as: ' . $uploader->getSavedFileName() . '
'; + * echo 'Saved as: ' . $uploader->getSavedFileName() . '
'; * echo 'Full path: ' . $uploader->getSavedDestination(); * } * } else { @@ -162,7 +162,7 @@ public function fetchMedia($mediaName, $index = null) $this->mediaTmpName = $_FILES[$mediaName]['tmp_name'][$index]; $this->mediaError = !empty($_FILES[$mediaName]['error'][$index]) ? $_FILES[$mediaName]['errir'][$index] : 0; } else { - $mediaName = @$_FILES[$mediaName]; + $mediaName = @$_FILES[$mediaName]; $this->mediaName = $mediaName['name']; $this->mediaName = $mediaName['name']; $this->mediaType = $mediaName['type']; @@ -353,6 +353,7 @@ public function upload($chmod = 0644) if (!$this->copyFile($chmod)) { $this->setErrors('Failed uploading file: ' . $this->mediaName); } + return !(count($this->errors) > 0); } @@ -379,7 +380,7 @@ public function copyFile($chmod) $this->savedFileName = preg_replace('!\s+!', '_', $this->savedFileName); $this->savedDestination = $this->uploadDir . $this->savedFileName; if (is_file($this->savedDestination) && !!is_dir($this->savedDestination)) { - $this->setErrors('File ' . $this->mediaName . ' already exists on the server. Please rename this file and try again.
'); + $this->setErrors('File ' . $this->mediaName . ' already exists on the server. Please rename this file and try again.
'); return false; } @@ -401,6 +402,7 @@ public function checkMaxFileSize() if ($this->noAdminSizeCheck) { return true; } + return !($this->mediaSize > $this->maxFileSize); } @@ -416,6 +418,7 @@ public function checkMaxWidth($dimension) if (!isset($this->maxWidth)) { return true; } + return !($dimension > $this->maxWidth); } @@ -431,6 +434,7 @@ public function checkMaxHeight($dimension) if (!isset($this->maxHeight)) { return true; } + return !($dimension > $this->maxWidth); } @@ -475,7 +479,7 @@ public function &getErrors($ashtml = true) if (count($this->errors) > 0) { $ret = '

Errors Returned While Uploading

'; foreach ($this->errors as $error) { - $ret .= $error . '
'; + $ret .= $error . '
'; } } diff --git a/class/utilities.php b/class/utilities.php index 62446f6b..43d395cb 100644 --- a/class/utilities.php +++ b/class/utilities.php @@ -11,12 +11,11 @@ /** * PublisherUtilities Class * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @copyright XOOPS Project (http://xoops.org) * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author XOOPS Development Team * @package Publisher * @since 1.03 - * @version $Id: breadcrumb.php 12277 2014-01-26 01:21:57Z beckmi $ * */ @@ -57,16 +56,16 @@ public static function createFolder($folder) public static function copyFile($file, $folder) { return copy($file, $folder); -// try { -// if (!is_dir($folder)) { -// throw new \RuntimeException(sprintf('Unable to copy file as: %s ', $folder)); -// } else { -// return copy($file, $folder); -// } -// } catch (Exception $e) { -// echo 'Caught exception: ', $e->getMessage(), "\n", "
"; -// } -// return false; + // try { + // if (!is_dir($folder)) { + // throw new \RuntimeException(sprintf('Unable to copy file as: %s ', $folder)); + // } else { + // return copy($file, $folder); + // } + // } catch (Exception $e) { + // echo 'Caught exception: ', $e->getMessage(), "\n", "
"; + // } + // return false; } /** @@ -229,7 +228,7 @@ public static function editCategory($showmenu = false, $categoryId = 0, $nbSubCa } if ($categoryId != 0) { - echo "
\n"; + echo "
\n"; publisherOpenCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO); } else { publisherOpenCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO); @@ -280,7 +279,7 @@ public static function editCategory($showmenu = false, $categoryId = 0, $nbSubCa echo ''; } echo "\n"; - echo "
\n"; + echo "
\n"; publisherCloseCollapsableBar('subcatstable', 'subcatsicon'); publisherOpenCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC); @@ -319,7 +318,7 @@ public static function editCategory($showmenu = false, $categoryId = 0, $nbSubCa echo ''; } echo "\n"; - echo "
\n"; + echo "
\n"; $parentid = XoopsRequest::getInt('parentid', 0, 'GET'); $pagenavExtraArgs = "op=mod&categoryid=$selCat&parentid=$parentid"; xoops_load('XoopsPageNav'); diff --git a/comment_delete.php b/comment_delete.php index e9174a8a..f5de2cd0 100644 --- a/comment_delete.php +++ b/comment_delete.php @@ -16,7 +16,6 @@ * @subpackage Comments * @since 1.0 * @author trabis - * @version $Id: comment_delete.php 10374 2012-12-12 23:39:48Z trabis $ */ include dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/comment_edit.php b/comment_edit.php index 730d068e..3624aeed 100644 --- a/comment_edit.php +++ b/comment_edit.php @@ -16,7 +16,6 @@ * @subpackage Comments * @since 1.0 * @author trabis - * @version $Id: comment_edit.php 10374 2012-12-12 23:39:48Z trabis $ */ include dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/comment_new.php b/comment_new.php index 5d9becfa..530fcb2a 100644 --- a/comment_new.php +++ b/comment_new.php @@ -16,7 +16,6 @@ * @subpackage Comments * @since 1.0 * @author trabis - * @version $Id: comment_new.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(dirname(__DIR__)) . '/mainfile.php'; @@ -25,10 +24,10 @@ $com_itemid = XoopsRequest::getInt('com_itemid', 0, 'GET'); if ($com_itemid > 0) { $itemObj = $publisher->getHandler('item')->get($com_itemid); - $com_replytext = _POSTEDBY . ' ' . $itemObj->getLinkedPosterName() . ' ' . _DATE . ' ' . $itemObj->dateSub() . '

' . $itemObj->summary(); + $com_replytext = _POSTEDBY . ' ' . $itemObj->getLinkedPosterName() . ' ' . _DATE . ' ' . $itemObj->dateSub() . '

' . $itemObj->summary(); $bodytext = $itemObj->body(); if ($bodytext != '') { - $com_replytext .= '

' . $bodytext . ''; + $com_replytext .= '

' . $bodytext . ''; } $com_replytitle = $itemObj->getTitle(); include_once $GLOBALS['xoops']->path('include/comment_new.php'); diff --git a/comment_post.php b/comment_post.php index 41123d34..fa678a16 100644 --- a/comment_post.php +++ b/comment_post.php @@ -16,7 +16,6 @@ * @subpackage Comments * @since 1.0 * @author trabis - * @version $Id: comment_post.php 10374 2012-12-12 23:39:48Z trabis $ */ include dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/comment_reply.php b/comment_reply.php index d6d1e7e1..4b202f54 100644 --- a/comment_reply.php +++ b/comment_reply.php @@ -16,7 +16,6 @@ * @subpackage Comments * @since 1.0 * @author trabis - * @version $Id: comment_reply.php 10374 2012-12-12 23:39:48Z trabis $ */ include dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/docs/changelog.txt b/docs/changelog.txt index b1197b8b..6e71bedd 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,3 +1,16 @@ +
1.03 Beta 3 (NOT RELEASED)
+- removed @version (mamba) +- standardization on addNavigation(basename(__FILE__) (mamba) +- replaced '
' with '
' (mamba) +- replaced fputs with fwrite (mamba) +- code cosmetics (mamba) +- temp fix in /item.php (mamba) +- replaced self:: with $this-> in /class/item.php (mamba) +- removed references to objects (mamba) +- standardized getInstance (mamba) +- performance: (substr($color, 0, 1) !== '#') to (0 !== strpos($color, '#')) (mamba) +- renamed logo.png to logo_module.png (mamba) +
1.03 Beta 2 (2016-03-20)
- fixed: bugs on submit (mamba) - replaced XoopsFormTag with TagFormTag (mamba) diff --git a/extra/seo/seo.txt b/extra/seo/seo.txt index db2773dc..f392ecfb 100644 --- a/extra/seo/seo.txt +++ b/extra/seo/seo.txt @@ -1,5 +1,5 @@ /* - * $Id: seo.txt,v 1.1 2007/08/25 14:37:47 marcan Exp $ + * * Module: Publisher * Author: Sudhaker Raj * Licence: GNU @@ -17,7 +17,7 @@ If you are using path-info method, SEO-friendly URL (non-working example) If you are using htaccess method, SEO-friendly URL (non-working example) http://www.xuups.com/publisher.item.62/holiday-time.html -It is found that latter is more liked by search engines. It can significantly boost search engine traffic on your site. +It is found that latter is more liked by search engines. It can significantly boost search engine traffic on your site. Just try it!!! @@ -28,6 +28,6 @@ Core SEO functionality for this module can be enable in module preferences. You if you choose htaccess then you must copy (or merge) extra/seo/sample.htaccess to /.htaccess (for rewrite). If your web server does not support rewrite then path-info should be used. -If you are using htaccess and want some different name, like 'articles' for publisher, change module name in preferences and make similar modification in /.htaccess +If you are using htaccess and want some different name, like 'articles' for publisher, change module name in preferences and make similar modification in /.htaccess http://www.xuups.com/articles.item.62/holiday-time.html diff --git a/file.php b/file.php index 21d0a80b..1764780a 100644 --- a/file.php +++ b/file.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: file.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -84,7 +83,7 @@ // TODO : display the available mimetypes to the user $errors = array(); -// if ($publisher->getConfig('perm_upload') && is_uploaded_file(XoopsRequest::getArray('item_upload_file', array(), 'FILES')['tmp_name'])) { + // if ($publisher->getConfig('perm_upload') && is_uploaded_file(XoopsRequest::getArray('item_upload_file', array(), 'FILES')['tmp_name'])) { $temp = XoopsRequest::getArray('item_upload_file', array(), 'FILES'); if ($publisher->getConfig('perm_upload') && is_uploaded_file($temp['tmp_name'])) { if ($fileObj->checkUpload('item_upload_file', $allowed_mimetypes, $errors)) { @@ -123,7 +122,8 @@ // no confirm: show deletion condition include_once $GLOBALS['xoops']->path('header.php'); - xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', _AM_PUBLISHER_DELETETHISFILE . '
' . $fileObj->name() . '

', _AM_PUBLISHER_DELETE); + xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', + _AM_PUBLISHER_DELETETHISFILE . '
' . $fileObj->name() . '

', _AM_PUBLISHER_DELETE); include_once $GLOBALS['xoops']->path('footer.php'); } exit(); diff --git a/footer.php b/footer.php index dbc7240a..f5c62c45 100644 --- a/footer.php +++ b/footer.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: footer.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -28,7 +27,12 @@ //$xoTheme->addScript(PUBLISHER_URL . '/assets/js/jquery.popeye-2.0.4.js'); //$xoTheme->addScript(PUBLISHER_URL . '/assets/js/publisher.js'); -$xoopsTpl->assign('xoops_module_header', '' . @$xoopsTpl->get_template_vars('xoops_module_header')); +$xoopsTpl->assign('xoops_module_header', '' . + @$xoopsTpl->get_template_vars('xoops_module_header')); $xoopsTpl->assign('publisher_adminpage', "" . _MD_PUBLISHER_ADMIN_PAGE . ''); $xoopsTpl->assign('isAdmin', $publisherIsAdmin); diff --git a/header.php b/header.php index 877a1121..7c69b82d 100644 --- a/header.php +++ b/header.php @@ -16,7 +16,6 @@ * @subpackage Action * @since 1.0 * @author trabis - * @version $Id: header.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/include/ajax_upload.php b/include/ajax_upload.php index 9deadeab..529a4f21 100644 --- a/include/ajax_upload.php +++ b/include/ajax_upload.php @@ -1,9 +1,9 @@ // +// Copyright (c) 2000-2016 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 // @@ -71,7 +71,7 @@ $uploader->setPrefix('img'); if ($uploader->fetchMedia('publisher_upload_file')) { if (!$uploader->upload()) { - $error = implode('
', $uploader->getErrors(false)); + $error = implode('
', $uploader->getErrors(false)); } else { $imageHandler = xoops_getHandler('image'); $image = $imageHandler->create(); @@ -96,7 +96,7 @@ } } } else { - $error = sprintf(_FAILFETCHIMG, 0) . '
' . implode('
', $uploader->getErrors(false)); + $error = sprintf(_FAILFETCHIMG, 0) . '
' . implode('
', $uploader->getErrors(false)); } } diff --git a/include/comment_functions.php b/include/comment_functions.php index 187ab54c..d51a24fc 100644 --- a/include/comment_functions.php +++ b/include/comment_functions.php @@ -16,7 +16,6 @@ * @subpackage Include * @since 1.0 * @author trabis - * @version $Id: comment_functions.php 10374 2012-12-12 23:39:48Z trabis $ * * @param $itemId * @param $totalNum diff --git a/include/common.php b/include/common.php index 06ba09c7..c21c67bf 100644 --- a/include/common.php +++ b/include/common.php @@ -17,7 +17,6 @@ * @subpackage Functions * @since 1.0 * @author trabis - * @version $Id: common.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); diff --git a/include/config.php b/include/config.php index 815f7f9f..31a226c8 100644 --- a/include/config.php +++ b/include/config.php @@ -11,26 +11,27 @@ /** * animal module for xoops * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @copyright XOOPS Project (http://xoops.org) * @license GPL 2.0 or later * @package Publisher * @subpackage Config * @since 1.03 * @author XOOPS Development Team - ( http://xoops.org ) - * @version $Id: const_entete.php 9860 2012-07-13 10:41:41Z beckmi $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); include_once __DIR__ . '/common.php'; -$moduleDirName = basename(dirname(__DIR__)); +$moduleDirName = basename(dirname(__DIR__)); $uploadFolders = array( PUBLISHER_UPLOAD_PATH, PUBLISHER_UPLOAD_PATH . '/content', PUBLISHER_UPLOAD_PATH . '/images', PUBLISHER_UPLOAD_PATH . '/images/category', - PUBLISHER_UPLOAD_PATH . '/images/thumbnails'); + PUBLISHER_UPLOAD_PATH . '/images/thumbnails' +); $copyFiles = array( PUBLISHER_UPLOAD_PATH . '/images/category', - PUBLISHER_UPLOAD_PATH . '/images/thumbnails'); + PUBLISHER_UPLOAD_PATH . '/images/thumbnails' +); diff --git a/include/functions.php b/include/functions.php index a59e85fb..0e458239 100644 --- a/include/functions.php +++ b/include/functions.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: functions.php 10661 2013-01-04 19:22:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -73,8 +72,8 @@ function publisherGetOrderBy($sort) /** * @credits Thanks to Mithandir * @param string $str - * @param int $start - * @param int $length + * @param int $start + * @param int $length * @param string $trimMarker * @return string */ @@ -125,7 +124,8 @@ function publisherHtml2text($document) "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i", - "'&#(\d+);'e"); // evaluate as php + "'&#(\d+);'e" + ); // evaluate as php $replace = array( '', @@ -141,7 +141,8 @@ function publisherHtml2text($document) chr(162), chr(163), chr(169), - "chr(\\1)"); + "chr(\\1)" + ); $text = preg_replace($search, $replace, $document); @@ -222,7 +223,7 @@ function publisherCopyr($source, $dest) /** * .* @credits Thanks to the NewBB2 Development Team * @param string $item - * @param bool $getStatus + * @param bool $getStatus * @return bool|int|string */ function &publisherGetPathStatus($item, $getStatus = false) @@ -288,7 +289,7 @@ function publisherMkdir($target) /** * @credits Thanks to the NewBB2 Development Team * @param string $target - * @param int $mode + * @param int $mode * @return bool */ function publisherChmod($target, $mode = 0777) @@ -322,7 +323,7 @@ function publisherGetUploadDir($hasPath = true, $item = false) /** * @param string $item - * @param bool $hasPath + * @param bool $hasPath * @return string */ function publisherGetImageDir($item = '', $hasPath = true) @@ -344,7 +345,7 @@ function publisherFormatErrors($errors = array()) { $ret = ''; foreach ($errors as $key => $value) { - $ret .= '
- ' . $value; + $ret .= '
- ' . $value; } return $ret; @@ -402,9 +403,9 @@ function publisherUserIsModerator($itemObj) /** * Saves permissions for the selected category * - * @param array $groups : group with granted permission + * @param array $groups : group with granted permission * @param integer $categoryId : categoryid on which we are setting permissions - * @param string $permName : name of the permission + * @param string $permName : name of the permission * @return boolean : TRUE if the no errors occured */ function publisherSaveCategoryPermissions($groups, $categoryId, $permName) @@ -433,7 +434,7 @@ function publisherSaveCategoryPermissions($groups, $categoryId, $permName) * @param string $iconname * @param string $tabletitle * @param string $tabledsc - * @param bool $open + * @param bool $open * @return void */ function publisherOpenCollapsableBar($tablename = '', $iconname = '', $tabletitle = '', $tabledsc = '', $open = true) @@ -482,7 +483,7 @@ function publisherCloseCollapsableBar($name, $icon) /** * @param string $name * @param string $value - * @param int $time + * @param int $time * @return void */ function publisherSetCookieVar($name, $value, $time = 0) @@ -549,9 +550,9 @@ function publisherGetCurrentPage() /** * @param null|PublisherCategory $categoryObj - * @param int $selectedid - * @param int $level - * @param string $ret + * @param int $selectedid + * @param int $level + * @param string $ret * @return string */ function publisherAddCategoryOption(PublisherCategory $categoryObj, $selectedid = 0, $level = 0, $ret = '') @@ -583,9 +584,9 @@ function publisherAddCategoryOption(PublisherCategory $categoryObj, $selectedid } /** - * @param int $selectedid - * @param int $parentcategory - * @param bool $allCatOption + * @param int $selectedid + * @param int $parentcategory + * @param bool $allCatOption * @param string $selectname * @return string */ @@ -618,8 +619,8 @@ function publisherCreateCategorySelect($selectedid = 0, $parentcategory = 0, $al } /** - * @param int $selectedid - * @param int $parentcategory + * @param int $selectedid + * @param int $parentcategory * @param bool $allCatOption * @return string */ @@ -645,14 +646,16 @@ function publisherCreateCategoryOptions($selectedid = 0, $parentcategory = 0, $a } /** - * @param array $errArray + * @param array $errArray * @param string $reseturl * @return void */ function publisherRenderErrors(&$errArray, $reseturl = '') { if (is_array($errArray) && count($errArray) > 0) { - echo '
'; + echo '
'; echo '

' . _AM_PUBLISHER_MSG_SUBMISSION_ERR; @@ -671,7 +674,7 @@ function publisherRenderErrors(&$errArray, $reseturl = '') echo '
  • ' . htmlspecialchars($error) . '
  • '; } } - echo '


    '; + echo '

    '; } } @@ -679,8 +682,8 @@ function publisherRenderErrors(&$errArray, $reseturl = '') * Generate publisher URL * * @param string $page - * @param array $vars - * @param bool $encodeAmp + * @param array $vars + * @param bool $encodeAmp * @return string * * @credit : xHelp module, developped by 3Dev @@ -720,8 +723,8 @@ function publisherTellAFriend($subject = '') } /** - * @param bool $another - * @param bool $withRedirect + * @param bool $another + * @param bool $withRedirect * @param $itemObj * @return bool|string */ @@ -759,7 +762,7 @@ function publisherUploadFile($another = false, $withRedirect = true, &$itemObj) $errors = array(); if ($publisher->getConfig('perm_upload') && is_uploaded_file($_FILES['item_upload_file']['tmp_name'])) { if (!$ret = $fileObj->checkUpload('item_upload_file', $allowedMimetypes, $errors)) { - $errorstxt = implode('
    ', $errors); + $errorstxt = implode('
    ', $errors); $message = sprintf(_CO_PUBLISHER_MESSAGE_FILE_ERROR, $errorstxt); if ($withRedirect) { @@ -930,7 +933,7 @@ function publisherRatingBar($itemId) $staticRater[] .= '
    '; $staticRater[] .= '
    ' . _MD_PUBLISHER_VOTE_RATING . ' ' . $rating2 . '/' . $units . '
    '; $staticRater[] .= '
    '; - $staticRater[] .= '
    ' . _MD_PUBLISHER_VOTE_RATING . ': ' . $rating1 . '/' . $units . ' (' . $count . ' ' . $tense . ')
    ' . _MD_PUBLISHER_VOTE_DISABLE . '
    '; + $staticRater[] .= '
    ' . _MD_PUBLISHER_VOTE_RATING . ': ' . $rating1 . '/' . $units . ' (' . $count . ' ' . $tense . ')
    ' . _MD_PUBLISHER_VOTE_DISABLE . '
    '; $staticRater[] .= '
    '; $staticRater[] .= '
    ' . "\n\n"; @@ -995,7 +998,7 @@ function publisherGetEditors($allowedEditors = null) /** * @param string $string - * @param int $length + * @param int $length * @return int */ function publisherStringToInt($string = '', $length = 5) @@ -1005,6 +1008,7 @@ function publisherStringToInt($string = '', $length = 5) for ($i = 0; $i < $length; ++$i) { $final .= (int)$string[$i]; } + return (int)$final; } diff --git a/include/media.textsanitizer.php b/include/media.textsanitizer.php index 9f3ffb63..dc5741ad 100644 --- a/include/media.textsanitizer.php +++ b/include/media.textsanitizer.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author Taiwen Jiang (phppp or D.J.) - * @version $Id: media.textsanitizer.php 10374 2012-12-12 23:39:48Z trabis $ */ define('MYTEXTSANITIZER_EXTENDED_MEDIA', 1); @@ -37,13 +36,12 @@ public function __construct() /** * @return MyTextSanitizerExtension */ - public static function &getInstance() + public static function getInstance() { static $instance; if (!isset($instance)) { - $instance = new MyTextSanitizerExtension(); + $instance = new static(); } - return $instance; } @@ -166,7 +164,7 @@ public function rtsp(&$patterns, &$replacements) $rp .= ""; $rp .= " "; $rp .= ''; - $rp .= "
    "; + $rp .= "
    "; $rp .= ""; $rp .= ""; $rp .= ""; diff --git a/include/notification.inc.php b/include/notification.inc.php index 1107f3bb..1c781059 100644 --- a/include/notification.inc.php +++ b/include/notification.inc.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: notification.inc.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -43,7 +42,7 @@ function publisher_notify_iteminfo($category, $itemId) // Assume we have a valid category id $sql = 'SELECT name, short_url FROM ' . $GLOBALS['xoopsDB']->prefix('publisher_categories') . ' WHERE categoryid = ' . $itemId; $result = $GLOBALS['xoopsDB']->query($sql); // TODO: error check - $resultArray = $GLOBALS['xoopsDB']->fetchArray($result); + $resultArray = $GLOBALS['xoopsDB']->fetchArray($result); $item['name'] = $resultArray['name']; $item['url'] = PublisherSeo::generateUrl('category', $itemId, $resultArray['short_url']); @@ -54,7 +53,7 @@ function publisher_notify_iteminfo($category, $itemId) // Assume we have a valid story id $sql = 'SELECT title, short_url FROM ' . $GLOBALS['xoopsDB']->prefix('publisher_items') . ' WHERE itemid = ' . $itemId; $result = $GLOBALS['xoopsDB']->query($sql); // TODO: error check - $resultArray = $GLOBALS['xoopsDB']->fetchArray($result); + $resultArray = $GLOBALS['xoopsDB']->fetchArray($result); $item['name'] = $resultArray['title']; $item['url'] = PublisherSeo::generateUrl('item', $itemId, $resultArray['short_url']); diff --git a/include/oninstall.php b/include/oninstall.php index 26a709d7..cc91dd9f 100644 --- a/include/oninstall.php +++ b/include/oninstall.php @@ -10,10 +10,9 @@ */ /** - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @copyright XOOPS Project (http://xoops.org) * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author luciorota - * @version $Id: oninstall.php 11345 2013-04-03 22:35:51Z luciorota $ * * @param $xoopsModule * @@ -42,8 +41,8 @@ function xoops_module_install_publisher(XoopsModule $xoopsModule) xoops_loadLanguage('admin', $xoopsModule->getVar('dirname')); xoops_loadLanguage('modinfo', $xoopsModule->getVar('dirname')); - $moduleDirName = $xoopsModule->getVar('dirname'); - include_once $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/config.php'); + $moduleDirName = $xoopsModule->getVar('dirname'); + include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php'); foreach (array_keys($uploadFolders) as $i) { PublisherUtilities::createFolder($uploadFolders[$i]); @@ -51,7 +50,7 @@ function xoops_module_install_publisher(XoopsModule $xoopsModule) $file = PUBLISHER_ROOT_PATH . '/assets/images/blank.png'; foreach (array_keys($copyFiles) as $i) { - $dest = $copyFiles[$i] . '/blank.png'; + $dest = $copyFiles[$i] . '/blank.png'; PublisherUtilities::copyFile($file, $dest); } diff --git a/include/onupdate.php b/include/onupdate.php index 577180ab..27ac29fd 100644 --- a/include/onupdate.php +++ b/include/onupdate.php @@ -10,10 +10,9 @@ */ /** - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @copyright XOOPS Project (http://xoops.org) * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @author trabis - * @version $Id: onupdate.php 10374 2012-12-12 23:39:48Z trabis $ * * @param $module * @param null $oldversion @@ -53,7 +52,8 @@ function xoops_module_update_publisher(XoopsModule $module, $oldversion = null) '/class/request.php', '/class/registry.php', '/include/constants.php', - '/ajaxrating.txt'); + '/ajaxrating.txt' + ); foreach (array_keys($oldFiles) as $i) { unlink($GLOBALS['xoops']->path('modules/' . $module->getVar('dirname', 'n') . $oldFiles[$i])); @@ -87,8 +87,8 @@ function xoops_module_update_publisher(XoopsModule $module, $oldversion = null) // $folderHandler->delete($cssFile); //create upload directories, if needed - $moduleDirName = $module->getVar('dirname'); - include $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/config.php'); + $moduleDirName = $module->getVar('dirname'); + include $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php'); foreach (array_keys($uploadFolders) as $i) { PublisherUtilities::createFolder($uploadFolders[$i]); @@ -96,7 +96,7 @@ function xoops_module_update_publisher(XoopsModule $module, $oldversion = null) //copy blank.png files, if needed $file = PUBLISHER_ROOT_PATH . '/assets/images/blank.png'; foreach (array_keys($copyFiles) as $i) { - $dest = $copyFiles[$i] . '/blank.png'; + $dest = $copyFiles[$i] . '/blank.png'; PublisherUtilities::copyFile($file, $dest); } } diff --git a/include/plugin.tag.php b/include/plugin.tag.php index 3cccb58c..e1dbd3f2 100644 --- a/include/plugin.tag.php +++ b/include/plugin.tag.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: plugin.tag.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -50,7 +49,8 @@ function publisher_tag_iteminfo(&$items) 'link' => "item.php?itemid={$item_id}", 'time' => $item_obj->getVar('datesub'), 'tags' => tag_parse_tag($item_obj->getVar('item_tag', 'n')), // optional - 'content' => ''); + 'content' => '' + ); } } unset($items_obj); diff --git a/include/search.inc.php b/include/search.inc.php index bdaae1c2..cae4d6c2 100644 --- a/include/search.inc.php +++ b/include/search.inc.php @@ -15,7 +15,6 @@ * @subpackage Include * @since 1.0 * @author trabis - * @version $Id: search.inc.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -41,7 +40,7 @@ function publisher_search($queryarray, $andor, $limit, $offset, $userid, $catego if ($queryarray == '' || count($queryarray) == 0) { $hightlightKey = ''; } else { - $keywords = implode('+', $queryarray); + $keywords = implode('+', $queryarray); $hightlightKey = '&keywords=' . $keywords; } $itemsObjs = $publisher->getHandler('item')->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid, $categories, $sortby, $searchin, $extra); @@ -60,10 +59,10 @@ function publisher_search($queryarray, $andor, $limit, $offset, $userid, $catego $item['time'] = $obj->getVar('datesub'); //must go has unix timestamp $item['uid'] = $obj->uid(); //"Fulltext search/highlight - $text = $obj->getBody(); + $text = $obj->getBody(); $sanitizedText = ''; - $textLower = strtolower($text); - $queryarray = is_array($queryarray) ? $queryarray : array($queryarray); + $textLower = strtolower($text); + $queryarray = is_array($queryarray) ? $queryarray : array($queryarray); if ($queryarray[0] != '' && count($queryarray) > 0) { foreach ($queryarray as $query) { diff --git a/include/seo.inc.php b/include/seo.inc.php index 67290dea..dee45e2e 100644 --- a/include/seo.inc.php +++ b/include/seo.inc.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author Sudhaker Raj - * @version $Id: seo.inc.php 10374 2012-12-12 23:39:48Z trabis $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -46,7 +45,8 @@ $seoMap = array( 'category' => 'category.php', 'item' => 'item.php', - 'print' => 'print.php'); + 'print' => 'print.php' +); if (!empty($seoOp) && isset($seoMap[$seoOp])) { // module specific dispatching logic, other module must implement as diff --git a/index.php b/index.php index cec96be1..5de9f74f 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: index.php 10727 2013-01-09 22:03:19Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -181,7 +180,8 @@ //todo: make config for summary size if ($itemsCount > 0) { foreach ($itemsObj as $itemObj) { - $xoopsTpl->append('items', $itemObj->toArraySimple($publisher->getConfig('idxcat_items_display_type'), $publisher->getConfig('item_title_size'), 300, true)); //if no summary truncate body to 300 + $xoopsTpl->append('items', + $itemObj->toArraySimple($publisher->getConfig('idxcat_items_display_type'), $publisher->getConfig('item_title_size'), 300, true)); //if no summary truncate body to 300 } $xoopsTpl->assign('show_subtitle', $publisher->getConfig('index_disp_subtitle')); unset($allcategories, $itemObj); diff --git a/item.php b/item.php index 1cd27c94..1ed901be 100644 --- a/item.php +++ b/item.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: item.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -63,7 +62,10 @@ } // Update the read counter of the selected item -if (!$GLOBALS['xoopsUser'] || ($GLOBALS['xoopsUser'] && !$GLOBALS['xoopsUser']->isAdmin($publisher->getModule()->mid())) || ($GLOBALS['xoopsUser']->isAdmin($publisher->getModule()->mid()) && $publisher->getConfig('item_admin_hits') == 1)) { +if (!$GLOBALS['xoopsUser'] || + ($GLOBALS['xoopsUser'] && !$GLOBALS['xoopsUser']->isAdmin($publisher->getModule()->mid())) || + ($GLOBALS['xoopsUser']->isAdmin($publisher->getModule()->mid()) && $publisher->getConfig('item_admin_hits') == 1) +) { $itemObj->updateCounter(); } @@ -134,7 +136,7 @@ if ($publisher->getConfig('item_other_items_type') === 'all') { $itemsObj = $publisher->getHandler('item')->getAllPublished(0, 0, $categoryObj->categoryid(), $sort, $order, '', true, true); $items = array(); - foreach ($itemsObj as $theItemObj) { + foreach ($itemsObj[1] as $theItemObj) { $theItem = array(); $theItem['titlelink'] = $theItemObj->getItemLink(); $theItem['datesub'] = $theItemObj->getDatesub(); @@ -159,7 +161,7 @@ $itemPageId = 0; } include_once $GLOBALS['xoops']->path('class/pagenav.php'); - // $pagenav = new XoopsPageNav($itemObj->pagescount(), 1, $itemPageId, 'page', 'itemid=' . $itemObj->itemId()); + // $pagenav = new XoopsPageNav($itemObj->pagescount(), 1, $itemPageId, 'page', 'itemid=' . $itemObj->itemId()); $pagenav = new XoopsPageNav($itemObj->pagescount(), 1, $itemPageId, 'page', 'itemid=' . $itemObj->itemid()); //SMEDrieben changed ->itemId to ->itemid @@ -210,7 +212,12 @@ unset($file, $embededFiles, $filesObj, $fileObj); // Language constants -$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_CO_PUBLISHER_INTITEM, $GLOBALS['xoopsConfig']['sitename']) . '&body=' . sprintf(_CO_PUBLISHER_INTITEMFOUND, $GLOBALS['xoopsConfig']['sitename']) . ': ' . $itemObj->getItemUrl()); +$xoopsTpl->assign('mail_link', 'mailto:?subject=' . + sprintf(_CO_PUBLISHER_INTITEM, $GLOBALS['xoopsConfig']['sitename']) . + '&body=' . + sprintf(_CO_PUBLISHER_INTITEMFOUND, $GLOBALS['xoopsConfig']['sitename']) . + ': ' . + $itemObj->getItemUrl()); $xoopsTpl->assign('itemid', $itemObj->itemId()); $xoopsTpl->assign('sectionname', $publisher->getModule()->getVar('name')); $xoopsTpl->assign('module_dirname', $publisher->getModule()->getVar('dirname')); @@ -241,7 +248,8 @@ $xoopsTpl->assign(array( 'editcomment_link' => PUBLISHER_URL . '/comment_edit.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . $link_extra, 'deletecomment_link' => PUBLISHER_URL . '/comment_delete.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . $link_extra, - 'replycomment_link' => PUBLISHER_URL . '/comment_reply.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . $link_extra)); + 'replycomment_link' => PUBLISHER_URL . '/comment_reply.php?com_itemid=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . $link_extra + )); $xoopsTpl->_tpl_vars['commentsnav'] = str_replace("self.location.href='", "self.location.href='" . PUBLISHER_URL . '/', $xoopsTpl->_tpl_vars['commentsnav']); } diff --git a/language/english/admin.php b/language/english/admin.php index 514f6998..695b9cde 100644 --- a/language/english/admin.php +++ b/language/english/admin.php @@ -1,6 +1,6 @@ * Licence: GNU @@ -134,7 +134,7 @@ //define('_AM_PUBLISHER_IMAGE_ITEM_DSC','Image representing the article'); define('_AM_PUBLISHER_IMAGE_UPLOAD', 'Image upload'); define('_AM_PUBLISHER_IMAGE_UPLOAD_DSC', 'Select an image on your computer. This image will be uploaded to the site and set as the category image.'); -//define('_AM_PUBLISHER_IMAGE_UPLOAD_ITEM_DSC','Select an image on your computer.
    This image will be uploaded to the site
    and set as the article image.'); +//define('_AM_PUBLISHER_IMAGE_UPLOAD_ITEM_DSC','Select an image on your computer.
    This image will be uploaded to the site
    and set as the article image.'); define('_AM_PUBLISHER_IMPORT', 'Import'); define('_AM_PUBLISHER_IMPORTED_COMMENT', "Comment '%s' imported."); define('_AM_PUBLISHER_IMPORTED_COMMENT_ERROR', "Error while importing comment '%s'"); @@ -177,7 +177,7 @@ define('_AM_PUBLISHER_ITEM_DUPLICATING', 'Duplicating an article'); define('_AM_PUBLISHER_ITEM_DUPLICATING_DSC', 'Edit the present form in order to create a new article based on the original article.'); define('_AM_PUBLISHER_ITEM_EDIT', 'Edit this article'); -define('_AM_PUBLISHER_ITEM_RECEIVED_NEED_APPROVAL', 'Your article has been sent and will be published upon approval by a moderator.
    Thank you for your contribution!'); +define('_AM_PUBLISHER_ITEM_RECEIVED_NEED_APPROVAL', 'Your article has been sent and will be published upon approval by a moderator.
    Thank you for your contribution!'); define('_AM_PUBLISHER_ITEM_REJECTED', 'This article has been set as rejected.'); define('_AM_PUBLISHER_ITEMCAT', 'Category'); define('_AM_PUBLISHER_ITEMCATEGORYNAME', 'Category'); @@ -242,8 +242,8 @@ define('_AM_PUBLISHER_PARENT_CATEGORY_EXP', "Parent categorySelect a parent to make this a sub-category."); define('_AM_PUBLISHER_PERMERROR', 'ERROR: cannot access file directory. Please CHMOD the uploads/publisher/content directory with value 755 (or 777 depending on your environment)'); define('_AM_PUBLISHER_PERMISSIONS', 'Permissions'); -define('_AM_PUBLISHER_PERMISSIONS_APPLY_ON_ITEMS', "Apply read permissions on articlesApply the above Read Permissions on all
    articles within that category, overriding their
    current permissions.
    Please note that this is a one-time action only, and not a property
    "); -define('_AM_PUBLISHER_PERMISSIONS_CAT_READ', "Read permissionsGroups that will have permissions to see
    this Category, as well as any articles
    inside that category.
    "); +define('_AM_PUBLISHER_PERMISSIONS_APPLY_ON_ITEMS', "Apply read permissions on articlesApply the above Read Permissions on all
    articles within that category, overriding their
    current permissions.
    Please note that this is a one-time action only, and not a property
    "); +define('_AM_PUBLISHER_PERMISSIONS_CAT_READ', "Read permissionsGroups that will have permissions to see
    this Category, as well as any articles
    inside that category.
    "); define('_AM_PUBLISHER_PERMISSIONS_CAT_SUBMIT', 'Articles submission permissions'); define('_AM_PUBLISHER_PERMISSIONS_CAT_SUBMIT_DSC', "Groups that will be allowed to submit articles within this category. Preference '[PERMISSIONS] User submissions' must be enabled."); define('_AM_PUBLISHER_PERMISSIONSVIEWMAN', 'Permissions to view categories'); @@ -301,7 +301,7 @@ define('_AM_PUBLISHER_YES', 'Yes'); //define('_AM_PUBLISHER_TOOLS','Tools'); //define('_AM_PUBLISHER_CONFIGURE_READ_PERMISSIONS','Configure read permissions'); -//define('_AM_PUBLISHER_CONFIGURE_READ_PERMISSIONS_EXP','This tool allows you to quickly configure read permissions for ALL categories and ALL articles at once. ALl permissions will first be deleted and then replaced by the options your will have selected.

    Please use this tool with care!'); +//define('_AM_PUBLISHER_CONFIGURE_READ_PERMISSIONS_EXP','This tool allows you to quickly configure read permissions for ALL categories and ALL articles at once. ALl permissions will first be deleted and then replaced by the options your will have selected.

    Please use this tool with care!'); //define('_AM_PUBLISHER_FULLACCESS','Categories and articles read permissions'); //define('_AM_PUBLISHER_PERMISSIONS_UPDATED','Permissions updated.'); define('_AM_PUBLISHER_ITEM_TAG', 'Tags'); @@ -318,15 +318,15 @@ define('_AM_PUBLISHER_CLONE_DSC', 'Cloning a module has never been this easy! Just type in the name you want for it and hit submit button!'); define('_AM_PUBLISHER_CLONE_TITLE', 'Clone %s'); define('_AM_PUBLISHER_CLONE_NAME', 'Choose a name for the new module'); -define('_AM_PUBLISHER_CLONE_NAME_DSC', 'Do not use special characters!
    Do not choose an existing module dirname or database table name!'); +define('_AM_PUBLISHER_CLONE_NAME_DSC', 'Do not use special characters!
    Do not choose an existing module dirname or database table name!'); define('_AM_PUBLISHER_CLONE_INVALIDNAME', 'ERROR: Invalid module name, please try another one!'); define('_AM_PUBLISHER_CLONE_EXISTS', 'ERROR: Module name already taken, please try another one!'); -define('_AM_PUBLISHER_CLONE_CONGRAT', 'Congratulations! %s was sucessfully created!
    You may want to make changes in language files.'); -define('_AM_PUBLISHER_CLONE_IMAGEFAIL', 'Attention, we failed creating the new module logo. Please consider modifying assets/images/module_logo.png manually!'); +define('_AM_PUBLISHER_CLONE_CONGRAT', 'Congratulations! %s was sucessfully created!
    You may want to make changes in language files.'); +define('_AM_PUBLISHER_CLONE_IMAGEFAIL', 'Attention, we failed creating the new module logo. Please consider modifying assets/images/logo_module.png manually!'); define('_AM_PUBLISHER_CLONE_FAIL', "Sorry, we failed in creating the new clone. Maybe you need to temporally set write permissions (CHMOD 777) to 'modules' folder and try again."); define('_AM_PUBLISHER_COMMENTS', 'Comments'); define('_AM_PUBLISHER_CATEGORY_MODERATOR', 'Moderator'); -define('_AM_PUBLISHER_CATEGORY_MODERATOR_DSC', "A moderator can access and submit in this category even if he does not have groups permissions.
    To moderate a sub category the user must have permissions to submit in the parent category.
    Set to 'anonymous' if you do not need a moderator."); +define('_AM_PUBLISHER_CATEGORY_MODERATOR_DSC', "A moderator can access and submit in this category even if he does not have groups permissions.
    To moderate a sub category the user must have permissions to submit in the parent category.
    Set to 'anonymous' if you do not need a moderator."); //03/05/2012 define('_AM_PUBLISHER_PERMISSIONS_CAT_MODERATOR', 'Moderation permissions'); define('_AM_PUBLISHER_PERMISSIONS_CAT_MODERATOR_DSC', "Groups that will be allowed to moderate articles within this category. Users on these groups will be able to edit/delete/clone articles. Don't forget to also set submit permissions on these groups!"); diff --git a/language/english/blocks.php b/language/english/blocks.php index f5125552..6714bf29 100644 --- a/language/english/blocks.php +++ b/language/english/blocks.php @@ -1,6 +1,6 @@ * Licence: GNU @@ -42,7 +42,7 @@ //--/bd define('_MB_PUBLISHER_FILES', 'files'); define('_MB_PUBLISHER_DIRECTDOWNLOAD', 'Direct link to download the file instead of a link to the article?'); -define('_MB_PUBLISHER_FROM', 'Select articles
    from '); +define('_MB_PUBLISHER_FROM', 'Select articles
    from '); define('_MB_PUBLISHER_UNTIL', '  to'); define('_MB_PUBLISHER_DATE_FORMAT', 'Date format must be mm/dd/yyy'); define('_MB_PUBLISHER_ARTICLES_FROM_TO', 'Articles published between %s and %s'); diff --git a/language/english/common.php b/language/english/common.php index 9c16591a..a77ac102 100644 --- a/language/english/common.php +++ b/language/english/common.php @@ -1,11 +1,11 @@ * Licence: GNU */ -define('_CO_PUBLISHER_MESSAGE_FILE_ERROR', 'Error: Unable to store uploaded file for the following reasons:
    %s'); +define('_CO_PUBLISHER_MESSAGE_FILE_ERROR', 'Error: Unable to store uploaded file for the following reasons:
    %s'); define('_CO_PUBLISHER_MESSAGE_WRONG_MIMETYPE', 'Error: file type is not allowed. Please re-submit.'); define('_CO_PUBLISHER_ALLOWCOMMENTS', 'Can article be commented?'); define('_CO_PUBLISHER_AUTHOR_ALIAS', 'Author alias'); @@ -32,7 +32,7 @@ define('_CO_PUBLISHER_UID_DSC', 'Select the name of the poster'); define('_CO_PUBLISHER_WEIGHT', 'Weight'); define('_CO_PUBLISHER_ITEM_UPLOAD_FILE', 'File upload'); -define('_CO_PUBLISHER_ITEM_UPLOAD_FILE_DSC', 'Select a file from your computer to attach it to this article. You will be able to add more files once the article has been created. Simply edit the article and scroll at the bottom of the page to see the Add file button.

    For example, you could add a Word document or an Excel document. You can even upload a Flash file and it will be directly embedded into your article! '); +define('_CO_PUBLISHER_ITEM_UPLOAD_FILE_DSC', 'Select a file from your computer to attach it to this article. You will be able to add more files once the article has been created. Simply edit the article and scroll at the bottom of the page to see the Add file button.

    For example, you could add a Word document or an Excel document. You can even upload a Flash file and it will be directly embedded into your article! '); //define('_CO_PUBLISHER_OPTIONS','Options'); define('_CO_PUBLISHER_DISPLAY_SUMMARY', 'Display summary on the item page ?'); define('_CO_PUBLISHER_DOHTML', 'Enable HTML tags'); @@ -57,7 +57,7 @@ define('_CO_PUBLISHER_IMAGE_ITEM', 'Article featured image'); define('_CO_PUBLISHER_IMAGE_ITEM_DSC', 'Image representing the article'); define('_CO_PUBLISHER_IMAGE_UPLOAD', 'Image upload'); -//define('_CO_PUBLISHER_IMAGE_UPLOAD_ITEM_DSC','Select an image on your computer.
    This image will be uploaded to the site
    and set as the article image.'); +//define('_CO_PUBLISHER_IMAGE_UPLOAD_ITEM_DSC','Select an image on your computer.
    This image will be uploaded to the site
    and set as the article image.'); define('_CO_PUBLISHER_SUBCATEGORIES_INFO', 'Subcategories within %s :'); define('_CO_PUBLISHER_SUMMARY', 'Block summary'); define('_CO_PUBLISHER_SUMMARY_DSC', 'This summary is used for blocks, index and category pages. It does not display inside article.'); diff --git a/language/english/main.php b/language/english/main.php index 97ebdc90..005f0506 100644 --- a/language/english/main.php +++ b/language/english/main.php @@ -1,6 +1,6 @@ * Licence: GNU @@ -32,7 +32,7 @@ define('_MD_PUBLISHER_INDEX_ITEMS_INFO', 'Here is a list of the Last published articles.'); define('_MD_PUBLISHER_ITEM', 'article'); define('_MD_PUBLISHER_ITEM_RECEIVED_AND_PUBLISHED', 'Your article has been sent and automatically published. Thank you for your contribution!'); -define('_MD_PUBLISHER_ITEM_RECEIVED_NEED_APPROVAL', 'Your article has been sent and will be published upon approval by a moderator.
    Thank you for your contribution!'); +define('_MD_PUBLISHER_ITEM_RECEIVED_NEED_APPROVAL', 'Your article has been sent and will be published upon approval by a moderator.
    Thank you for your contribution!'); define('_MD_PUBLISHER_ITEMMODIFIED', 'The article was successfully modified!'); define('_MD_PUBLISHER_ITEMS', 'Articles'); define('_MD_PUBLISHER_ITEMS_INFO', 'Here are the articles within this category.'); @@ -43,7 +43,7 @@ define('_MD_PUBLISHER_NEED_CATEGORY_ITEM', 'To create an article, you must have appropriate permission in at least one category.'); define('_MD_PUBLISHER_NEXT_ITEM', 'Next article'); define('_MD_PUBLISHER_NO', 'No'); -define('_MD_PUBLISHER_NO_CAT_EXISTS', 'Sorry, there’s no category //defined as yet.
    Please contact the site administrator and tell him about this.'); +define('_MD_PUBLISHER_NO_CAT_EXISTS', 'Sorry, there’s no category //defined as yet.
    Please contact the site administrator and tell him about this.'); define('_MD_PUBLISHER_NO_CAT_PERMISSIONS', "Sorry, you don't have sufficient permissions to access this area."); define('_MD_PUBLISHER_NO_TOP_PERMISSIONS', 'Sorry, there is no article to display.'); define('_MD_PUBLISHER_NOCATEGORYSELECTED', 'You did not select a valid category!'); diff --git a/language/english/modinfo.php b/language/english/modinfo.php index 59329729..d22f5129 100644 --- a/language/english/modinfo.php +++ b/language/english/modinfo.php @@ -39,9 +39,9 @@ define('_MI_PUBLISHER_COLLHEAD', 'Display the collapsible bar?'); define('_MI_PUBLISHER_COLLHEADDSC', 'If you set this option to “Yes”, the categories summary will be displayed in a collapsible bar as well as the articles. If you set this option to “No”, the collapsible bar will not be displayed.'); define('_MI_PUBLISHER_COMMENTS', 'Control comments at the article level?'); -define('_MI_PUBLISHER_COMMENTSDSC', 'if you set this option to “Yes”, you will see comments only on those items that have their comment checkbox marked.

    Select “No” to have comments managed at the global level (look below under the tag \'Comment rules\'.'); +define('_MI_PUBLISHER_COMMENTSDSC', 'if you set this option to “Yes”, you will see comments only on those items that have their comment checkbox marked.

    Select “No” to have comments managed at the global level (look below under the tag \'Comment rules\'.'); define('_MI_PUBLISHER_DATEFORMAT', 'Date format:'); -define('_MI_PUBLISHER_DATEFORMATDSC', "Select a display style. Example: 'd-M-Y H:i' translates to '30-Mar-2004 22:35'
    Refer to the PHP manual for more display options."); +define('_MI_PUBLISHER_DATEFORMATDSC', "Select a display style. Example: 'd-M-Y H:i' translates to '30-Mar-2004 22:35'
    Refer to the PHP manual for more display options."); define('_MI_PUBLISHER_DEMO_SITE', 'SmartFactory Demo Site'); define('_MI_PUBLISHER_DEVELOPER_CONTRIBUTOR', 'Contributor(s)'); define('_MI_PUBLISHER_DEVELOPER_CREDITS', 'Credits'); @@ -324,10 +324,10 @@ define('_MI_PUBLISHER_ORDERBY_HITS', 'Hits DESC'); // The name of this module -define('_MI_PUBLISHER_NAME','Publisher'); +define('_MI_PUBLISHER_NAME', 'Publisher'); define('_MI_PUBLISHER_DIRNAME', basename(dirname(dirname(__DIR__)))); -define('_MI_PUBLISHER_HELP_HEADER', __DIR__.'/help/helpheader.html'); -define('_MI_PUBLISHER_BACK_2_ADMIN','Back to Administration of '); +define('_MI_PUBLISHER_HELP_HEADER', __DIR__ . '/help/helpheader.html'); +define('_MI_PUBLISHER_BACK_2_ADMIN', 'Back to Administration of '); //help -define('_MI_PUBLISHER_HELP_OVERVIEW','Overview'); +define('_MI_PUBLISHER_HELP_OVERVIEW', 'Overview'); diff --git a/list.tag.php b/list.tag.php index 6bd6814a..399f8ec3 100644 --- a/list.tag.php +++ b/list.tag.php @@ -16,7 +16,6 @@ * @subpackage tag * @since 1.0 * @author trabis - * @version $Id: list.tag.php 10374 2012-12-12 23:39:48Z trabis $ */ // todo: Check this file diff --git a/makepdf.php b/makepdf.php index 029b18fa..27373690 100644 --- a/makepdf.php +++ b/makepdf.php @@ -20,7 +20,8 @@ //2.5.8 if (!is_file(XOOPS_ROOT_PATH . '/class/libraries/vendor/tecnickcom/tcpdf/tcpdf.php')) { - redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/viewtopic.php?topic_id=' . $itemid, 3, 'TCPF for XOOPS not installed in ./class/libraries/vendor/tecnickcom/tcpdf/'); + redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/viewtopic.php?topic_id=' . $itemid, 3, + 'TCPF for XOOPS not installed in ./class/libraries/vendor/tecnickcom/tcpdf/'); } // Creating the item object for the selected item @@ -47,11 +48,29 @@ $content = ''; if ($mainImage['image_path'] != '') { - $content .= '' . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '
    '; + $content .= '' . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '
    '; } -$content .= '' . $myts->undoHtmlSpecialChars($itemObj->getTitle()) . ''; -$content .= '
    ' . _CO_PUBLISHER_CATEGORY . ' : ' . $myts->undoHtmlSpecialChars($categoryObj->name()) . ''; -$content .= '
    ' . $sender_inform . '
    '; +$content .= '' . + $myts->undoHtmlSpecialChars($itemObj->getTitle()) . + ''; +$content .= '
    ' . + _CO_PUBLISHER_CATEGORY . + ' : ' . + $myts->undoHtmlSpecialChars($categoryObj->name()) . + ''; +$content .= '
    ' . $sender_inform . '
    '; $content .= $itemObj->plainMaintext(); // Configuration for TCPDF_for_XOOPS @@ -69,7 +88,6 @@ //2.5.8 require_once(XOOPS_ROOT_PATH . '/class/libraries/vendor/tecnickcom/tcpdf/tcpdf.php'); - $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, _CHARSET, false); $doc_title = publisherConvertCharset($myts->undoHtmlSpecialChars($itemObj->getTitle())); @@ -109,8 +127,8 @@ //$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); //2.5.8 -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); +$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); +$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf->setFooterData($tc = array(0, 64, 0), $lc = array(0, 64, 128)); diff --git a/notification_update.php b/notification_update.php index 9d5798f8..3f612729 100644 --- a/notification_update.php +++ b/notification_update.php @@ -16,7 +16,6 @@ * @subpackage Notification * @since 1.0 * @author trabis - * @version $Id: notification_update.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/pop.php b/pop.php index 55174729..2632afc7 100644 --- a/pop.php +++ b/pop.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: pop.php 10374 2012-12-12 23:39:48Z trabis $ */ $doNotStartPrint = true; diff --git a/print.php b/print.php index bdd83f7d..29e757fa 100644 --- a/print.php +++ b/print.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: print.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; diff --git a/rate.php b/rate.php index 1091847c..e334f43c 100644 --- a/rate.php +++ b/rate.php @@ -16,7 +16,6 @@ * @subpackage Action * @since 1.0 * @author trabis - * @version $Id: rate.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -79,4 +78,3 @@ redirect_header(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_THANKS); //exit(); - diff --git a/search.php b/search.php index d5884d6e..61eabdcb 100644 --- a/search.php +++ b/search.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author Taiwen Jiang - * @version $Id: search.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -170,7 +169,7 @@ $search_info = _SR_KEYWORDS . ': ' . $myts->htmlSpecialChars($term); if ($uname_required) { if ($search_info) { - $search_info .= '
    '; + $search_info .= '
    '; } $search_info .= _CO_PUBLISHER_UID . ': ' . $myts->htmlSpecialChars($search_username); } diff --git a/submit.php b/submit.php index 3fde37a7..c72c417e 100644 --- a/submit.php +++ b/submit.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: submit.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; @@ -108,7 +107,8 @@ 'dolinebreak', 'notify', 'subtitle', - 'author_alias'); + 'author_alias' +); foreach ($elements as $element) { if (XoopsRequest::getString('element', '', 'POST') && !in_array(constant('PublisherConstants::PUBLISHER_' . strtoupper($element)), $formView)) { redirect_header('index.php', 1, _MD_PUBLISHER_SUBMIT_ERROR); @@ -133,7 +133,8 @@ // exit(); } else { include_once $GLOBALS['xoops']->path('header.php'); - xoops_confirm(array('op' => 'del', 'itemid' => $itemObj->itemid(), 'confirm' => 1, 'name' => $itemObj->getTitle()), 'submit.php', _AM_PUBLISHER_DELETETHISITEM . "
    '" . $itemObj->getTitle() . "'.

    ", _AM_PUBLISHER_DELETE); + xoops_confirm(array('op' => 'del', 'itemid' => $itemObj->itemid(), 'confirm' => 1, 'name' => $itemObj->getTitle()), 'submit.php', + _AM_PUBLISHER_DELETETHISITEM . "
    '" . $itemObj->getTitle() . "'.

    ", _AM_PUBLISHER_DELETE); include_once $GLOBALS['xoops']->path('footer.php'); } exit(); diff --git a/templates/publisher_footer.tpl b/templates/publisher_footer.tpl index c093a170..dc82cc4d 100644 --- a/templates/publisher_footer.tpl +++ b/templates/publisher_footer.tpl @@ -7,7 +7,7 @@
    <{$commentsnav}> <{$lang_notice}>
    - <{if $comment_mode == "flat"}> <{include file="db:system_comments_flat.html"}> <{elseif $comment_mode == "thread"}> <{include file="db:system_comments_thread.html"}> <{elseif $comment_mode == "nest"}> <{include file="db:system_comments_nest.html"}> <{/if}> + <{if $comment_mode == "flat"}> <{include file="db:system_comments_flat.tpl"}> <{elseif $comment_mode == "thread"}> <{include file="db:system_comments_thread.tpl"}> <{elseif $comment_mode == "nest"}> <{include file="db:system_comments_nest.tpl"}> <{/if}>
    @@ -17,4 +17,4 @@ <{if $rssfeed_link != ""}>
    <{$rssfeed_link}>
    <{/if}> -<{include file='db:system_notification_select.html'}> +<{include file='db:system_notification_select.tpl'}> diff --git a/thumb.php b/thumb.php index 51803088..f7621657 100644 --- a/thumb.php +++ b/thumb.php @@ -251,25 +251,25 @@ */ class Timthumb { - protected $src = ''; - protected $is404 = false; - protected $docRoot = ''; - protected $lastURLError = false; - protected $localImage = ''; - protected $localImageMTime = 0.0; - protected $url = false; - protected $myHost = ''; - protected $isURL = false; - protected $cachefile = ''; - protected $errors = array(); - protected $toDeletes = array(); - protected $cacheDirectory = ''; - protected $startTime = 0.0; - protected $lastBenchTime = 0.0; - protected $cropTop = false; - protected $salt = ''; - protected $fileCacheVersion = 1; //Generally if timthumb.php is modifed (upgraded) then the salt changes and all cache files are recreated. This is a backup mechanism to force regen. - protected $filePrependSecurityBlock = "' . htmlentities($err) . ''; } $html .= ''; - echo '

    A TimThumb error has occured

    The following error(s) occured:
    ' . $html . '
    '; - echo '
    Query String : ' . htmlentities($_SERVER['QUERY_STRING'], ENT_QUOTES); - echo '
    TimThumb version : ' . VERSION . ''; + echo '

    A TimThumb error has occured

    The following error(s) occured:
    ' . $html . '
    '; + echo '
    Query String : ' . htmlentities($_SERVER['QUERY_STRING'], ENT_QUOTES); + echo '
    TimThumb version : ' . VERSION . ''; } /** @@ -1532,7 +1532,7 @@ protected function getURL($url, $tempfile) } else { $img = @file_get_contents($url); if ($img === false) { - $err = error_get_last(); + $err = error_get_last(); $this->lastURLError = $err; if (is_array($err) && $err['message']) { $this->lastURLError = $err['message']; diff --git a/view.tag.php b/view.tag.php index 3e88f245..6fc6b4c2 100644 --- a/view.tag.php +++ b/view.tag.php @@ -16,7 +16,6 @@ * @subpackage Action * @since 1.0 * @author trabis - * @version $Id: view.tag.php 10374 2012-12-12 23:39:48Z trabis $ */ //todo: check this file diff --git a/visit.php b/visit.php index 64e9631a..bd84562b 100644 --- a/visit.php +++ b/visit.php @@ -17,7 +17,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: visit.php 10374 2012-12-12 23:39:48Z trabis $ */ include_once __DIR__ . '/header.php'; diff --git a/xoops_version.php b/xoops_version.php index 1bf95141..cced772c 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -16,7 +16,6 @@ * @since 1.0 * @author trabis * @author The SmartFactory - * @version $Id: xoops_version.php 11345 2013-04-03 22:35:51Z luciorota $ */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); @@ -31,7 +30,7 @@ $modversion = array( 'name' => _MI_PUBLISHER_MD_NAME, 'version' => '1.03', - 'module_status' => 'Beta 2', + 'module_status' => 'Beta 3', 'release_date' => '2016/03/19', 'description' => _MI_PUBLISHER_MD_DESC, 'author' => 'Trabis (www.Xuups.com)', @@ -53,7 +52,7 @@ // images 'iconsmall' => 'assets/images/iconsmall.png', 'iconbig' => 'assets/images/iconbig.png', - 'image' => 'assets/images/logo.png', + 'image' => 'assets/images/logo_module.png', 'release_file' => XOOPS_URL . '/modules/' . $moduleDirName . '/docs/changelog.txt', // ------------------- Install/Update ------------------- 'onInstall' => 'include/oninstall.php', @@ -79,7 +78,9 @@ $moduleDirName . '_files', $moduleDirName . '_meta', $moduleDirName . '_mimetypes', - $moduleDirName . '_rating')); + $moduleDirName . '_rating' + ) +); //include_once $GLOBALS['xoops']->path('modules/' . $modversion['dirname'] . '/include/constants.php'); xoops_load('constants', $moduleDirName); @@ -89,7 +90,7 @@ if (file_exists($GLOBALS['xoops']->path('modules/' . $modversion['dirname'] . '/assets/images/' . $logo_filename))) { $modversion['image'] = 'assets/images/{$logo_filename}'; } else { - $modversion['image'] = 'assets/images/module_logo.png'; + $modversion['image'] = 'assets/images/logo_module.png'; } */ @@ -114,7 +115,8 @@ if ($isAdmin || ($allowsubmit && (is_object($GLOBALS['xoopsUser']) || $anonpost))) { $modversion['sub'][] = array( 'name' => _MI_PUBLISHER_SUB_SMNAME1, - 'url' => 'submit.php?op=add'); + 'url' => 'submit.php?op=add' + ); } // ------------------- Search ------------------- @@ -122,13 +124,15 @@ if ($allowsearch) { $modversion['sub'][] = array( 'name' => _MI_PUBLISHER_SUB_SMNAME3, - 'url' => 'search.php'); + 'url' => 'search.php' + ); } } // Add the Archive button $modversion['sub'][] = array( 'name' => _MI_PUBLISHER_SUB_ARCHIVE, - 'url' => 'archive.php'); + 'url' => 'archive.php' +); // ------------------- Blocks ------------------- $modversion['blocks'][] = array( @@ -138,7 +142,8 @@ 'show_func' => 'publisher_items_new_show', 'edit_func' => 'publisher_items_new_edit', 'options' => '0|datesub|0|5|65|none', - 'template' => 'publisher_items_new.tpl'); + 'template' => 'publisher_items_new.tpl' +); $modversion['blocks'][] = array( 'file' => 'items_recent.php', @@ -147,7 +152,8 @@ 'show_func' => 'publisher_items_recent_show', 'edit_func' => 'publisher_items_recent_edit', 'options' => '0|datesub|5|65', - 'template' => 'publisher_items_recent.tpl'); + 'template' => 'publisher_items_recent.tpl' +); $modversion['blocks'][] = array( 'file' => 'items_spot.php', @@ -156,14 +162,16 @@ 'show_func' => 'publisher_items_spot_show', 'edit_func' => 'publisher_items_spot_edit', 'options' => '1|5|0|0|1|1|bullet|0|0', - 'template' => 'publisher_items_spot.tpl'); + 'template' => 'publisher_items_spot.tpl' +); $modversion['blocks'][] = array( 'file' => 'items_random_item.php', 'name' => _MI_PUBLISHER_ITEMSRANDOM_ITEM, 'description' => _MI_PUBLISHER_ITEMSRANDOM_ITEM_DSC, 'show_func' => 'publisher_items_random_item_show', - 'template' => 'publisher_items_random_item.tpl'); + 'template' => 'publisher_items_random_item.tpl' +); $modversion['blocks'][] = array( 'file' => 'items_menu.php', @@ -172,7 +180,8 @@ 'show_func' => 'publisher_items_menu_show', 'edit_func' => 'publisher_items_menu_edit', 'options' => '0|datesub|5', - 'template' => 'publisher_items_menu.tpl'); + 'template' => 'publisher_items_menu.tpl' +); $modversion['blocks'][] = array( 'file' => 'latest_files.php', @@ -181,7 +190,8 @@ 'show_func' => 'publisher_latest_files_show', 'edit_func' => 'publisher_latest_files_edit', 'options' => '0|datesub|5|0', - 'template' => 'publisher_latest_files.tpl'); + 'template' => 'publisher_latest_files.tpl' +); $modversion['blocks'][] = array( 'file' => 'date_to_date.php', @@ -190,7 +200,8 @@ 'show_func' => 'publisher_date_to_date_show', 'edit_func' => 'publisher_date_to_date_edit', 'options' => "formatTimestamp(time(), 'm/j/Y') . " | " . formatTimestamp(time(), 'm/j/Y')", - 'template' => 'publisher_date_to_date.tpl'); + 'template' => 'publisher_date_to_date.tpl' +); $modversion['blocks'][] = array( 'file' => 'items_columns.php', @@ -199,7 +210,8 @@ 'show_func' => 'publisher_items_columns_show', 'edit_func' => 'publisher_items_columns_edit', 'options' => '2|0|4|256|normal', - 'template' => 'publisher_items_columns.tpl'); + 'template' => 'publisher_items_columns.tpl' +); $modversion['blocks'][] = array( 'file' => 'latest_news.php', @@ -208,14 +220,16 @@ 'show_func' => 'publisher_latest_news_show', 'edit_func' => 'publisher_latest_news_edit', 'options' => '0|6|2|300|0|0|100|30|1|published|1|120|120|1|dcdcdc|RIGHT|1|1|1|1|1|1|1|1|1|1|1|1|1|extended|', - 'template' => 'publisher_latest_news.tpl'); + 'template' => 'publisher_latest_news.tpl' +); $modversion['blocks'][] = array( 'file' => 'search.php', 'name' => _MI_PUBLISHER_SEARCH, 'description' => _MI_PUBLISHER_SEARCH_DSC, 'show_func' => 'publisher_search_show', - 'template' => 'publisher_search_block.tpl'); + 'template' => 'publisher_search_block.tpl' +); $modversion['blocks'][] = array( 'file' => 'category_items_sel.ph', @@ -224,108 +238,138 @@ 'show_func' => 'publisher_category_items_sel_show', 'edit_func' => 'publisher_category_items_sel_edit', 'options' => '0|datesub|5|65', - 'template' => 'publisher_category_items_sel.tpl'); + 'template' => 'publisher_category_items_sel.tpl' +); // ------------------- Templates ------------------- $modversion['templates'] = array( array( 'file' => 'publisher_header.tpl', - 'description' => '_MI_PUBLISHER_HEADER_DSC'), + 'description' => '_MI_PUBLISHER_HEADER_DSC' + ), array( 'file' => 'publisher_footer.tpl', - 'description' => '_MI_PUBLISHER_FOOTER_DSC'), + 'description' => '_MI_PUBLISHER_FOOTER_DSC' + ), array( 'file' => 'publisher_singleitem.tpl', - 'description' => '_MI_PUBLISHER_SINGLEITEM_DSC'), + 'description' => '_MI_PUBLISHER_SINGLEITEM_DSC' + ), array( 'file' => 'publisher_categories_table.tpl', - 'description' => '_MI_PUBLISHER_CATEGORIES_TABLE_DSC'), + 'description' => '_MI_PUBLISHER_CATEGORIES_TABLE_DSC' + ), array( 'file' => 'publisher_display_list.tpl', - 'description' => '_MI_PUBLISHER_DISPLAY_LIST_DSC'), + 'description' => '_MI_PUBLISHER_DISPLAY_LIST_DSC' + ), array( 'file' => 'publisher_display_summary.tpl', - 'description' => '_MI_PUBLISHER_DISPLAY_SUMMARY_DSC'), + 'description' => '_MI_PUBLISHER_DISPLAY_SUMMARY_DSC' + ), array( 'file' => 'publisher_display_full.tpl', - 'description' => '_MI_PUBLISHER_DISPLAY_FULL_DSC'), + 'description' => '_MI_PUBLISHER_DISPLAY_FULL_DSC' + ), array( 'file' => 'publisher_display_wfsection.tpl', - 'description' => '_MI_PUBLISHER_DISPLAY_WFSECTION_DSC'), + 'description' => '_MI_PUBLISHER_DISPLAY_WFSECTION_DSC' + ), array( 'file' => 'publisher_item.tpl', - 'description' => '_MI_PUBLISHER_ITEM_DSC'), + 'description' => '_MI_PUBLISHER_ITEM_DSC' + ), array( 'file' => 'publisher_submit.tpl', - 'description' => '_MI_PUBLISHER_SUBMIT_DSC'), + 'description' => '_MI_PUBLISHER_SUBMIT_DSC' + ), array( 'file' => 'publisher_singleitem_block.tpl', - 'description' => '_MI_PUBLISHER_SINGLEITEM_BLOCK_DSC'), + 'description' => '_MI_PUBLISHER_SINGLEITEM_BLOCK_DSC' + ), array( 'file' => 'publisher_print.tpl', - 'description' => '_MI_PUBLISHER_PRINT_DSC'), + 'description' => '_MI_PUBLISHER_PRINT_DSC' + ), array( 'file' => 'publisher_rss.tpl', - 'description' => '_MI_PUBLISHER_RSS_DSC'), + 'description' => '_MI_PUBLISHER_RSS_DSC' + ), array( 'file' => 'publisher_addfile.tpl', - 'description' => '_MI_PUBLISHER_ADDFILE_DSC'), + 'description' => '_MI_PUBLISHER_ADDFILE_DSC' + ), array( 'file' => 'publisher_search.tpl', - 'description' => '_MI_PUBLISHER_SEARCH_DSC'), + 'description' => '_MI_PUBLISHER_SEARCH_DSC' + ), array( 'file' => 'publisher_author_items.tpl', - 'description' => '_MI_PUBLISHER_AUTHOR_ITEMS_DSC'), + 'description' => '_MI_PUBLISHER_AUTHOR_ITEMS_DSC' + ), array( 'file' => 'publisher_archive.tpl', - 'description' => '_MI_PUBLISHER_ARCHIVE__DSC')); + 'description' => '_MI_PUBLISHER_ARCHIVE__DSC' + ) +); // Config categories $modversion['configcat']['seo'] = array( 'name' => _MI_PUBLISHER_CONFCAT_SEO, - 'description' => _MI_PUBLISHER_CONFCAT_SEO_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_SEO_DSC +); $modversion['configcat']['indexcat'] = array( 'name' => _MI_PUBLISHER_CONFCAT_INDEXCAT, - 'description' => _MI_PUBLISHER_CONFCAT_INDEXCAT_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_INDEXCAT_DSC +); $modversion['configcat']['index'] = array( 'name' => _MI_PUBLISHER_CONFCAT_INDEX, - 'description' => _MI_PUBLISHER_CONFCAT_INDEX_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_INDEX_DSC +); $modversion['configcat']['category'] = array( 'name' => _MI_PUBLISHER_CONFCAT_CATEGORY, - 'description' => _MI_PUBLISHER_CONFCAT_CATEGORY_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_CATEGORY_DSC +); $modversion['configcat']['item'] = array( 'name' => _MI_PUBLISHER_CONFCAT_ITEM, - 'description' => _MI_PUBLISHER_CONFCAT_ITEM_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_ITEM_DSC +); $modversion['configcat']['print'] = array( 'name' => _MI_PUBLISHER_CONFCAT_PRINT, - 'description' => _MI_PUBLISHER_CONFCAT_PRINT_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_PRINT_DSC +); $modversion['configcat']['search'] = array( 'name' => _MI_PUBLISHER_CONFCAT_SEARCH, - 'description' => _MI_PUBLISHER_CONFCAT_SEARCH_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_SEARCH_DSC +); $modversion['configcat']['submit'] = array( 'name' => _MI_PUBLISHER_CONFCAT_SUBMIT, - 'description' => _MI_PUBLISHER_CONFCAT_SUBMIT_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_SUBMIT_DSC +); $modversion['configcat']['permissions'] = array( 'name' => _MI_PUBLISHER_CONFCAT_PERMISSIONS, - 'description' => _MI_PUBLISHER_CONFCAT_PERMISSIONS_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_PERMISSIONS_DSC +); $modversion['configcat']['format'] = array( 'name' => _MI_PUBLISHER_CONFCAT_FORMAT, - 'description' => _MI_PUBLISHER_CONFCAT_FORMAT_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_FORMAT_DSC +); //mb $modversion['configcat']['group_header'] = array( 'name' => _MI_PUBLISHER_CONFCAT_FORMAT, - 'description' => _MI_PUBLISHER_CONFCAT_FORMAT_DSC); + 'description' => _MI_PUBLISHER_CONFCAT_FORMAT_DSC +); // Config Settings (only for modules that need config settings generated automatically) @@ -345,7 +389,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'odd', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'seo_url_rewrite', @@ -356,7 +401,8 @@ 'default' => 'none', 'options' => array_merge(array(_MI_PUBLISHER_URL_REWRITE_NONE => 'none'), array(_MI_PUBLISHER_URL_REWRITE_PATHINFO => 'path-info'), // Is performing module install/update? ($isModuleAction && in_array(php_sapi_name(), array('apache', 'apache2handler', 'cgi-fcgi'))) ? array(_MI_PUBLISHER_URL_REWRITE_HTACCESS => 'htaccess') : array()), - 'category' => 'seo'); + 'category' => 'seo' +); $modversion['config'][] = array( 'name' => 'seo_module_name', @@ -365,7 +411,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => $modversion['dirname'], - 'category' => 'seo'); + 'category' => 'seo' +); $modversion['config'][] = array( 'name' => 'seo_meta_keywords', 'title' => '_MI_PUBLISHER_SEO_METAKEYWORDS', @@ -373,18 +420,20 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '', - 'category' => 'seo'); + 'category' => 'seo' +); ################### INDEX PAGE #################### // group header $modversion['config'][] = array( 'name' => 'extrasystems_configs', - 'title' => '_MI_PUBLISHER_CONFCAT_INDEXCAT', + 'title' => '_MI_PUBLISHER_CONFCAT_INDEXCAT', 'description' => '_MI_PUBLISHER_CONFCAT_INDEXCAT_DSC', 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'even', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'index_title_and_welcome', @@ -393,7 +442,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'index'); + 'category' => 'index' +); $modversion['config'][] = array( 'name' => 'index_welcome_msg', @@ -402,7 +452,8 @@ 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => _MI_PUBLISHER_INDEXMSGDEF, - 'category' => 'index'); + 'category' => 'index' +); $modversion['config'][] = array( 'name' => 'index_display_last_items', @@ -411,7 +462,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'index'); + 'category' => 'index' +); $modversion['config'][] = array( 'name' => 'index_footer', @@ -420,7 +472,8 @@ 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => '', - 'category' => 'index'); + 'category' => 'index' +); ################### CATEGORY PAGE #################### // display_categeory_summary enabled by Freeform Solutions March 21 2006 @@ -432,7 +485,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'odd', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'cat_display_summary', @@ -441,7 +495,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'category'); + 'category' => 'category' +); $modversion['config'][] = array( 'name' => 'cat_list_image_width', @@ -450,7 +505,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '90', - 'category' => 'category'); + 'category' => 'category' +); $modversion['config'][] = array( 'name' => 'cat_main_image_width', @@ -459,7 +515,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '150', - 'category' => 'category'); + 'category' => 'category' +); ################### ITEM PAGE #################### // group header $modversion['config'][] = array( @@ -469,7 +526,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'even', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'item_title_size', @@ -478,7 +536,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '60', - 'category' => 'item'); + 'category' => 'item' +); $modversion['config'][] = array( 'name' => 'item_disp_comment_link', @@ -487,7 +546,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'item'); + 'category' => 'item' +); $modversion['config'][] = array( 'name' => 'item_disp_whowhen_link', @@ -496,7 +556,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'item'); + 'category' => 'item' +); $modversion['config'][] = array( 'name' => 'item_admin_hits', @@ -505,7 +566,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'item'); + 'category' => 'item' +); $modversion['config'][] = array( 'name' => 'item_footer', @@ -514,7 +576,8 @@ 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => '', - 'category' => 'item'); + 'category' => 'item' +); $modversion['config'][] = array( 'name' => 'item_other_items_type', @@ -525,9 +588,11 @@ 'options' => array( _MI_PUBLISHER_OTHER_ITEMS_TYPE_NONE => 'none', _MI_PUBLISHER_OTHER_ITEMS_TYPE_PREVIOUS_NEXT => 'previous_next', - _MI_PUBLISHER_OTHER_ITEMS_TYPE_ALL => 'all'), + _MI_PUBLISHER_OTHER_ITEMS_TYPE_ALL => 'all' + ), 'default' => 'previous_next', - 'category' => 'item'); + 'category' => 'item' +); ################### INDEX AND CATEGORIES #################### // group header @@ -538,7 +603,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'odd', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'idxcat_show_subcats', @@ -551,8 +617,10 @@ _MI_PUBLISHER_SHOW_SUBCATS_NO => 'no', _MI_PUBLISHER_SHOW_SUBCATS_NOTEMPTY => 'nonempty', _MI_PUBLISHER_SHOW_SUBCATS_ALL => 'all', - _MI_PUBLISHER_SHOW_SUBCATS_NOMAIN => 'nomain'), - 'category' => 'indexcat'); + _MI_PUBLISHER_SHOW_SUBCATS_NOMAIN => 'nomain' + ), + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_display_last_item', @@ -561,7 +629,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_last_item_size', @@ -570,7 +639,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '50', - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_items_display_type', @@ -582,9 +652,11 @@ _MI_PUBLISHER_DISPLAYTYPE_SUMMARY => 'summary', _MI_PUBLISHER_DISPLAYTYPE_FULL => 'full', _MI_PUBLISHER_DISPLAYTYPE_LIST => 'list', - _MI_PUBLISHER_DISPLAYTYPE_WFSECTION => 'wfsection'), + _MI_PUBLISHER_DISPLAYTYPE_WFSECTION => 'wfsection' + ), 'default' => 'summary', - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_display_subcat_dsc', @@ -593,7 +665,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_display_date_col', @@ -602,7 +675,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_display_hits_col', @@ -611,7 +685,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_show_rss_link', @@ -620,7 +695,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_collaps_heading', @@ -629,7 +705,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_cat_perpage', @@ -639,7 +716,8 @@ 'valuetype' => 'int', 'default' => 15, 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50), - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_perpage', @@ -649,7 +727,8 @@ 'valuetype' => 'int', 'default' => 15, 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50), - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_index_perpage', @@ -659,7 +738,8 @@ 'valuetype' => 'int', 'default' => 15, 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50), - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_partial_view_text', @@ -668,7 +748,8 @@ 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => _MI_PUBLISHER_PV_TEXT_DEF, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); $modversion['config'][] = array( 'name' => 'idxcat_display_art_count', @@ -677,7 +758,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'indexcat'); + 'category' => 'indexcat' +); ################### PRINT #################### // group header @@ -688,7 +770,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'even', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'print_header', @@ -697,7 +780,8 @@ 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => '', - 'category' => 'print'); + 'category' => 'print' +); $modversion['config'][] = array( 'name' => 'print_logourl', @@ -706,7 +790,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => XOOPS_URL . '/images/logo.gif', - 'category' => 'print'); + 'category' => 'print' +); $modversion['config'][] = array( 'name' => 'print_footer', @@ -719,8 +804,10 @@ _MI_PUBLISHER_ITEMFOOTER_SEL => 'item footer', _MI_PUBLISHER_INDEXFOOTER_SEL => 'index footer', _MI_PUBLISHER_BOTH_FOOTERS => 'both', - _MI_PUBLISHER_NO_FOOTERS => 'none'), - 'category' => 'print'); + _MI_PUBLISHER_NO_FOOTERS => 'none' + ), + 'category' => 'print' +); ################### FORMAT #################### // group header @@ -731,7 +818,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'odd', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'format_date', @@ -740,7 +828,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => 'd-M-Y H:i', - 'category' => 'format'); + 'category' => 'format' +); $modversion['config'][] = array( 'name' => 'format_order_by', @@ -755,9 +844,11 @@ _MI_PUBLISHER_ORDERBY_RATING => 'rating', _MI_PUBLISHER_ORDERBY_VOTES => 'votes', _MI_PUBLISHER_ORDERBY_COMMENTS => 'comments', - _MI_PUBLISHER_ORDERBY_WEIGHT => 'weight'), + _MI_PUBLISHER_ORDERBY_WEIGHT => 'weight' + ), 'default' => 'date', - 'category' => 'format'); + 'category' => 'format' +); $modversion['config'][] = array( 'name' => 'format_image_nav', @@ -766,7 +857,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'format'); + 'category' => 'format' +); $modversion['config'][] = array( 'name' => 'format_realname', @@ -775,7 +867,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'format'); + 'category' => 'format' +); $modversion['config'][] = array( 'name' => 'format_highlight_color', @@ -784,7 +877,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '#FFFF80', - 'category' => 'format'); + 'category' => 'format' +); $modversion['config'][] = array( 'name' => 'format_linked_path', @@ -793,7 +887,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'format'); + 'category' => 'format' +); $modversion['config'][] = array( 'name' => 'format_breadcrumb_modname', @@ -802,7 +897,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'format'); + 'category' => 'format' +); ################### SEARCH #################### // group header @@ -813,7 +909,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'even', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'search_cat_path', @@ -822,7 +919,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'search'); + 'category' => 'search' +); ################### SUBMIT #################### // group header @@ -833,7 +931,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'odd', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'submit_intro_msg', @@ -842,7 +941,8 @@ 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => _MI_PUBLISHER_SUBMITMSGDEF, - 'category' => 'submit'); + 'category' => 'submit' +); xoops_load('XoopsEditorHandler'); $editorHandler = XoopsEditorHandler::getInstance(); @@ -855,7 +955,8 @@ 'valuetype' => 'text', 'options' => array_flip($editorHandler->getList()), 'default' => 'dhtmltextarea', - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_editor_rows', @@ -864,7 +965,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '35', - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_editor_cols', @@ -873,7 +975,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '60', - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_editor_width', @@ -882,7 +985,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '100%', - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_editor_height', @@ -891,7 +995,8 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => '400px', - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_status', @@ -902,10 +1007,12 @@ 'options' => array( _MI_PUBLISHER_SUBMITTED => PublisherConstants::PUBLISHER_STATUS_SUBMITTED, _MI_PUBLISHER_PUBLISHED => PublisherConstants::PUBLISHER_STATUS_PUBLISHED, - _MI_PUBLISHER_OFFLINE => PublisherConstants::PUBLISHER_STATUS_OFFLINE, - _MI_PUBLISHER_REJECTED => PublisherConstants::PUBLISHER_STATUS_REJECTED), + _MI_PUBLISHER_OFFLINE => PublisherConstants::PUBLISHER_STATUS_OFFLINE, + _MI_PUBLISHER_REJECTED => PublisherConstants::PUBLISHER_STATUS_REJECTED + ), 'default' => PublisherConstants::PUBLISHER_STATUS_SUBMITTED, - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_allowcomments', @@ -914,7 +1021,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_dohtml', @@ -923,7 +1031,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_dosmiley', @@ -932,7 +1041,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_doxcode', @@ -941,7 +1051,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_doimage', @@ -950,7 +1061,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'submit'); + 'category' => 'submit' +); $modversion['config'][] = array( 'name' => 'submit_dobr', @@ -959,7 +1071,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'submit'); + 'category' => 'submit' +); ################### PERMISSIONS #################### // group header @@ -970,7 +1083,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'even', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'perm_submit', @@ -979,7 +1093,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_edit', @@ -988,7 +1103,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_delete', @@ -997,7 +1113,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_anon_submit', @@ -1006,7 +1123,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_upload', @@ -1015,7 +1133,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_clone', @@ -1024,7 +1143,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_rating', @@ -1033,7 +1153,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_search', @@ -1042,7 +1163,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_author_items', @@ -1051,7 +1173,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_com_art_level', @@ -1060,7 +1183,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'permissions'); + 'category' => 'permissions' +); $modversion['config'][] = array( 'name' => 'perm_autoapprove', @@ -1069,7 +1193,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'permissions'); + 'category' => 'permissions' +); ################### OTHERS #################### // group header @@ -1080,7 +1205,8 @@ 'formtype' => 'line_break', 'valuetype' => 'textbox', 'default' => 'odd', - 'category' => 'group_header'); + 'category' => 'group_header' +); $modversion['config'][] = array( 'name' => 'display_breadcrumb', @@ -1088,7 +1214,8 @@ 'description' => '_MI_PUBLISHER_DISPBREADDSC', 'formtype' => 'yesno', 'valuetype' => 'int', - 'default' => 1); + 'default' => 1 +); $modversion['config'][] = array( 'name' => 'display_pdf', @@ -1096,7 +1223,8 @@ 'description' => '_MI_PUBLISHER_DISPLAY_PDF_DSC', 'formtype' => 'yesno', 'valuetype' => 'int', - 'default' => 1); + 'default' => 1 +); $modversion['config'][] = array( 'name' => 'maximum_filesize', @@ -1104,7 +1232,8 @@ 'description' => '_MI_PUBLISHER_MAX_SIZEDSC', 'formtype' => 'textbox', 'valuetype' => 'text', - 'default' => '1000000'); + 'default' => '1000000' +); $modversion['config'][] = array( 'name' => 'maximum_image_width', @@ -1112,7 +1241,8 @@ 'description' => '_MI_PUBLISHER_MAX_WIDTHDSC', 'formtype' => 'textbox', 'valuetype' => 'text', - 'default' => '800'); + 'default' => '800' +); $modversion['config'][] = array( 'name' => 'maximum_image_height', @@ -1120,7 +1250,8 @@ 'description' => '_MI_PUBLISHER_MAX_HEIGHTDSC', 'formtype' => 'textbox', 'valuetype' => 'text', - 'default' => '800'); + 'default' => '800' +); ########### ADDED in final ############# @@ -1131,7 +1262,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'item'); + 'category' => 'item' +); $modversion['config'][] = array( 'name' => 'index_disp_subtitle', @@ -1140,7 +1272,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'index'); + 'category' => 'index' +); $modversion['config'][] = array( 'name' => 'cat_disp_subtitle', @@ -1149,7 +1282,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, - 'category' => 'category'); + 'category' => 'category' +); $modversion['config'][] = array( 'name' => 'item_disp_subtitle', @@ -1158,7 +1292,8 @@ 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, - 'category' => 'item'); + 'category' => 'item' +); // Comments $modversion['hasComments'] = 1; @@ -1179,7 +1314,8 @@ 'name' => 'global_item', 'title' => _MI_PUBLISHER_GLOBAL_ITEM_NOTIFY, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_NOTIFY_DSC, - 'subscribe_from' => "array('index.php', 'category.php', 'item.php')"); + 'subscribe_from' => "array('index.php', 'category.php', 'item.php')" +); $modversion['notification']['category'][] = array( 'name' => 'category_item', @@ -1187,14 +1323,16 @@ 'description' => _MI_PUBLISHER_CATEGORY_ITEM_NOTIFY_DSC, 'subscribe_from' => "array('index.php', 'category.php', 'item.php')", 'item_name' => 'categoryid', - 'allow_bookmark' => 1); + 'allow_bookmark' => 1 +); $modversion['notification']['category'][] = array( 'name' => 'item', 'title' => _MI_PUBLISHER_ITEM_NOTIFY, 'description' => _MI_PUBLISHER_ITEM_NOTIFY_DSC, 'subscribe_from' => "array('item.php')", 'item_name' => 'itemid', - 'allow_bookmark' => 1); + 'allow_bookmark' => 1 +); $modversion['notification']['event'][] = array( 'name' => 'category_created', @@ -1203,7 +1341,8 @@ 'caption' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY_DSC, 'mail_template' => 'global_item_category_created', - 'mail_subject' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY_SBJ +); $modversion['notification']['event'][] = array( 'name' => 'submitted', 'category' => 'global_item', @@ -1212,7 +1351,8 @@ 'caption' => _MI_PUBLISHER_GLOBAL_ITEM_SUBMITTED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_SUBMITTED_NOTIFY_DSC, 'mail_template' => 'global_item_submitted', - 'mail_subject' => _MI_PUBLISHER_GLOBAL_ITEM_SUBMITTED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_GLOBAL_ITEM_SUBMITTED_NOTIFY_SBJ +); $modversion['notification']['event'][] = array( 'name' => 'published', 'category' => 'global_item', @@ -1220,7 +1360,8 @@ 'caption' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY_DSC, 'mail_template' => 'global_item_published', - 'mail_subject' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY_SBJ +); $modversion['notification']['event'][] = array( 'name' => 'submitted', 'category' => 'category_item', @@ -1229,7 +1370,8 @@ 'caption' => _MI_PUBLISHER_CATEGORY_ITEM_SUBMITTED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_CATEGORY_ITEM_SUBMITTED_NOTIFY_DSC, 'mail_template' => 'category_item_submitted', - 'mail_subject' => _MI_PUBLISHER_CATEGORY_ITEM_SUBMITTED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_CATEGORY_ITEM_SUBMITTED_NOTIFY_SBJ +); $modversion['notification']['event'][] = array( 'name' => 'published', 'category' => 'category_item', @@ -1237,7 +1379,8 @@ 'caption' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY_DSC, 'mail_template' => 'category_item_published', - 'mail_subject' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY_SBJ +); $modversion['notification']['event'][] = array( 'name' => 'rejected', 'category' => 'item', @@ -1246,7 +1389,8 @@ 'caption' => _MI_PUBLISHER_ITEM_REJECTED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_ITEM_REJECTED_NOTIFY_DSC, 'mail_template' => 'item_rejected', - 'mail_subject' => _MI_PUBLISHER_ITEM_REJECTED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_ITEM_REJECTED_NOTIFY_SBJ +); $modversion['notification']['event'][] = array( 'name' => 'approved', 'category' => 'item', @@ -1255,4 +1399,5 @@ 'caption' => _MI_PUBLISHER_ITEM_APPROVED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_ITEM_APPROVED_NOTIFY_DSC, 'mail_template' => 'item_approved', - 'mail_subject' => _MI_PUBLISHER_ITEM_APPROVED_NOTIFY_SBJ); + 'mail_subject' => _MI_PUBLISHER_ITEM_APPROVED_NOTIFY_SBJ +);