|
From: <zy...@us...> - 2014-12-22 19:51:17
|
Revision: 12914
http://sourceforge.net/p/xoops/svn/12914
Author: zyspec
Date: 2014-12-22 19:51:14 +0000 (Mon, 22 Dec 2014)
Log Message:
-----------
- include 3 files missing from previous commit
Added Paths:
-----------
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onuninstall.inc.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onupdate.inc.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/help/module_index.html
Added: XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onuninstall.inc.php
===================================================================
--- XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onuninstall.inc.php (rev 0)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onuninstall.inc.php 2014-12-22 19:51:14 UTC (rev 12914)
@@ -0,0 +1,48 @@
+<?php
+/*
+ RW-Banner
+ Copyright (c) 2006 BrInfo
+ <http://www.brinfo.com.br>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting
+ source code which is considered copyrighted (c) material of the
+ original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+/**
+ * XOOPS rwbanner module uninstall functions
+ *
+ * @copyright:: {@link http://sourceforge.net/projects/xoops/ The XOOPS Project}
+ * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
+ * @package:: rwbanner
+ * @since:: 1.52
+ * @author:: zyspec <ow...@zy...>
+ * @version:: $Id: $
+ */
+defined('XOOPS_ROOT_PATH') or exit('Restricted access');
+
+function xoops_module_pre_uninstall_rwbanner(&$module)
+{
+ // make sure any images from this module in upload directory are removed
+
+ $hModConfig = &xoops_gethandler('config');
+ $rwConfig = $hModConfig->getConfigsByCat(0, $module->getVar('mid'));
+
+ $image_dir = $rwConfig['dir_images'];
+ $image_dir = (DIRECTORY_SEPARATOR == mb_substr($image_dir, -1)) ? mb_substr($image_dir, mb_strlen($image_dir)-1) : $image_dir;
+ array_map('unlink', glob($image_dir . DIRECTORY_SEPARATOR . '*')); // delete all the files in the images directory
+ return rmdir($image_dir);
+}
Added: XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onupdate.inc.php
===================================================================
--- XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onupdate.inc.php (rev 0)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/include/onupdate.inc.php 2014-12-22 19:51:14 UTC (rev 12914)
@@ -0,0 +1,74 @@
+<?php
+/*
+ RW-Banner
+ Copyright (c) 2006 BrInfo
+ <http://www.brinfo.com.br>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting
+ source code which is considered copyrighted (c) material of the
+ original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+/**
+ * XOOPS rwbanner module update functions
+ *
+ * @copyright:: {@link http://sourceforge.net/projects/xoops/ The XOOPS Project}
+ * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
+ * @package:: rwbanner
+ * @since:: 1.52
+ * @author:: zyspec <ow...@zy...>
+ * @version:: $Id: $
+ */
+defined('XOOPS_ROOT_PATH') or exit('Restricted access');
+
+function xoops_module_update_rwbanner(&$module, &$prev_version)
+{
+ // referer check
+ $success = false;
+ $ref = xoops_getenv('HTTP_REFERER');
+ if (('' == $ref) || 0 === mb_strpos($ref , $GLOBALS['xoops']->url('modules/system/admin.php'))) {
+ /* module specific part */
+
+ $installedVersion = intval($prev_version);
+ xoops_loadLanguage('admin', $module->getVar('dirname'));
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+
+ // include new banner sizes if they don't exist already
+ $new_cats = array(array('titulo'=> '120x60', 'larg' => 120, 'alt' => 60), // button 2
+ array('titulo'=> '120x90', 'larg' => 120, 'alt' => 90), // button 1
+ array('titulo'=> '120x240', 'larg' => 120, 'alt' => 240), // vertical banner
+ array('titulo'=> '120x600', 'larg' => 120, 'alt' => 600), // skyscraper
+ array('titulo'=> '125x125', 'larg' => 125, 'alt' => 125), // square button
+ array('titulo'=> '160x600', 'larg' => 160, 'alt' => 600), // wide skyscraper
+ array('titulo'=> '234x60', 'larg' => 234, 'alt' => 60), // half banner
+ array('titulo'=> '250x250', 'larg' => 250, 'alt' => 250), // square pop-up
+ array('titulo'=> '728x90', 'larg' => 728, 'alt' => 90), // leaderboard
+ array('titulo'=> '720x300', 'larg' => 720, 'alt' => 300), // pop-under
+ );
+
+ $success = true;
+
+ foreach ($new_cats as $this_cat) {
+ $result = $db->queryF("SELECT cod FROM " . $db->prefix('rw_categorias') . " WHERE larg={$this_cat['larg']} AND alt={$this_cat['alt']} LIMIT 0,1");
+ $foundCat = $db->getRowsNum($result);
+ if (!$foundCat) {
+ $s1 = $db->queryF("INSERT INTO " . $db->prefix('rw_categorias') . "(titulo,larg,alt) VALUES ('" . $this_cat['titulo'] . "', '" . $this_cat['larg'] . "', '" . $this_cat['alt'] . "')");
+ $success = ($success && $s1);
+ }
+ }
+ return $success;
+ }
+}
Added: XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/help/module_index.html
===================================================================
--- XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/help/module_index.html (rev 0)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/help/module_index.html 2014-12-22 19:51:14 UTC (rev 12914)
@@ -0,0 +1,51 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Help:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/rwbanner/admin/index.php"
+ title="Back to the administration of Contact"> RW-Banner
+ <img src="<{xoAdminIcons home.png}>"
+ alt="Back to the Administration of RW-Banner"/>
+ </a></h1>
+
+ <h4 class="odd">RW-Banner Module</h4>
+ <p style='margin: 1em 0;'>This module includes the following features:</p>
+ <ul>
+ <li style='height: 1.3em;'>Ability to manage banners by category and/or client</li>
+ <li style='height: 1.3em;'>Category can be used to manage banners by size, subject, etc.</li>
+ <li style='height: 1.3em;'>Integrated keyword (tag) support</li>
+ <li style='height: 1.3em;'>Includes 4 different block types for displaying banners & a block to display statistics</li>
+ <li style='height: 1.3em;'>Easily activate/deactivate banners (inactive banners stay in the database)</li>
+ <li style='height: 1.3em;'>Use of Smarty tags to allow easy modification of templates to include banners</li>
+ <li style='height: 1.3em;'>Clients can check/modify banner status without Admin intervention (if allowed by Admin)</li>
+ <li style='height: 1.3em;'>Send statistics e-mail to clients about their banners</li>
+ </ul>
+
+ <p style='margin: 1em 0;'>Feature Details:</p>
+ <ul>
+ <li>Registering of banners separated by categories and clients. The categories
+ are typically used to differentiate the size of the banners so several banner display
+ models can be created. The clients are users registered at the site and when a banner
+ has been added the user will need to be associated with banner.</li>
+ <li>5 block models to show cloneable banners and with several configuration options. This
+ allows the administrator to choose how many random banners to show, which category
+ should be shown and more. The option to create a table for the banner display having
+ only to select the number of columns to show.</li>
+ <li>Activation and deactivation option of banners by one click. Only active banners will
+ be shown but the inactive ones continue to be registered in the database, allowing
+ the administrator to reactivate them at any time.</li>
+ <li>Beyond the display of banners in blocks it is also possible to use the random
+ banner in the theme of your site or in any other page, the only requirement is to
+ add the <{$rw_banner}> tag.</li>
+ <li>There are two (2) ways a client can view statistics. There is a block to show a table
+ with the main statistics of all the banners related to the client. The main page of
+ the module also displays a table with all the statistics of the banners for the
+ logged-in client (XOOPS user). Also on this page the client has the option to send
+ the banner statistics to their registered e-mail. Finally, the module index page also
+ allows clients the ability to change some of the banner information - if the
+ administrator allows. The information a client can change is configurable through
+ the module Preferences settings.</li>
+ <li>The ability to show/hide random banners in the text of other modules. Now banners can
+ be displayed in any module that accepts bbcodes. Banners can now be published in news,
+ articles, static pages, including in forum posts, etc. This feature requires a little
+ more expertise and is explained in detail in the ./docs/README(2).txt file.</li>
+ </ul>
+</div>
|
|
From: <zy...@us...> - 2014-12-22 19:52:28
|
Revision: 12915
http://sourceforge.net/p/xoops/svn/12915
Author: zyspec
Date: 2014-12-22 19:52:04 +0000 (Mon, 22 Dec 2014)
Log Message:
-----------
Added Paths:
-----------
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/css/
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/images/
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/index.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/js/
Removed Paths:
-------------
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/
Added: XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/index.html
===================================================================
--- XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/index.html (rev 0)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/index.html 2014-12-22 19:52:04 UTC (rev 12915)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
|