|
From: <be...@us...> - 2013-08-14 05:25:35
|
Revision: 11905
http://sourceforge.net/p/xoops/svn/11905
Author: beckmi
Date: 2013-08-14 05:25:33 +0000 (Wed, 14 Aug 2013)
Log Message:
-----------
Adding missing plugins
Added Paths:
-----------
XoopsModules/myalbum/trunk/htdocs/modules/sitemap/
XoopsModules/myalbum/trunk/htdocs/modules/sitemap/plugin/
XoopsModules/myalbum/trunk/htdocs/modules/sitemap/plugin/myalbum.php
XoopsModules/myalbum/trunk/htdocs/modules/tag/
XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/
XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum.php
XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum0.php
XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum1.php
XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum2.php
Added: XoopsModules/myalbum/trunk/htdocs/modules/sitemap/plugin/myalbum.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/sitemap/plugin/myalbum.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/sitemap/plugin/myalbum.php 2013-08-14 05:25:33 UTC (rev 11905)
@@ -0,0 +1,22 @@
+<?php
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+if( ! preg_match( '/^(\D+)(\d*)$/' , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ;
+$mydirnumber = $regs[2] === '' ? '' : intval( $regs[2] ) ;
+
+eval( '
+
+function b_sitemap_'.$mydirname.'(){
+ $xoopsDB =& Database::getInstance();
+
+ $block = sitemap_get_categoires_map($xoopsDB->prefix("myalbum'.$mydirnumber.'_cat"), "cid", "pid", "title", "viewcat.php?cid=", "title");
+
+ return $block;
+}
+
+' ) ;
+
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/sitemap/plugin/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/myalbum/trunk/htdocs/modules/tag/plugin/myalbum.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum.php 2013-08-14 05:25:33 UTC (rev 11905)
@@ -0,0 +1,112 @@
+<?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.
+*/
+
+/**
+ * XOOPS tag management module
+ *
+ * @copyright The XOOPS project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @since 1.0.0
+ * @author Taiwen Jiang <ph...@us...>
+ * @version $Id$
+ * @package tag
+ */
+if (!defined('XOOPS_ROOT_PATH')) { exit(); }
+
+/**
+ * Get item fields:
+ * title
+ * content
+ * time
+ * link
+ * uid
+ * uname
+ * tags
+ *
+ * @var array $items associative array of items: [modid][catid][itemid]
+ *
+ * @return boolean
+ *
+ */
+function myalbum_tag_iteminfo(&$items)
+{
+ if (empty($items) || !is_array($items)) {
+ return false;
+ }
+
+ $items_id = array();
+ foreach (array_keys($items) as $cat_id) {
+ // Some handling here to build the link upon catid
+ // catid is not used in myalbum, so just skip it
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ // In myalbum, the item_id is "topic_id"
+ $items_id[] = intval($item_id);
+ }
+ }
+ $item_handler =& xoops_getmodulehandler('photos', 'myalbum');
+ $text_handler =& xoops_getmodulehandler('text', 'myalbum');
+ $items_obj = $item_handler->getObjects(new Criteria("lid", "(" . implode(", ", $items_id) . ")", "IN"), true);
+
+ foreach (array_keys($items) as $cat_id) {
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ $item_obj =& $items_obj[$item_id];
+ $text = $text_handler->get($item_id);
+ $items[$cat_id][$item_id] = array(
+ "title" => $item_obj->getVar("title"),
+ "uid" => $item_obj->getVar("submitter"),
+ "link" => "photo.php?lid={$item_id}&cid=".$item_obj->getVar("cid"),
+ "time" => $item_obj->getVar("date"),
+ "tags" => tag_parse_tag($item_obj->getVar("tags", "n")),
+ "content" => $GLOBALS['myts']->displayTarea($text->getVar('description'),1,1,1,1,1,1),
+ );
+ }
+ }
+ unset($items_obj);
+}
+
+/**
+ * Remove orphan tag-item links
+ *
+ * @return boolean
+ *
+ */
+function myalbum_tag_synchronization($mid)
+{
+ $item_handler =& xoops_getmodulehandler("photos", "myalbum");
+ $link_handler =& xoops_getmodulehandler("link", "tag");
+
+ /* clear tag-item links */
+ if (version_compare( mysql_get_server_info(), "4.1.0", "ge" )):
+ $sql = " DELETE FROM {$link_handler->table}" .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( tag_itemid NOT IN " .
+ " ( SELECT DISTINCT {$item_handler->keyName} " .
+ " FROM {$item_handler->table} " .
+ " WHERE {$item_handler->table}.approved > 0" .
+ " ) " .
+ " )";
+ else:
+ $sql = " DELETE {$link_handler->table} FROM {$link_handler->table}" .
+ " LEFT JOIN {$item_handler->table} AS aa ON {$link_handler->table}.tag_itemid = aa.{$item_handler->keyName} " .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( aa.{$item_handler->keyName} IS NULL" .
+ " OR aa.approved < 1" .
+ " )";
+ endif;
+ if (!$result = $link_handler->db->queryF($sql)) {
+ //xoops_error($link_handler->db->error());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/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/myalbum/trunk/htdocs/modules/tag/plugin/myalbum0.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum0.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum0.php 2013-08-14 05:25:33 UTC (rev 11905)
@@ -0,0 +1,112 @@
+<?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.
+*/
+
+/**
+ * XOOPS tag management module
+ *
+ * @copyright The XOOPS project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @since 1.0.0
+ * @author Taiwen Jiang <ph...@us...>
+ * @version $Id$
+ * @package tag
+ */
+if (!defined('XOOPS_ROOT_PATH')) { exit(); }
+
+/**
+ * Get item fields:
+ * title
+ * content
+ * time
+ * link
+ * uid
+ * uname
+ * tags
+ *
+ * @var array $items associative array of items: [modid][catid][itemid]
+ *
+ * @return boolean
+ *
+ */
+function myalbum0_tag_iteminfo(&$items)
+{
+ if (empty($items) || !is_array($items)) {
+ return false;
+ }
+
+ $items_id = array();
+ foreach (array_keys($items) as $cat_id) {
+ // Some handling here to build the link upon catid
+ // catid is not used in myalbum0, so just skip it
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ // In myalbum0, the item_id is "topic_id"
+ $items_id[] = intval($item_id);
+ }
+ }
+ $item_handler =& xoops_getmodulehandler('photos', 'myalbum0');
+ $text_handler =& xoops_getmodulehandler('text', 'myalbum0');
+ $items_obj = $item_handler->getObjects(new Criteria("lid", "(" . implode(", ", $items_id) . ")", "IN"), true);
+
+ foreach (array_keys($items) as $cat_id) {
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ $item_obj =& $items_obj[$item_id];
+ $text = $text_handler->get($item_id);
+ $items[$cat_id][$item_id] = array(
+ "title" => $item_obj->getVar("title"),
+ "uid" => $item_obj->getVar("submitter"),
+ "link" => "photo.php?lid={$item_id}&cid=".$item_obj->getVar("cid"),
+ "time" => $item_obj->getVar("date"),
+ "tags" => tag_parse_tag($item_obj->getVar("tags", "n")),
+ "content" => $GLOBALS['myts']->displayTarea($text->getVar('description'),1,1,1,1,1,1),
+ );
+ }
+ }
+ unset($items_obj);
+}
+
+/**
+ * Remove orphan tag-item links
+ *
+ * @return boolean
+ *
+ */
+function myalbum0_tag_synchronization($mid)
+{
+ $item_handler =& xoops_getmodulehandler("photos", "myalbum0");
+ $link_handler =& xoops_getmodulehandler("link", "tag");
+
+ /* clear tag-item links */
+ if (version_compare( mysql_get_server_info(), "4.1.0", "ge" )):
+ $sql = " DELETE FROM {$link_handler->table}" .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( tag_itemid NOT IN " .
+ " ( SELECT DISTINCT {$item_handler->keyName} " .
+ " FROM {$item_handler->table} " .
+ " WHERE {$item_handler->table}.approved > 0" .
+ " ) " .
+ " )";
+ else:
+ $sql = " DELETE {$link_handler->table} FROM {$link_handler->table}" .
+ " LEFT JOIN {$item_handler->table} AS aa ON {$link_handler->table}.tag_itemid = aa.{$item_handler->keyName} " .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( aa.{$item_handler->keyName} IS NULL" .
+ " OR aa.approved < 1" .
+ " )";
+ endif;
+ if (!$result = $link_handler->db->queryF($sql)) {
+ //xoops_error($link_handler->db->error());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum0.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/myalbum/trunk/htdocs/modules/tag/plugin/myalbum1.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum1.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum1.php 2013-08-14 05:25:33 UTC (rev 11905)
@@ -0,0 +1,112 @@
+<?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.
+*/
+
+/**
+ * XOOPS tag management module
+ *
+ * @copyright The XOOPS project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @since 1.0.0
+ * @author Taiwen Jiang <ph...@us...>
+ * @version $Id$
+ * @package tag
+ */
+if (!defined('XOOPS_ROOT_PATH')) { exit(); }
+
+/**
+ * Get item fields:
+ * title
+ * content
+ * time
+ * link
+ * uid
+ * uname
+ * tags
+ *
+ * @var array $items associative array of items: [modid][catid][itemid]
+ *
+ * @return boolean
+ *
+ */
+function myalbum1_tag_iteminfo(&$items)
+{
+ if (empty($items) || !is_array($items)) {
+ return false;
+ }
+
+ $items_id = array();
+ foreach (array_keys($items) as $cat_id) {
+ // Some handling here to build the link upon catid
+ // catid is not used in myalbum1, so just skip it
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ // In myalbum1, the item_id is "topic_id"
+ $items_id[] = intval($item_id);
+ }
+ }
+ $item_handler =& xoops_getmodulehandler('photos', 'myalbum1');
+ $text_handler =& xoops_getmodulehandler('text', 'myalbum1');
+ $items_obj = $item_handler->getObjects(new Criteria("lid", "(" . implode(", ", $items_id) . ")", "IN"), true);
+
+ foreach (array_keys($items) as $cat_id) {
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ $item_obj =& $items_obj[$item_id];
+ $text = $text_handler->get($item_id);
+ $items[$cat_id][$item_id] = array(
+ "title" => $item_obj->getVar("title"),
+ "uid" => $item_obj->getVar("submitter"),
+ "link" => "photo.php?lid={$item_id}&cid=".$item_obj->getVar("cid"),
+ "time" => $item_obj->getVar("date"),
+ "tags" => tag_parse_tag($item_obj->getVar("tags", "n")),
+ "content" => $GLOBALS['myts']->displayTarea($text->getVar('description'),1,1,1,1,1,1),
+ );
+ }
+ }
+ unset($items_obj);
+}
+
+/**
+ * Remove orphan tag-item links
+ *
+ * @return boolean
+ *
+ */
+function myalbum1_tag_synchronization($mid)
+{
+ $item_handler =& xoops_getmodulehandler("photos", "myalbum1");
+ $link_handler =& xoops_getmodulehandler("link", "tag");
+
+ /* clear tag-item links */
+ if (version_compare( mysql_get_server_info(), "4.1.0", "ge" )):
+ $sql = " DELETE FROM {$link_handler->table}" .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( tag_itemid NOT IN " .
+ " ( SELECT DISTINCT {$item_handler->keyName} " .
+ " FROM {$item_handler->table} " .
+ " WHERE {$item_handler->table}.approved > 0" .
+ " ) " .
+ " )";
+ else:
+ $sql = " DELETE {$link_handler->table} FROM {$link_handler->table}" .
+ " LEFT JOIN {$item_handler->table} AS aa ON {$link_handler->table}.tag_itemid = aa.{$item_handler->keyName} " .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( aa.{$item_handler->keyName} IS NULL" .
+ " OR aa.approved < 1" .
+ " )";
+ endif;
+ if (!$result = $link_handler->db->queryF($sql)) {
+ //xoops_error($link_handler->db->error());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum1.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/myalbum/trunk/htdocs/modules/tag/plugin/myalbum2.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum2.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum2.php 2013-08-14 05:25:33 UTC (rev 11905)
@@ -0,0 +1,112 @@
+<?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.
+*/
+
+/**
+ * XOOPS tag management module
+ *
+ * @copyright The XOOPS project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @since 1.0.0
+ * @author Taiwen Jiang <ph...@us...>
+ * @version $Id$
+ * @package tag
+ */
+if (!defined('XOOPS_ROOT_PATH')) { exit(); }
+
+/**
+ * Get item fields:
+ * title
+ * content
+ * time
+ * link
+ * uid
+ * uname
+ * tags
+ *
+ * @var array $items associative array of items: [modid][catid][itemid]
+ *
+ * @return boolean
+ *
+ */
+function myalbum2_tag_iteminfo(&$items)
+{
+ if (empty($items) || !is_array($items)) {
+ return false;
+ }
+
+ $items_id = array();
+ foreach (array_keys($items) as $cat_id) {
+ // Some handling here to build the link upon catid
+ // catid is not used in myalbum2, so just skip it
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ // In myalbum2, the item_id is "topic_id"
+ $items_id[] = intval($item_id);
+ }
+ }
+ $item_handler =& xoops_getmodulehandler('photos', 'myalbum2');
+ $text_handler =& xoops_getmodulehandler('text', 'myalbum2');
+ $items_obj = $item_handler->getObjects(new Criteria("lid", "(" . implode(", ", $items_id) . ")", "IN"), true);
+
+ foreach (array_keys($items) as $cat_id) {
+ foreach (array_keys($items[$cat_id]) as $item_id) {
+ $item_obj =& $items_obj[$item_id];
+ $text = $text_handler->get($item_id);
+ $items[$cat_id][$item_id] = array(
+ "title" => $item_obj->getVar("title"),
+ "uid" => $item_obj->getVar("submitter"),
+ "link" => "photo.php?lid={$item_id}&cid=".$item_obj->getVar("cid"),
+ "time" => $item_obj->getVar("date"),
+ "tags" => tag_parse_tag($item_obj->getVar("tags", "n")),
+ "content" => $GLOBALS['myts']->displayTarea($text->getVar('description'),1,1,1,1,1,1),
+ );
+ }
+ }
+ unset($items_obj);
+}
+
+/**
+ * Remove orphan tag-item links
+ *
+ * @return boolean
+ *
+ */
+function myalbum2_tag_synchronization($mid)
+{
+ $item_handler =& xoops_getmodulehandler("photos", "myalbum2");
+ $link_handler =& xoops_getmodulehandler("link", "tag");
+
+ /* clear tag-item links */
+ if (version_compare( mysql_get_server_info(), "4.1.0", "ge" )):
+ $sql = " DELETE FROM {$link_handler->table}" .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( tag_itemid NOT IN " .
+ " ( SELECT DISTINCT {$item_handler->keyName} " .
+ " FROM {$item_handler->table} " .
+ " WHERE {$item_handler->table}.approved > 0" .
+ " ) " .
+ " )";
+ else:
+ $sql = " DELETE {$link_handler->table} FROM {$link_handler->table}" .
+ " LEFT JOIN {$item_handler->table} AS aa ON {$link_handler->table}.tag_itemid = aa.{$item_handler->keyName} " .
+ " WHERE " .
+ " tag_modid = {$mid}" .
+ " AND " .
+ " ( aa.{$item_handler->keyName} IS NULL" .
+ " OR aa.approved < 1" .
+ " )";
+ endif;
+ if (!$result = $link_handler->db->queryF($sql)) {
+ //xoops_error($link_handler->db->error());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/tag/plugin/myalbum2.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
|