|
From: <be...@us...> - 2014-04-26 01:09:07
|
Revision: 12507
http://sourceforge.net/p/xoops/svn/12507
Author: beckmi
Date: 2014-04-26 01:09:03 +0000 (Sat, 26 Apr 2014)
Log Message:
-----------
XOOPS 2.5.7 Module Pack update (work in progress): myPoints
Added Paths:
-----------
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/functions.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/index.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/about.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/admin.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/blocks.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/help.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/main.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/modinfo.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/mypoints.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/arms.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/forum.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/myalbum.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mydownloads.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mylinks.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/newbb.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/news.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/publisher.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/system.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/tutorials.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/webshow.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/wfsections.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/xoopstube.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/sql/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/sql/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/sql/mysql.sql
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/templates/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/templates/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/templates/mypoints_about.tpl
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/templates/mypoints_mypoints.tpl
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/templates/mypoints_showall.tpl
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/xoops_version.php
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/functions.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/functions.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/functions.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,159 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function mypoints_pluginExecute($dirname, $items, $since, $func = 'useritems_count')
+{
+ global $xoopsUser, $xoopsConfig, $xoopsDB;
+
+ $ret = array();
+ $plugins_path = XOOPS_ROOT_PATH . '/modules/mypoints/plugins';
+ $plugin_info = mypoints_getPluginInfo($dirname , $func) ;
+
+ if (empty($plugin_info) || empty($plugin_info['plugin_path'])) {
+ return false;
+ }
+
+ include_once $plugin_info['plugin_path'];
+
+ // call the plugin
+ if (function_exists(@$plugin_info['func'])) {
+ // get the list of items
+ $ret = $plugin_info['func']($items, $since);
+ }
+
+ return $ret;
+}
+
+function mypoints_getPluginInfo($dirname , $func = 'useritems_count')
+{
+ global $xoopsConfig;
+ $language = $xoopsConfig['language'];
+ // get $mytrustdirname for D3 modules
+ $mytrustdirname = '' ;
+ if (defined('XOOPS_TRUST_PATH') && file_exists(XOOPS_ROOT_PATH . "/modules/{$dirname}/mytrustdirname.php")) {
+ @include XOOPS_ROOT_PATH . "/modules/{$dirname}/mytrustdirname.php";
+ $d3module_plugin_file = XOOPS_TRUST_PATH . "/modules/{$mytrustdirname}/include/mypoints.plugin.php";
+ }
+
+ $module_plugin_file = XOOPS_ROOT_PATH . "/modules/{$dirname}/include/mypoints.plugin.php" ;
+ $builtin_plugin_file = XOOPS_ROOT_PATH . "/modules/mypoints/plugins/{$dirname}.php" ;
+
+ if (file_exists($module_plugin_file)) {
+ // module side (1st priority)
+ $ret = array(
+ 'plugin_path' => $module_plugin_file,
+ 'func' => $dirname . '_' . $func,
+ 'type' => 'module');
+ } elseif (!empty($mytrustdirname) && file_exists($d3module_plugin_file)) {
+ // D3 module's plugin under xoops_trust_path (2nd priority)
+ $ret = array(
+ 'plugin_path' => $d3module_plugin_file,
+ 'func' => $mytrustdirname . '_' . $func,
+ 'type' => 'module (D3)');
+ } elseif (file_exists($builtin_plugin_file)) {
+ // built-in plugin under modules/mypoints (3rd priority)
+ $ret = array(
+ 'plugin_path' => $builtin_plugin_file,
+ 'func' => $dirname . '_' . $func,
+ 'type' => 'built-in');
+ } else {
+ $ret = array();
+ }
+
+ return $ret;
+}
+
+//////
+// Update the Users Scores (refresh table)
+//////
+function mypoints_updatePoints($force = 0)
+{
+ global $xoopsDB, $xoopsModuleConfig;
+
+ $module_handler = xoops_gethandler('module');
+ $plugin_handler = xoops_getmodulehandler('plugin');
+ $user_handler = xoops_getmodulehandler('user');
+ $relation_handler = xoops_getmodulehandler('relation');
+
+ $refreshtime = $xoopsModuleConfig['refreshtime'];
+ $since = strtotime($xoopsModuleConfig['countsince']);
+ $countwebm = $xoopsModuleConfig['countadmin'];
+
+ $user = $user_handler->get(0);
+ $timestamp = 0;
+ if (is_object($user)) {
+ $timestamp = $user->getVar('useruname');
+ }
+
+ if (((time() - $timestamp) >= $refreshtime) || $force == 1) {
+ // Timer expired, update table
+ // Set date of update
+ $user_handler->deleteAll();
+ $relation_handler->deleteAll();
+
+ $user = $user_handler->create();
+ $user->setVar('useruid', 0);
+ $user->setVar('useruname', time());
+ $user->setVar('userpoints', 0);
+ $user_handler->insert($user);
+
+ // Prep to calculate user points
+ if ($countwebm == 0) {
+ $query = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " WHERE rank = '0' ORDER BY uid");
+ } else {
+ $query = $xoopsDB->query("SELECT uid, uname FROM " . $xoopsDB->prefix("users") . " ORDER BY uid");
+ }
+ $users = array();
+ while (list($uid,$uname) = $xoopsDB->fetchRow($query)) {
+
+ // Calculate User Points
+ $points = 0;
+ $criteria = new CriteriaCompo(new Criteria('pluginisactive', 1));
+ //$criteria->add(new Criteria('plugintype', 'items'), 'AND');
+ $plugins = $plugin_handler->getObjects($criteria);
+ foreach ($plugins as $plugin) {
+ $moduleid = $plugin->getVar('pluginmid');
+ $module = $module_handler->get($moduleid);
+ $count = mypoints_pluginExecute($module->getVar('dirname') , $uid, $since, 'user' . $plugin->getVar('plugintype') . '_count');
+ if ($count > 0) {
+ $relation = $relation_handler->create();
+ $relation->setVar('relationuid', $uid);
+ $relation->setVar('relationpid', $plugin->getVar('pluginid'));
+ $relation->setVar('relationpoints', $count);
+ $relation_handler->insert($relation);
+ unset($relation);
+ $points = $points + ($count * $plugin->getVar('pluginmulti'));
+ }
+ unset($module);
+ }
+
+ if ($points > 0) {
+ $user = $user_handler->create();
+ $user->setVar('useruid', $uid);
+ $user->setVar('useruname', $uname);
+ $user->setVar('userpoints', $points);
+ $user_handler->insert($user);
+ unset($user);
+ }
+ }
+ }
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/functions.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/index.html
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/index.html (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/include/index.html 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/index.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/index.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/index.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,117 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Mypoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
+
+include_once XOOPS_ROOT_PATH . '/modules/mypoints/include/functions.php';
+
+$xoopsOption['template_main'] = 'mypoints_showall.tpl';
+include_once XOOPS_ROOT_PATH . '/header.php';
+
+$details = isset($_GET['det']) ? intval($_GET['det']) : 0;
+
+$plugin_handler = xoops_getmodulehandler('plugin');
+$relation_handler = xoops_getmodulehandler('relation');
+$user_handler = xoops_getmodulehandler('user');
+
+$refreshtime = $xoopsModuleConfig['refreshtime'];
+$since = strtotime($xoopsModuleConfig['countsince']);
+$countwebm = $xoopsModuleConfig['countadmin'];
+$limit = $xoopsModuleConfig['memberstoshow'];
+
+$xoopsTpl->assign('topmessage', sprintf(_MA_MYPOINTS_TOPMESSAGE, $limit, $xoopsConfig['sitename']));
+
+if ($refreshtime < 60) {
+ $refreshtimes = $refreshtime ;
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LSECOND : _MA_MYPOINTS_LSECONDS;
+} elseif ($refreshtime < 3600) {
+ $refreshtimes = intval($refreshtime / 60);
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LMINUTE : _MA_MYPOINTS_LMINUTES;
+} elseif ($refreshtime < 86400) {
+ $refreshtimes = intval($refreshtime / 3600);
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LHOUR : _MA_MYPOINTS_LHOURS;
+} else {
+ $refreshtimes = intval($refreshtime / 86400);
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LDAY : _MA_MYPOINTS_LDAYS;
+}
+
+$xoopsTpl->assign('updatemessage', sprintf(_MA_MYPOINTS_UPDATEMESSAGE, $refreshtimes, $message));
+$xoopsTpl->assign('sincemessage', sprintf(_MA_MYPOINTS_SINCEMESSAGE, formatTimeStamp($since, "m", $xoopsConfig['server_TZ'])));
+
+$criteria = new CriteriaCompo(new Criteria('pluginisactive', 1));
+//$criteria->add(new Criteria('plugintype', 'items'), 'AND');
+$criteria->setSort('pluginmulti');
+$criteria->setOrder('DESC');
+$plugins = $plugin_handler->getObjects($criteria);
+unset($criteria);
+
+if ($details == 1) {
+ foreach ($plugins as $plugin) {
+ $myplugins[]['pluginname'] = $plugin->getVar('pluginname');
+ }
+ $xoopsTpl->assign('plugins', $myplugins);
+}
+
+$criteria = new CriteriaCompo();
+$criteria->setSort('userpoints');
+$criteria->setOrder('DESC');
+$criteria->setLimit($limit);
+//$criteria->setStart($start);
+$users = $user_handler->getObjects($criteria);
+$myusers = array();
+
+$i = 1;
+foreach ($users as $user) {
+ if ($user->getVar('userpoints') > 0) {
+ $myusers[$i]['rank'] = $i;
+ $myusers[$i]['link'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $user->getVar('useruid') . "'>" . $user->getVar('useruname') . "</a>";
+ if ($details == 1) {
+ foreach ($plugins as $plugin) {
+ $relation = $relation_handler->getByPluginUid($plugin->getVar('pluginid'), $user->getVar('useruid'));
+ $points = is_object($relation) ? $relation->getVar('relationpoints') : 0;
+ $myusers[$i]['pluginpoints'][] = $points;
+ }
+ }
+ $myusers[$i]['points'] = $user->getVar('userpoints');
+ ++$i;
+ }
+}
+
+$xoopsTpl->assign('users', $myusers);
+
+$detailslink = "<a href='index.php?det=";
+if ($details == 1) {
+ $detailslink .= "0' title='" . _MA_MYPOINTS_MOREOFF . "'>" . _MA_MYPOINTS_MOREOFF . "</a>";
+} else {
+ $detailslink .= "1' title='" . _MA_MYPOINTS_MOREON . "'>" . _MA_MYPOINTS_MOREON . "</a>";
+}
+$xoopsTpl->assign('detailslink', $detailslink);
+
+$message = '';
+foreach ($plugins as $plugin) {
+ $message .= $plugin->getVar('pluginname').' : ';
+ $points = $plugin->getVar('pluginmulti') == 1 ? _MA_MYPOINTS_LPOINT : _MA_MYPOINTS_LPOINTS;
+ $message .= $plugin->getVar('pluginmulti'). ' ' . $points . '<br />';
+}
+
+$xoopsTpl->assign('howtoearnmessage', $message);
+mypoints_updatePoints();
+
+include_once XOOPS_ROOT_PATH . '/footer.php';
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/index.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/about.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/about.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/about.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,24 @@
+<?php
+define('_AB_MYPOINTS_AUTHOR_INFO', 'Contributors information');
+define('_AB_MYPOINTS_AUTHOR_WORD',"The Author's Word");
+define('_AB_MYPOINTS_BY', 'By');
+define('_AB_MYPOINTS_DEVELOPER_CONTRIBUTOR', 'Contributor(s)');
+define('_AB_MYPOINTS_DEVELOPER_CREDITS', 'Credits');
+define('_AB_MYPOINTS_DEVELOPER_EMAIL', 'Email');
+define('_AB_MYPOINTS_DEVELOPER_WEBSITE', 'Website');
+define('_AB_MYPOINTS_MODULE_BUG', 'Report a bug for this module');
+define('_AB_MYPOINTS_MODULE_DEMO', 'Demo Site');
+define('_AB_MYPOINTS_MODULE_DISCLAIMER', 'Disclaimer');
+define('_AB_MYPOINTS_MODULE_FEATURE', 'Suggest a new feature for this module');
+define('_AB_MYPOINTS_MODULE_INFO', 'Module Developpment Informations');
+define('_AB_MYPOINTS_MODULE_RELEASE_DATE', 'Release date');
+define('_AB_MYPOINTS_MODULE_STATUS', 'Status');
+define('_AB_MYPOINTS_MODULE_SUBMIT_BUG', 'Submit a bug');
+define('_AB_MYPOINTS_MODULE_SUBMIT_FEATURE', 'Request a feature');
+define('_AB_MYPOINTS_MODULE_SUPPORT', 'Official support site');
+define('_AB_MYPOINTS_PEOPLE_DEVELOPERS', 'Developers');
+define('_AB_MYPOINTS_PEOPLE_TESTERS', 'Testers');
+define('_AB_MYPOINTS_PEOPLE_DOCUMENTERS', 'Documenters');
+define('_AB_MYPOINTS_PEOPLE_TRANSLATERS', 'Translaters');
+define('_AB_MYPOINTS_PEOPLE_OTHER', 'Other contributors');
+define('_AB_MYPOINTS_VERSION_HISTORY', 'Version History');
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/about.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/admin.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/admin.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/admin.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,20 @@
+<?php
+define("_AM_MYPOINTS_MODULEADMIN","module administration");
+define("_AM_MYPOINTS_GENERALSET","General Settings");
+define("_AM_MYPOINTS_GOTOMOD","Go to module");
+
+define("_AM_MYPOINTS_PLUGINS","Plugins administration");
+define("_AM_MYPOINTS_MODULENAME","Module name");
+define("_AM_MYPOINTS_PLUGINNAME","Plugin name");
+define("_AM_MYPOINTS_PLUGINTYPE","Plugin type");
+define("_AM_MYPOINTS_PLUGINITEMS","Items");
+define("_AM_MYPOINTS_PLUGINVOTES","Votes");
+define("_AM_MYPOINTS_STATUS","Status");
+
+define("_AM_MYPOINTS_POINTS","Points");
+define("_AM_MYPOINTS_ACTIVE","Active");
+define("_AM_MYPOINTS_INACTIVE","Inactive");
+
+define("_AM_MYPOINTS_MULTI","Multiply by");
+define("_AM_MYPOINTS_GO","Save and Update");
+define("_AM_MYPOINTS_DONE","Done!");
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/admin.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/blocks.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/blocks.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/blocks.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,5 @@
+<?php
+// Author: Trabis
+// URL: http://www.xuups.com
+// E-Mail: lus...@gm...
+define("_MB_MYPOINTS_DISPLAYC","Display %s comments");
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/blocks.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/help.html
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/help.html (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/help.html 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,40 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Help:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/mypoints/admin/index.php"
+ title="Back to the administration of My Points"> My Points
+ <img src="<{xoAdminIcons home.png}>"
+ alt="Back to the Administration of My Points"/>
+ </a></h1>
+
+ <h4 class="odd">Description</h4>
+
+ <p class="even">With this XOOPS module, your can give you members points for each submission or vote.<br /> <br />
+
+ The module can display an ordered list of your top members <br /> <br />
+ </p>
+
+ <h4 class="odd">Install/uninstall</h4>
+
+ <p class="even">No special measures necessary, follow the standard installation process –
+ extract the module folder into the ../modules directory. Install the
+ module through Admin -> System Module -> Modules.<br /> <br />
+ Detailed instructions on installing modules are available in the
+ <a href="http://goo.gl/adT2i">XOOPS Operations Manual</a><br /> <br />
+
+ This module makes use of plugins. Without plugins there will be nothing to see.
+ Available plugins are located at /mypoints/plugins. </p>
+
+
+ <h4 class="odd">Developing plugins</h4>
+
+ <p class="even">With a little effort you can adapt existing plugins to work with your module.
+ If you are a module developer you can include your plugins under yourmodule/include/mypoints.plugin.php
+ The plugin should also work for modules that use XOOPS_TRUST_PATH.<br /> <br />
+
+ You can send your plugin to lus...@gm... if you want me to add it to mypoints/plugins folder.<br /> <br /></p>
+
+ <h4 class="odd">Tutorial</h4>
+
+ <p class="even">There is no tutorial available at the moment.</p>
+
+</div>
\ No newline at end of file
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/index.html
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/index.html (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/help/index.html 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/index.html
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/index.html (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/index.html 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/main.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/main.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/main.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,36 @@
+<?php
+// Author: Trabis
+// URL: http://www.xuups.com
+// E-Mail: lus...@gm...
+define('_MA_MYPOINTS_TITLE','Title');
+define('_MA_MYPOINTS_TOPMESSAGE','The %s most active members of %s');
+define('_MA_MYPOINTS_USERTOPMESSAGE','Points earned by %s');
+define('_MA_MYPOINTS_UPDATEMESSAGE','All points are updated after %s %s');
+define('_MA_MYPOINTS_SINCEMESSAGE','Counting since : %s');
+
+define('_MA_MYPOINTS_LHOURS','hours');
+define('_MA_MYPOINTS_LHOUR','hour');
+define('_MA_MYPOINTS_LDAYS','days');
+define('_MA_MYPOINTS_LDAY','day');
+define('_MA_MYPOINTS_LMINUTES','minutes');
+define('_MA_MYPOINTS_LMINUTE','minute');
+define('_MA_MYPOINTS_LSECONDS','seconds');
+define('_MA_MYPOINTS_LSECOND','second');
+
+define('_MA_MYPOINTS_RANK','Rank');
+define('_MA_MYPOINTS_MEMBER','Member');
+define('_MA_MYPOINTS_TOTALPOINTS','Total points');
+define('_MA_MYPOINTS_MOREON','Details ON');
+define('_MA_MYPOINTS_MOREOFF','Details OFF');
+define('_MA_MYPOINTS_HOWEARNPOINTS','How can I earn Points?');
+
+define('_MA_MYPOINTS_PLUGIN','Plugin');
+define('_MA_MYPOINTS_ITEMS','Items');
+define('_MA_MYPOINTS_MULTI','Multiply');
+
+define('_MA_MYPOINTS_SVOTE','%s Vote');
+define('_MA_MYPOINTS_SSUBMISSION','%s Submission');
+
+define('_MA_MYPOINTS_LPOINT','point');
+define('_MA_MYPOINTS_LPOINTS','points');
+define('_MA_MYPOINTS_SPOINTS','Points');
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/main.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/modinfo.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/modinfo.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/modinfo.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,33 @@
+<?php
+// Author: Trabis
+// URL: http://www.xuups.com
+// E-Mail: lus...@gm...
+
+//general
+define("_MI_MYPOINTS_NAME","My points");
+define("_MI_MYPOINTS_DSC","Pluginable module that allows you to give your members points for each submission or vote");
+//blocks
+define("_MI_MYPOINTS_BNAME1","Members points");
+//admin menu
+define("_MI_MYPOINTS_ADMMENU1","Plugins");
+define("_MI_MYPOINTS_ADMMENU2","About");
+//menu
+define("_MI_MYPOINTS_SHOWALL","Top members");
+define("_MI_MYPOINTS_MYPOINTS","My points");
+//configs
+define("_MI_MYPOINTS_NAMEDISPLAY","Name display");
+define("_MI_MYPOINTS_NAMEDISPLAY_DSC","How would you like to display the members names?");
+define("_MI_MYPOINTS_DISPLAYNAME1","User name");
+define("_MI_MYPOINTS_DISPLAYNAME2","Real name");
+
+define("_MI_MYPOINTS_MEMBERSTOSHOW","Members to show");
+define("_MI_MYPOINTS_MEMBERSTOSHOW_DSC","How many members you want to show in the top list?");
+
+define("_MI_MYPOINTS_REFRESHTIME","Refresh time");
+define("_MI_MYPOINTS_REFRESHTIME_DSC","Time between points updates. Set this is seconds.");
+
+define("_MI_MYPOINTS_COUNTADMIN","Count point for admins");
+define("_MI_MYPOINTS_COUNTADMIN_DSC","Do you want to show admins in the top list?");
+
+define("_MI_MYPOINTS_COUNTSINCE","Count since");
+define("_MI_MYPOINTS_COUNTSINCE_DSC","Count points since this date.");
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/english/modinfo.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/index.html
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/index.html (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/language/index.html 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/mypoints.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/mypoints.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/mypoints.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,114 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Mypoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
+
+$uid = 0;
+
+if (is_object($xoopsUser) && $xoopsUser->getVar('uid') > 0) {
+ $uid = $xoopsUser->getVar('uid');
+ $thisUser =& $xoopsUser;
+}
+
+if (isset($_GET['uid'])) {
+ $getuid = intval($_GET['uid']);
+ $getUser = new xoopsUser($getuid);
+ if (is_object($getUser) && $getUser->isactive()) {
+ $uid = $getuid;
+ $thisUser =& $getUser;
+ } else {
+ $uid = 0;
+ }
+}
+
+if ($uid == 0) {
+ redirect_header(XOOPS_URL . '/modules/mypoints/index.php', 2, _NOPERM);
+ exit();
+}
+
+include_once XOOPS_ROOT_PATH . '/modules/mypoints/include/functions.php';
+
+$xoopsOption['template_main'] = 'mypoints_mypoints.tpl';
+include_once XOOPS_ROOT_PATH . '/header.php';
+
+$plugin_handler = xoops_getmodulehandler('plugin');
+$relation_handler = xoops_getmodulehandler('relation');
+$user_handler = xoops_getmodulehandler('user');
+
+$refreshtime = $xoopsModuleConfig['refreshtime'];
+$since = strtotime($xoopsModuleConfig['countsince']);
+$countwebm = $xoopsModuleConfig['countadmin'];
+$limit = $xoopsModuleConfig['memberstoshow'];
+
+$xoopsTpl->assign('topmessage', sprintf(_MA_MYPOINTS_USERTOPMESSAGE, $thisUser->getVar('uname')));
+
+if ($refreshtime < 60) {
+ $refreshtimes = $refreshtime ;
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LSECOND : _MA_MYPOINTS_LSECONDS;
+} elseif ($refreshtime < 3600) {
+ $refreshtimes = intval($refreshtime / 60);
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LMINUTE : _MA_MYPOINTS_LMINUTES;
+} elseif ($refreshtime < 86400) {
+ $refreshtimes = intval($refreshtime / 3600);
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LHOUR : _MA_MYPOINTS_LHOURS;
+} else {
+ $refreshtimes = intval($refreshtime / 86400);
+ $message = $refreshtimes == 1 ? _MA_MYPOINTS_LDAY : _MA_MYPOINTS_LDAYS;
+}
+
+$xoopsTpl->assign('updatemessage', sprintf(_MA_MYPOINTS_UPDATEMESSAGE, $refreshtimes, $message));
+$xoopsTpl->assign('sincemessage', sprintf(_MA_MYPOINTS_SINCEMESSAGE, formatTimeStamp($since, "m", $xoopsConfig['server_TZ'])));
+
+$criteria = new CriteriaCompo(new Criteria('pluginisactive', 1));
+$criteria->setSort('pluginmulti');
+$criteria->setOrder('DESC');
+$plugins = $plugin_handler->getObjects($criteria);
+unset($criteria);
+
+$user = $user_handler->get($uid);
+if (is_object($user)) {
+ $i = 0;
+ foreach ($plugins as $plugin) {
+ $relation = $relation_handler->getByPluginUid($plugin->getVar('pluginid'), $uid);
+ $points = is_object($relation) ? $relation->getVar('relationpoints') : 0;
+ $myuser['plugins'][$i]['items'] = $points;
+ $myuser['plugins'][$i]['points'] = $points * $plugin->getVar('pluginmulti');
+ $myuser['plugins'][$i]['name'] = $plugin->getVar('pluginname');
+ $myuser['plugins'][$i]['multi'] = $plugin->getVar('pluginmulti');
+ ++$i;
+ }
+ $myuser['points'] = $user->getVar('userpoints');
+} else {
+ $myuser['points'] = 0;
+}
+
+$xoopsTpl->assign('user', $myuser);
+
+$message = '';
+foreach ($plugins as $plugin) {
+ $message .= $plugin->getVar('pluginname').' : ';
+ $points = $plugin->getVar('pluginmulti') == 1 ? _MA_MYPOINTS_LPOINT : _MA_MYPOINTS_LPOINTS;
+ $message .= $plugin->getVar('pluginmulti') . ' ' . $points . '<br />';
+}
+
+$xoopsTpl->assign('howtoearnmessage', $message);
+mypoints_updatePoints();
+
+include_once XOOPS_ROOT_PATH . '/footer.php';
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/mypoints.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/arms.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/arms.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/arms.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function arms_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("arms_pages")." WHERE uid ='$uid' AND page_posttime > '$since'"));
+
+ return $ret;
+}
+
+function arms_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("arms_votelog")." WHERE uid ='$uid' AND vote_time > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/arms.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/forum.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/forum.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/forum.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,29 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function forum_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("bb_posts")." WHERE uid='$uid' AND post_time > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/forum.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/index.html
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/index.html (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/index.html 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/myalbum.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/myalbum.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/myalbum.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,29 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function myalbum_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("myalbum_photos")." WHERE submitter='$uid' AND status>0 AND date>'$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/myalbum.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mydownloads.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mydownloads.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mydownloads.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function mydownloads_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE (submitter ='$uid' AND date > '$since') AND status > '0'"));
+
+ return $ret;
+}
+
+function mydownloads_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE ratinguser ='$uid' AND ratingtimestamp > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mydownloads.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mylinks.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mylinks.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mylinks.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function mylinks_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE (submitter ='$uid' AND date > '$since') AND status > '0'"));
+
+ return $ret;
+}
+
+function mylinks_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE ratinguser ='$uid' AND ratingtimestamp > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/mylinks.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/newbb.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/newbb.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/newbb.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,29 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function newbb_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("bb_posts")." WHERE uid='$uid' AND post_time > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/newbb.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/news.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/news.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/news.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function news_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mod_news_stories")." WHERE (uid='$uid' AND published > '$since')"));
+
+ return $ret;
+}
+
+function news_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mod_news_stories_votedata")." WHERE ratinguser ='$uid' AND ratingtimestamp > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/news.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/publisher.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/publisher.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/publisher.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,29 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function publisher_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("publisher_items") . " WHERE uid='{$uid}' AND datesub > '$since' AND status = 2"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/publisher.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/system.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/system.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/system.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,29 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function system_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_uid='$uid' AND com_created > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/system.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/tutorials.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/tutorials.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/tutorials.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function tutorials_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tutorials")." WHERE (submitter ='$uid' AND date > '$since') AND status > '0'"));
+
+ return $ret;
+}
+
+function tutorials_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tutorials_votedata")." WHERE ratinguser ='$uid' AND ratingtimestamp > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/tutorials.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/webshow.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/webshow.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/webshow.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function webshow_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("webshow_links")." WHERE (submitter ='$uid' AND date > '$since') AND status > '0'"));
+
+ return $ret;
+}
+
+function webshow_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("webshow_votedata")." WHERE ratinguser ='$uid' AND ratingtimestamp > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/webshow.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/wfsections.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/wfsections.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/wfsections.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function wfsections_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("wfs_article")." WHERE uid ='$uid' AND (published > 0 AND published <= '$since') AND noshowart = 0 AND offline = '0'" ));
+
+ return $ret;
+}
+
+function wfsections_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("wfs_votedata")." WHERE ratinguser ='$uid' AND ratingtimestamp > '$since'"));
+
+ return $ret;
+}
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/wfsections.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/xoopstube.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/xoopstube.php (rev 0)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/mypoints/plugins/xoopstube.php 2014-04-26 01:09:03 UTC (rev 12507)
@@ -0,0 +1,37 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://www.xuups.com
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package MyPoints
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @version $Id$
+ */
+
+defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined");
+
+function xoopstube_useritems_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopstube_videos")." WHERE (submitter ='$uid' AND date > '$since') AND status > '0'"));
+
+ return $ret;
+}
+
+function xoopstube_uservotes_count($uid, $since)
+{
+ global $xoopsDB;
+ list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopstube_votedata")." WHERE ratinguser ='$...
[truncated message content] |