|
From: <be...@us...> - 2012-01-18 01:38:26
|
Revision: 8747
http://xoops.svn.sourceforge.net/xoops/?rev=8747&view=rev
Author: beckmi
Date: 2012-01-18 01:38:16 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
Adjusting folder structure
Added Paths:
-----------
XoopsModules/newbb/branches/alfred/newbb/_htaccess
XoopsModules/newbb/branches/alfred/newbb/action.post.php
XoopsModules/newbb/branches/alfred/newbb/action.topic.php
XoopsModules/newbb/branches/alfred/newbb/admin/
XoopsModules/newbb/branches/alfred/newbb/blocks/
XoopsModules/newbb/branches/alfred/newbb/class/
XoopsModules/newbb/branches/alfred/newbb/delete.php
XoopsModules/newbb/branches/alfred/newbb/digest.php
XoopsModules/newbb/branches/alfred/newbb/dl_attachment.php
XoopsModules/newbb/branches/alfred/newbb/docs/
XoopsModules/newbb/branches/alfred/newbb/edit.php
XoopsModules/newbb/branches/alfred/newbb/header.php
XoopsModules/newbb/branches/alfred/newbb/images/
XoopsModules/newbb/branches/alfred/newbb/include/
XoopsModules/newbb/branches/alfred/newbb/index.php
XoopsModules/newbb/branches/alfred/newbb/language/
XoopsModules/newbb/branches/alfred/newbb/list.tag.php
XoopsModules/newbb/branches/alfred/newbb/list.topic.php
XoopsModules/newbb/branches/alfred/newbb/makepdf.php
XoopsModules/newbb/branches/alfred/newbb/moderate.php
XoopsModules/newbb/branches/alfred/newbb/newtopic.php
XoopsModules/newbb/branches/alfred/newbb/notification_update.php
XoopsModules/newbb/branches/alfred/newbb/polls.php
XoopsModules/newbb/branches/alfred/newbb/post.php
XoopsModules/newbb/branches/alfred/newbb/print.php
XoopsModules/newbb/branches/alfred/newbb/ratethread.php
XoopsModules/newbb/branches/alfred/newbb/reply.php
XoopsModules/newbb/branches/alfred/newbb/report.php
XoopsModules/newbb/branches/alfred/newbb/rss.php
XoopsModules/newbb/branches/alfred/newbb/search.php
XoopsModules/newbb/branches/alfred/newbb/seo.php
XoopsModules/newbb/branches/alfred/newbb/seo_url.php
XoopsModules/newbb/branches/alfred/newbb/sql/
XoopsModules/newbb/branches/alfred/newbb/templates/
XoopsModules/newbb/branches/alfred/newbb/topicmanager.php
XoopsModules/newbb/branches/alfred/newbb/update_type.php
XoopsModules/newbb/branches/alfred/newbb/view.tag.php
XoopsModules/newbb/branches/alfred/newbb/viewforum.php
XoopsModules/newbb/branches/alfred/newbb/viewpost.php
XoopsModules/newbb/branches/alfred/newbb/viewtopic.php
XoopsModules/newbb/branches/alfred/newbb/votepolls.php
XoopsModules/newbb/branches/alfred/newbb/xoops_version.php
Removed Paths:
-------------
XoopsModules/newbb/branches/alfred/_htaccess
XoopsModules/newbb/branches/alfred/action.post.php
XoopsModules/newbb/branches/alfred/action.topic.php
XoopsModules/newbb/branches/alfred/admin/
XoopsModules/newbb/branches/alfred/blocks/
XoopsModules/newbb/branches/alfred/class/
XoopsModules/newbb/branches/alfred/delete.php
XoopsModules/newbb/branches/alfred/digest.php
XoopsModules/newbb/branches/alfred/dl_attachment.php
XoopsModules/newbb/branches/alfred/docs/
XoopsModules/newbb/branches/alfred/edit.php
XoopsModules/newbb/branches/alfred/header.php
XoopsModules/newbb/branches/alfred/images/
XoopsModules/newbb/branches/alfred/include/
XoopsModules/newbb/branches/alfred/index.php
XoopsModules/newbb/branches/alfred/language/
XoopsModules/newbb/branches/alfred/list.tag.php
XoopsModules/newbb/branches/alfred/list.topic.php
XoopsModules/newbb/branches/alfred/makepdf.php
XoopsModules/newbb/branches/alfred/moderate.php
XoopsModules/newbb/branches/alfred/newtopic.php
XoopsModules/newbb/branches/alfred/notification_update.php
XoopsModules/newbb/branches/alfred/polls.php
XoopsModules/newbb/branches/alfred/post.php
XoopsModules/newbb/branches/alfred/print.php
XoopsModules/newbb/branches/alfred/ratethread.php
XoopsModules/newbb/branches/alfred/reply.php
XoopsModules/newbb/branches/alfred/report.php
XoopsModules/newbb/branches/alfred/rss.php
XoopsModules/newbb/branches/alfred/search.php
XoopsModules/newbb/branches/alfred/seo.php
XoopsModules/newbb/branches/alfred/seo_url.php
XoopsModules/newbb/branches/alfred/sql/
XoopsModules/newbb/branches/alfred/templates/
XoopsModules/newbb/branches/alfred/topicmanager.php
XoopsModules/newbb/branches/alfred/update_type.php
XoopsModules/newbb/branches/alfred/view.tag.php
XoopsModules/newbb/branches/alfred/viewforum.php
XoopsModules/newbb/branches/alfred/viewpost.php
XoopsModules/newbb/branches/alfred/viewtopic.php
XoopsModules/newbb/branches/alfred/votepolls.php
XoopsModules/newbb/branches/alfred/xoops_version.php
Deleted: XoopsModules/newbb/branches/alfred/_htaccess
===================================================================
--- XoopsModules/newbb/branches/alfred/_htaccess 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/_htaccess 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,3 +0,0 @@
-RewriteEngine on
-RewriteRule ^([a-z]+)-([0-9]+)(/(.+))? seo.php?seoOp=$1&seoArg=$2&seoOther=$4&%{QUERY_STRING} [L]
-RewriteRule ^(.*)$ $1 [L]
Deleted: XoopsModules/newbb/branches/alfred/action.post.php
===================================================================
--- XoopsModules/newbb/branches/alfred/action.post.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/action.post.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,212 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-include_once dirname(__FILE__) . "/header.php";
-
-$topic_id = isset($_POST['topic_id']) ? intval($_POST['topic_id']) : 0;
-$post_id = !empty($_GET['post_id']) ? intval($_GET['post_id']) : 0;
-$post_id = !empty($_POST['post_id']) ? $_POST['post_id'] : $post_id;
-$uid = !empty($_POST['uid']) ? $_POST['uid'] : 0;
-$op = !empty($_GET['op']) ? $_GET['op'] : (!empty($_POST['op']) ? $_POST['op']:"");
-$op = in_array($op, array("approve", "delete", "restore", "split"))? $op : "";
-$mode = !empty($_GET['mode']) ? intval($_GET['mode']) : 1;
-
-if ( empty($post_id) || empty($op)) {
- redirect_header("javascript:history.go(-1);", 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-
-
-$post_handler =& xoops_getmodulehandler('post', 'newbb');
-$topic_handler =& xoops_getmodulehandler('topic', 'newbb');
-$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
-if (empty($topic_id)) {
- $forum_obj = null;
-} else {
- $topic_obj =& $topic_handler->get($topic_id);
- $forum_id = $topic_obj->getVar('forum_id');
- $forum_obj =& $forum_handler->get($forum_id);
-}
-$isadmin = newbb_isAdmin($forum_obj);
-
-if (!$isadmin) {
- redirect_header("index.php", 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-
-switch($op) {
- case "restore":
- $post_id = array_values($post_id);
- sort($post_id);
- $topics = array();
- $forums = array();
- foreach ($post_id as $post) {
- $post_obj =& $post_handler->get($post);
- if ($post_obj->getVar("topic_id")<1) continue;
- $post_handler->approve($post_obj,true);
- $topics[$post_obj->getVar("topic_id")] =1;
- $forums[$post_obj->getVar("forum_id")] =1;
- unset($post_obj);
- }
- foreach (array_keys($topics) as $topic) {
- $topic_handler->synchronization($topic);
- }
- foreach (array_keys($forums) as $forum) {
- $forum_handler->synchronization($forum);
- }
- break;
- case "approve":
- $post_id = array_values($post_id);
- sort($post_id);
- $topics=array();
- $forums=array();
- $criteria = new Criteria("post_id", "(".implode(",", $post_id).")", "IN");
- $posts_obj =& $post_handler->getObjects($criteria, true);
- foreach ($post_id as $post) {
- $post_obj =& $posts_obj[$post];
- if (!empty($topic_id) && $topic_id!=$post_obj->getVar("topic_id")) continue;
- $post_handler->approve($post_obj);
- $topics[$post_obj->getVar("topic_id")] = $post;
- $forums[$post_obj->getVar("forum_id")] = 1;
- }
- foreach (array_keys($topics) as $topic) {
- $topic_handler->synchronization($topic);
- }
- foreach (array_keys($forums) as $forum) {
- $forum_handler->synchronization($forum);
- }
-
- if (empty($xoopsModuleConfig['notification_enabled'])) break;
-
- $criteria_topic = new Criteria("topic_id", "(".implode(",", array_keys($topics)).")", "IN");
- $topic_list =& $topic_handler->getList($criteria_topic, true);
-
- $criteria_forum = new Criteria("forum_id", "(".implode(",", array_keys($forums)).")", "IN");
- $forum_list =& $forum_handler->getList($criteria_forum);
-
- include_once 'include/notification.inc.php';
- $notification_handler =& xoops_gethandler('notification');
- foreach ($post_id as $post) {
- $tags = array();
- $tags['THREAD_NAME'] = $topic_list[$posts_obj[$post]->getVar("topic_id")];
- $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $posts_obj[$post]->getVar("topic_id").'&forum=' . $posts_obj[$post]->getVar('forum_id');
- $tags['FORUM_NAME'] = $forum_list[$posts_obj[$post]->getVar('forum_id')];
- $tags['FORUM_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewforum.php?forum=' . $posts_obj[$post]->getVar('forum_id');
- $tags['POST_URL'] = $tags['THREAD_URL'].'#forumpost' . $post;
- $notification_handler->triggerEvent('thread', $posts_obj[$post]->getVar("topic_id"), 'new_post', $tags);
- $notification_handler->triggerEvent('forum', $posts_obj[$post]->getVar('forum_id'), 'new_post', $tags);
- $notification_handler->triggerEvent('global', 0, 'new_post', $tags);
- $tags['POST_CONTENT'] = $posts_obj[$post]->getVar("post_text");
- $tags['POST_NAME'] = $posts_obj[$post]->getVar("subject");
- $notification_handler->triggerEvent('global', 0, 'new_fullpost', $tags);
- $notification_handler->triggerEvent('forum', $posts_obj[$post]->getVar('forum_id'), 'new_fullpost', $tags);
- }
- break;
- case "delete":
- $post_id = array_values($post_id);
- rsort($post_id);
- $topics=array();
- $forums=array();
- foreach ($post_id as $post) {
- $post_obj =& $post_handler->get($post);
- if (!empty($topic_id) && $topic_id != $post_obj->getVar("topic_id")) continue;
- $topics[$post_obj->getVar("topic_id")] = 1;
- $forums[$post_obj->getVar("forum_id")] = 1;
- $post_handler->delete($post_obj,true);
- unset($post_obj);
- }
- foreach (array_keys($topics) as $topic) {
- $topic_handler->synchronization($topic);
- }
- foreach (array_keys($forums) as $forum) {
- $forum_handler->synchronization($forum);
- }
- break;
- case "split":
- $post_obj =& $post_handler->get($post_id);
- if (empty($post_id) || $post_obj->isTopic()) {
- break;
- }
- $topic_id = $post_obj->getVar("topic_id");
-
- $newtopic =& $topic_handler->create();
- $newtopic->setVar("topic_title", $post_obj->getVar("subject"), true);
- $newtopic->setVar("topic_poster", $post_obj->getVar("uid"), true);
- $newtopic->setVar("forum_id", $post_obj->getVar("forum_id"), true);
- $newtopic->setVar("topic_time", $post_obj->getVar("post_time"), true);
- $newtopic->setVar("poster_name", $post_obj->getVar("poster_name"), true);
- $newtopic->setVar("approved", 1, true);
- $topic_handler->insert($newtopic, true);
- $new_topic_id = $newtopic->getVar('topic_id');
-
- $pid = $post_obj->getVar("pid");
-
- $post_obj->setVar("topic_id", $new_topic_id, true);
- $post_obj->setVar("pid", 0, true);
- $post_handler->insert($post_obj);
-
- /* split a single post */
- if ($mode==1) {
- $criteria = new CriteriaCompo(new Criteria("topic_id", $topic_id));
- $criteria->add(new Criteria('pid',$post_id));
- $post_handler->updateAll("pid", $pid, $criteria, true);
- /* split a post and its children posts */
- } elseif ($mode==2) {
- include_once(XOOPS_ROOT_PATH . "/class/xoopstree.php");
- $mytree = new XoopsTree($xoopsDB->prefix("bb_posts"), "post_id", "pid");
- $posts = $mytree->getAllChildId($post_id);
- if (count($posts)>0) {
- $criteria = new Criteria('post_id', "(".implode(",", $posts).")", "IN");
- $post_handler->updateAll("topic_id", $new_topic_id, $criteria, true);
- }
- /* split a post and all posts coming after */
- } elseif ($mode==3) {
- $criteria = new CriteriaCompo(new Criteria("topic_id", $topic_id));
- $criteria->add(new Criteria('post_id',$post_id, ">"));
- $post_handler->updateAll("topic_id", $new_topic_id, $criteria, true);
-
- unset($criteria);
- $criteria = new CriteriaCompo(new Criteria("topic_id", $new_topic_id));
- $criteria->add(new Criteria('post_id',$post_id, ">"));
- $post_handler->identifierName = "pid";
- $posts = $post_handler->getList($criteria);
-
- unset($criteria);
- $post_update = array();
- foreach ($posts as $postid=>$pid) {
- if (!in_array($pid, array_keys($posts))) {
- $post_update[] = $pid;
- }
- }
- if (count($post_update)) {
- $criteria = new Criteria('post_id', "(".implode(",", $post_update).")", "IN");
- $post_handler->updateAll("pid", $post_id, $criteria, true);
- }
- }
-
- $forum_id = $post_obj->getVar("forum_id");
- $topic_handler->synchronization($topic_id);
- $topic_handler->synchronization($new_topic_id);
- $sql = sprintf("UPDATE %s SET forum_topics = forum_topics+1 WHERE forum_id = %u", $xoopsDB->prefix("bb_forums"), $forum_id);
- $result = $xoopsDB->queryF($sql);
-
- break;
-}
-if (!empty($topic_id)) {
- redirect_header("viewtopic.php?topic_id=$topic_id", 2, _MD_DBUPDATED);
-} elseif (!empty($forum_id)) {
- redirect_header("viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED);
-} else {
- redirect_header("viewpost.php?uid=$uid", 2, _MD_DBUPDATED);
-}
-
-include XOOPS_ROOT_PATH.'/footer.php';
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/action.topic.php
===================================================================
--- XoopsModules/newbb/branches/alfred/action.topic.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/action.topic.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,175 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-include_once dirname(__FILE__) . "/header.php";
-
-$forum_id = isset($_POST['forum_id']) ? intval($_POST['forum_id']) : 0;
-$topic_id = !empty($_POST['topic_id']) ? $_POST['topic_id'] : null;
-$op = !empty($_POST['op']) ? $_POST['op']:"";
-$op = in_array($op, array("approve", "delete", "restore", "move"))? $op : "";
-
-
-if ( empty($topic_id) || empty($op)) {
- redirect_header("javascript:history.go(-1);", 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-
-$topic_id = array_values($topic_id);
-$topic_handler =& xoops_getmodulehandler('topic', 'newbb');
-$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
-
-$isadmin = newbb_isAdmin($forum_id);
-
-if (!$isadmin) {
- redirect_header("index.php", 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-switch($op) {
- case "restore":
- $forums = array();
- $topics_obj =& $topic_handler->getAll(new Criteria("topic_id", "(".implode(",", $topic_id).")", "IN"));
- foreach (array_keys($topics_obj) as $id) {
- $topic_obj =& $topics_obj[$id];
- $topic_handler->approve($topic_obj);
- $topic_handler->synchronization($topic_obj);
- $forums[$topic_obj->getVar("forum_id")] = 1;
- }
- $criteria_forum = new Criteria("forum_id", "(".implode(",", array_keys($forums)).")", "IN");
- $forums_obj =& $forum_handler->getAll($criteria_forum);
- foreach (array_keys($forums_obj) as $id) {
- $forum_handler->synchronization($forums_obj[$id]);
- }
- unset($topics_obj, $forums_obj);
- break;
- case "approve":
- $forums = array();
- $topics_obj =& $topic_handler->getAll(new Criteria("topic_id", "(".implode(",", $topic_id).")", "IN"));
- foreach (array_keys($topics_obj) as $id) {
- $topic_obj =& $topics_obj[$id];
- $topic_handler->approve($topic_obj);
- $topic_handler->synchronization($topic_obj);
- $forums[$topic_obj->getVar("forum_id")] = 1;
- }
-
- $criteria_forum = new Criteria("forum_id", "(".implode(",", array_keys($forums)).")", "IN");
- $forums_obj =& $forum_handler->getAll($criteria_forum);
- foreach (array_keys($forums_obj) as $id) {
- $forum_handler->synchronization($forums_obj[$id]);
- }
-
- if (empty($xoopsModuleConfig['notification_enabled'])) break;
-
- include_once 'include/notification.inc.php';
- $notification_handler =& xoops_gethandler('notification');
- foreach (array_keys($topics_obj) as $id) {
- $topic_obj =& $topics_obj[$id];
- $tags = array();
- $tags['THREAD_NAME'] = $topic_obj->getVar("topic_title");
- $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewtopic.php?topic_id=' . $id.'&forum=' . $topic_obj->getVar('forum_id');
- $tags['FORUM_NAME'] = $forums_obj[$topic_obj->getVar("forum_id")]->getVar("forum_name");
- $tags['FORUM_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewforum.php?forum=' . $topic_obj->getVar('forum_id');
- $notification_handler->triggerEvent('global', 0, 'new_thread', $tags);
- $notification_handler->triggerEvent('forum', $topic_obj->getVar('forum_id'), 'new_thread', $tags);
- $post_obj =& $topic_handler->getTopPost($id);
- $tags['POST_URL'] = $tags['THREAD_URL'].'#forumpost' . $post_obj->getVar("post_id");
- $notification_handler->triggerEvent('thread', $id, 'new_post', $tags);
- $notification_handler->triggerEvent('forum', $topic_obj->getVar('forum_id'), 'new_post', $tags);
- $notification_handler->triggerEvent('global', 0, 'new_post', $tags);
- $tags['POST_CONTENT'] = $post_obj->getVar("post_text");
- $tags['POST_NAME'] = $post_obj->getVar("subject");
- $notification_handler->triggerEvent('global', 0, 'new_fullpost', $tags);
- $notification_handler->triggerEvent('forum', $topic_obj->getVar('forum_id'), 'new_fullpost', $tags);
- unset($post_obj);
- }
- unset($topics_obj, $forums_obj);
- break;
- case "delete":
- $forums = array();
- $topics_obj =& $topic_handler->getAll(new Criteria("topic_id", "(".implode(",", $topic_id).")", "IN"));
- foreach (array_keys($topics_obj) as $id) {
- $topic_obj =& $topics_obj[$id];
- $topic_handler->delete($topic_obj,true);
- $topic_handler->synchronization($topic_obj);
- $forums[$topic_obj->getVar("forum_id")] = 1;
- }
-
- $criteria_forum = new Criteria("forum_id", "(".implode(",", array_keys($forums)).")", "IN");
- $forums_obj =& $forum_handler->getAll($criteria_forum);
- foreach (array_keys($forums_obj) as $id) {
- $forum_handler->synchronization($forums_obj[$id]);
- }
- $stats_handler = xoops_getmodulehandler('stats', 'newbb');
- $stats_handler->reset();
- unset($topics_obj, $forums_obj);
- break;
- case "move":
- if (!empty($_POST["newforum"]) && $_POST["newforum"] != $forum_id
- && $forum_handler->getPermission($_POST["newforum"], 'post')
- ) {
- $criteria = new Criteria('topic_id', "(".implode(",", $topic_id).")", "IN");
- $post_handler =& xoops_getmodulehandler('post', 'newbb');
- $post_handler->updateAll("forum_id", intval($_POST["newforum"]), $criteria, true);
- $topic_handler->updateAll("forum_id", intval($_POST["newforum"]), $criteria, true);
- $forum_handler->synchronization($_POST["newforum"]);
- $forum_handler->synchronization($forum_id);
- } else {
- include XOOPS_ROOT_PATH."/header.php";
- $category_handler =& xoops_getmodulehandler('category', 'newbb');
- $categories = $category_handler->getByPermission('access');
- $forums = $forum_handler->getForumsByCategory(array_keys($categories), 'post', false);
-
- $box = '<select name="newforum" size="1">';
- if (count($categories)>0 && count($forums)>0) {
- foreach (array_keys($forums) as $key) {
- $box .= "<option value='-1'>[".$categories[$key]->getVar('cat_title')."]</option>";
- foreach ($forums[$key] as $forumid=>$_forum) {
- $box .= "<option value='".$forumid."'>-- ".$_forum['title']."</option>";
- if ( !isset($_forum["sub"])) continue;
- foreach (array_keys($_forum["sub"]) as $fid) {
- $box .= "<option value='".$fid."'>---- ".$_forum["sub"][$fid]['title']."</option>";
- }
- }
- }
- } else {
- $box .= "<option value='-1'>"._MD_NOFORUMINDB."</option>";
- }
- $box .="</select>";
- unset($forums, $categories);
-
- echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>";
- echo "<table border='0' cellpadding='1' cellspacing='0' align='center' width='95%'>";
- echo "<tr><td class='bg2'>";
- echo "<table border='0' cellpadding='1' cellspacing='1' width='100%'>";
- echo '<tr><td class="bg3">'._MD_MOVETOPICTO.'</td><td class="bg1">';
- echo $box;
- echo '</td></tr>';
- echo '<tr class="bg3"><td colspan="2" align="center">';
- echo "<input type='hidden' name='op' value='move' />";
- echo "<input type='hidden' name='forum_id' value='{$forum_id}' />";
- foreach ($topic_id as $id) {
- echo "<input type='hidden' name='topic_id[]' value='".$id."' />";
- }
- echo "<input type='submit' name='submit' value='". _SUBMIT."' />";
- echo "</td></tr></table></td></tr></table>";
- echo "</form>";
- include XOOPS_ROOT_PATH.'/footer.php';
- exit();
- }
- break;
-}
-if (empty($forum_id)) {
- redirect_header("list.topic.php", 2, _MD_DBUPDATED);
-} else {
- redirect_header("viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED);
-}
-
-include XOOPS_ROOT_PATH.'/footer.php';
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/delete.php
===================================================================
--- XoopsModules/newbb/branches/alfred/delete.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/delete.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,140 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-
-include_once dirname(__FILE__) . "/header.php";
-
-$ok = isset($_POST['ok']) ? intval($_POST['ok']) : 0;
-foreach (array('forum', 'topic_id', 'post_id', 'order', 'pid', 'act') as $getint) {
- ${$getint} = isset($_POST[$getint]) ? intval($_POST[$getint]) : 0;
-}
-foreach (array('forum', 'topic_id', 'post_id', 'order', 'pid', 'act') as $getint) {
- ${$getint} = (${$getint})?${$getint}:(isset($_GET[$getint]) ? intval($_GET[$getint]) : 0);
-}
-$viewmode = (isset($_GET['viewmode']) && $_GET['viewmode'] != 'flat') ? 'thread' : 'flat';
-$viewmode = ($viewmode)?$viewmode: (isset($_POST['viewmode'])?$_POST['viewmode'] : 'flat');
-
-$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
-$topic_handler =& xoops_getmodulehandler('topic', 'newbb');
-$post_handler =& xoops_getmodulehandler('post', 'newbb');
-
-if ( !empty($post_id) ) {
- $topic =& $topic_handler->getByPost($post_id);
-} else {
- $topic =& $topic_handler->get($topic_id);
-}
-$topic_id = $topic->getVar('topic_id');
-if ( !$topic_id ) {
- $redirect = empty($forum)?"index.php":'viewforum.php?forum='.$forum;
- redirect_header($redirect, 2, _MD_ERRORTOPIC);
- exit();
-}
-
-$forum = $topic->getVar('forum_id');
-$forum_obj =& $forum_handler->get($forum);
-if (!$forum_handler->getPermission($forum_obj)) {
- redirect_header("index.php", 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-
-$isadmin = newbb_isAdmin($forum_obj);
-$uid = is_object($xoopsUser)? $xoopsUser->getVar('uid'):0;
-
-$post_obj =& $post_handler->get($post_id);
-$topic_status = $topic->getVar('topic_status');
-if ( $topic_handler->getPermission($topic->getVar("forum_id"), $topic_status, 'delete')
- && ( $isadmin || $post_obj->checkIdentity() )) {}
-else {
- redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED);
- exit();
-}
-
-if (!$isadmin && !$post_obj->checkTimelimit('delete_timelimit')) {
- redirect_header("viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid",2,_MD_TIMEISUPDEL);
- exit();
-}
-
-if ($xoopsModuleConfig['wol_enabled']) {
- $online_handler =& xoops_getmodulehandler('online', 'newbb');
- $online_handler->init($forum_obj);
-}
-
-if ( $ok ) {
- $isDeleteOne = (1 == $ok)? true : false;
- if ($post_obj->isTopic() && $topic->getVar("topic_replies")==0) $isDeleteOne=false;
- if ($isDeleteOne && $post_obj->isTopic() && $topic->getVar("topic_replies")>0) {
- //$post_handler->emptyTopic($post_obj);
- redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTFIRSTWITHREPLYNODELETED);
- exit();
- } else {
- if (!empty($_POST['post_text']))
- {
- //send a message
- $member_handler =& xoops_gethandler('member');
- $senduser =& $member_handler->getUser($post_obj->getVar('uid'));
- if ($senduser->getVar('notify_method') > 0)
- {
- $xoopsMailer =& xoops_getMailer();
- $xoopsMailer->reset();
- if ($senduser->getVar('notify_method')==1)
- $xoopsMailer->usePM();
- else
- $xoopsMailer->useMail();
- $xoopsMailer->setHTML(true);
- $xoopsMailer->setToUsers($senduser);
- $xoopsMailer->setFromName($xoopsUser->getVar('uname'));
- $xoopsMailer->setSubject(_MD_DELEDEDMSG_SUBJECT);
- $forenurl = "<a href=\"".XOOPS_URL."/modules/".$xoopsModule->getVar('dirname')."/viewtopic.php?topic_id=".$post_obj->getVar('topic_id')."\">".$post_obj->getVar('subject')."</a>";
- if (!empty($xoopsModuleConfig['do_rewrite'])) $forenurl = seo_urls($forenurl);
- $body = sprintf(_MD_DELEDEDMSG_BODY, $senduser->getVar('uname'),$forenurl, $_POST['post_text'],$xoopsUser->getVar('uname'),$xoopsConfig['sitename'] ,XOOPS_URL . "/" );
- $body = $myts->nl2Br($body);
- $xoopsMailer->setBody($body);
- $xoopsMailer->send();
- }
- }
- $post_handler->delete($post_obj, $isDeleteOne);
- $forum_handler->synchronization($forum);
- $topic_handler->synchronization($topic_id);
- $stats_handler = xoops_getmodulehandler('stats', 'newbb');
- $stats_handler->reset();
- }
-
- $post_obj->loadFilters("delete");
- if ( $isDeleteOne ) {
- redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTDELETED);
- } else {
- redirect_header("viewforum.php?forum=$forum", 2, _MD_POSTSDELETED);
- }
- exit();
-
-} else {
- include XOOPS_ROOT_PATH."/header.php";
- //xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_DEL_ONE);
- echo '<div class="confirmMsg">' . _MD_DEL_ONE . '<br />
- <form method="post" action="delete.php">';
- echo _MD_DELEDEDMSG . '<br />';
- echo '<textarea name="post_text" cols="50" rows="5"></textarea><br />';
- echo '<input type="hidden" name="post_id" value="' . htmlspecialchars($post_id) . '" />';
- echo '<input type="hidden" name="order" value="' . htmlspecialchars($order) . '" />';
- echo '<input type="hidden" name="forum" value="' . htmlspecialchars($forum) . '" />';
- echo '<input type="hidden" name="topic_id" value="' . htmlspecialchars($topic_id) . '" />';
- echo '<input type="hidden" name="ok" value="1" />';
- echo $GLOBALS['xoopsSecurity']->getTokenHTML();
- echo '<input type="submit" name="confirm_submit" value="' . _SUBMIT .'" title="' . _SUBMIT .'"/>
- <input type="button" name="confirm_back" value="' . _CANCEL . '" onclick="javascript:history.go(-1);" title="' . _CANCEL . '" />
- </form>
- </div>';
- if ($isadmin) {
- xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 99), 'delete.php', _MD_DEL_RELATED);
- }
- include XOOPS_ROOT_PATH.'/footer.php';
-}
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/digest.php
===================================================================
--- XoopsModules/newbb/branches/alfred/digest.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/digest.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,26 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-
-// Why the skip-DB-security check defined only for XMLRPC? We also need it!!! ~_*
-if (!defined('XOOPS_XMLRPC')) define('XOOPS_XMLRPC', 1);
-ob_start();
-include_once("header.php");
-if ($xoopsModuleConfig['email_digest'] ==0) {
- echo "<br />Not set";
- return false;
-}
-$digest_handler =& xoops_getmodulehandler('digest', 'newbb');
-$msg = $digest_handler->process();
-$msg .= ob_get_contents();
-ob_end_clean();
-echo "<br />".$msg;
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/dl_attachment.php
===================================================================
--- XoopsModules/newbb/branches/alfred/dl_attachment.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/dl_attachment.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,89 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-
-ob_start();
-include_once dirname(__FILE__) . "/header.php";
-include XOOPS_ROOT_PATH.'/header.php';
-
-$attach_id = isset($_GET['attachid']) ? strval($_GET['attachid']) : '';
-$post_id = isset($_GET['post_id']) ? intval($_GET['post_id']) : 0;
-
-if (!$post_id||!$attach_id) die(_MD_NO_SUCH_FILE.': post_id:'.$post_id.'; attachid'.$attachid);
-
-$post_handler =& xoops_getmodulehandler('post', 'newbb');
-$forumpost =& $post_handler->get($post_id);
-if (!$approved = $forumpost->getVar('approved')) die(_MD_NORIGHTTOVIEW);
-$topic_handler =& xoops_getmodulehandler('topic', 'newbb');
-$topic_obj =& $topic_handler->getByPost($post_id);
-$topic_id = $topic_obj->getVar('topic_id');
-if (!$approved = $topic_obj->getVar('approved')) die(_MD_NORIGHTTOVIEW);
-$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
-$forum_obj =& $forum_handler->get($topic_obj->getVar('forum_id'));
-if (!$forum_handler->getPermission($forum_obj)) die(_MD_NORIGHTTOACCESS);
-if (!$topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "view")) die(_MD_NORIGHTTOVIEW);
-
-$attachments = $forumpost->getAttachment();
-$attach = $attachments[$attach_id];
-if (!$attach) die(_MD_NO_SUCH_FILE);
-$file_saved = XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attach['name_saved'];
-if (!file_exists($file_saved)) die(_MD_NO_SUCH_FILE);
-if ($down = $forumpost->incrementDownload($attach_id)) {
- $forumpost->saveAttachment();
-}
-unset($forumpost);
-$msg = ob_get_contents();
-ob_end_clean();
-
-$xoopsLogger->activated = false;
-if (!empty($GLOBALS["xoopsModuleConfig"]["download_direct"])):
-
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-header("location: ".XOOPS_URL.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attach['name_saved']);
-
-else:
-$file_display = $attach['name_display'];
-//$mimetype = $attach['mimetype'];
-
-if (ini_get('zlib.output_compression')) {
- @ini_set('zlib.output_compression', 'Off');
-}
-
-if (function_exists('mb_http_output')) {
- mb_http_output('pass');
-}
-header('Expires: 0');
-//header('Content-Type: '.$mimetype);
-header('Content-Type: application/octet-stream');
-if (preg_match("/MSIE ([0-9]\.[0-9]{1,2})/", $_SERVER["HTTP_USER_AGENT"])) {
- header('Content-Disposition: attachment; filename="'.$file_display.'"');
- header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
- header('Pragma: public');
-} else {
- header('Content-Disposition: attachment; filename="'.$file_display.'"');
- header('Pragma: no-cache');
-}
-header("Content-Type: application/force-download");
-header("Content-Transfer-Encoding: binary");
-
-$handle = fopen($file_saved, "rb");
-while (!feof($handle)) {
- $buffer = fread($handle, 4096);
- echo $buffer;
-}
-fclose($handle);
-
-endif;
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/edit.php
===================================================================
--- XoopsModules/newbb/branches/alfred/edit.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/edit.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,148 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-
-include_once dirname(__FILE__) . "/header.php";
-
-foreach (array('forum', 'topic_id', 'post_id', 'order') as $getint) {
- ${$getint} = isset($_GET[$getint]) ? intval($_GET[$getint]) : 0;
-}
-
-if ( !$topic_id && !$post_id ) {
- $redirect = empty($forum)? "index.php" : "viewforum.php?forum={$forum}";
- redirect_header($redirect, 2, _MD_ERRORTOPIC);
-}
-
-$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
-$topic_handler =& xoops_getmodulehandler('topic', 'newbb');
-$post_handler =& xoops_getmodulehandler('post', 'newbb');
-
-
-$post_obj =& $post_handler->get($post_id);
-$topic_obj =& $topic_handler->get($post_obj->getVar("topic_id"));
-$forum_obj =& $forum_handler->get($post_obj->getVar("forum_id"));
-if (!$forum_handler->getPermission($forum_obj)) {
- redirect_header("index.php", 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-
-if ($xoopsModuleConfig['wol_enabled']) {
- $online_handler =& xoops_getmodulehandler('online', 'newbb');
- $online_handler->init($forum_obj);
-}
-$isadmin = newbb_isAdmin($forum_obj);
-$uid = is_object($xoopsUser)? $xoopsUser->getVar('uid'):0;
-
-$topic_id = $post_obj->getVar("topic_id");
-$topic_status = $topic_obj->getVar('topic_status');
-$error_msg = null;
-
-if (! $topic_handler->getPermission($forum_obj, $topic_status, 'edit')
- || ( !$isadmin && !$post_obj->checkIdentity())
-) {
- $error_msg = _MD_NORIGHTTOEDIT;
-} elseif (!$isadmin && !$post_obj->checkTimelimit('edit_timelimit')) {
- $error_msg = _MD_TIMEISUP;
-}
-
-if (!empty($error_msg)) {
- /*
- * Build the page query
- */
- $query_vars = array("topic_id", "post_id", "forum", "status", "order", "mode", "viewmode");
- $query_array = array();
- foreach ($query_vars as $var) {
- if (!empty($_GET[$var])) $query_array[$var] = "{$var}={$_GET[$var]}";
- }
- $page_query = htmlspecialchars(implode("&", array_values($query_array)));
- unset($query_array);
- redirect_header("viewtopic.php?{$page_query}", 2, $error_msg);
-}
-
-
-if ($xoopsModuleConfig['wol_enabled']) {
- $online_handler =& xoops_getmodulehandler('online', 'newbb');
- $online_handler->init($forum_obj);
-}
-
-$xoopsOption['template_main'] = 'newbb_edit_post.html';
-$xoopsConfig["module_cache"][$xoopsModule->getVar("mid")] = 0;
-include XOOPS_ROOT_PATH.'/header.php';
-
-/*
-$xoopsTpl->assign('lang_forum_index', sprintf(_MD_FORUMINDEX, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
-
-$category_handler =& xoops_getmodulehandler("category");
-$category_obj =& $category_handler->get($forum_obj->getVar("cat_id"), array("cat_title"));
-$xoopsTpl->assign('category', array("id" => $forum_obj->getVar("cat_id"), "title" => $category_obj->getVar('cat_title')));
-
-$form_title = _EDIT.": <a href=\"viewtopic.php?post_id={$post_id}\">".$post_obj->getVar("subject");
-$xoopsTpl->assign("form_title", $form_title);
-
-$xoopsTpl->assign("parentforum", $forum_handler->getParents($forum_obj));
-
-$xoopsTpl->assign(array(
- 'forum_id' => $forum_obj->getVar('forum_id'),
- 'forum_name' => $forum_obj->getVar('forum_name'),
- ));
-*/
-
-$dohtml = $post_obj->getVar('dohtml');
-$dosmiley = $post_obj->getVar('dosmiley');
-$doxcode = $post_obj->getVar('doxcode');
-$dobr = $post_obj->getVar('dobr');
-$icon = $post_obj->getVar('icon');
-$attachsig = $post_obj->getVar('attachsig');
-$istopic = ( $post_obj->istopic() )?1:0;
-$isedit = 1;
-$subject = $post_obj->getVar('subject', "E");
-$message = $post_obj->getVar('post_text', "E");
-$poster_name = $post_obj->getVar('poster_name', "E");
-$attachments = $post_obj->getAttachment();
-$post_karma = $post_obj->getVar('post_karma');
-$require_reply = $post_obj->getVar('require_reply');
-
-$xoopsTpl->assign("error_message", _MD_EDITEDBY . " " . $xoopsUser->uname() );
-include 'include/form.post.php';
-
-$karma_handler =& xoops_getmodulehandler('karma', 'newbb');
-$user_karma = $karma_handler->getUserKarma();
-
-$posts_context = array();
-$posts_context_obj = ($istopic)? array() : array($post_handler->get($post_obj->getVar('pid')));
-foreach ($posts_context_obj as $post_context_obj) {
- if ( $xoopsModuleConfig['enable_karma'] && $post_context_obj->getVar('post_karma') > 0 ) {
- $p_message = sprintf(_MD_KARMA_REQUIREMENT, "***", $post_context_obj->getVar('post_karma'))."</div>";
- } elseif ( $xoopsModuleConfig['allow_require_reply'] && $post_context_obj->getVar('require_reply') ) {
- $p_message = _MD_REPLY_REQUIREMENT;
- } else {
- $p_message = $post_context_obj->getVar('post_text');
- }
-
- if ($post_context_obj->getVar('uid')) {
- $p_name =newbb_getUnameFromId( $post_context_obj->getVar('uid'), $xoopsModuleConfig['show_realname'] );
- } else {
- $poster_name = $post_context_obj->getVar('poster_name');
- $p_name = (empty($poster_name))? htmlspecialchars($xoopsConfig['anonymous']) : $poster_name;
- }
- $p_date = formatTimestamp($post_context_obj->getVar('post_time'));
- $p_subject = $post_context_obj->getVar('subject');
-
- $posts_context[] = array(
- "subject" => $p_subject,
- "meta" => _MD_BY." ".$p_name." "._MD_ON." ".$p_date,
- "content" => $p_message,
- );
-}
-$xoopsTpl->assign_by_ref("posts_context", $posts_context);
-
-include XOOPS_ROOT_PATH.'/footer.php';
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/header.php
===================================================================
--- XoopsModules/newbb/branches/alfred/header.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/header.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,92 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-include_once '../../mainfile.php';
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-if (!empty($xoopsModuleConfig['do_rewrite'])) include_once "seo_url.php";
-/* for seo */
-$noseo_url = array("newtopic.php","list.topic.php","viewpost.php","reply.php","report.php","search.php","edit.php","moderate.php","polls.php","delete.php","index.php","makepdf.php");
-
-if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <=0)))
-{
- if ( !in_array(basename(getenv('SCRIPT_NAME')),$noseo_url) && (trim(getenv("REQUEST_URI")) != '') && trim(getenv("REQUEST_URI")) != "/".REAL_MODULE_NAME."/") {
- $s = XOOPS_URL . getenv("REQUEST_URI");
- $newurl = seo_urls('<a href="'.$s.'"></a>');
- $newurl = str_replace('<a href="','',$newurl);
- $newurl = str_replace('"></a>','',$newurl);
- if (!headers_sent()) {
- header("HTTP/1.1 301 Moved Permanently");
- header("Location: $newurl");
- exit();
- }
- }
-}
-include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/include/vars.php";
-
-mod_loadFunctions("user", "newbb");
-mod_loadFunctions("topic", "newbb");
-
-require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
-require_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
-$myts = MyTextSanitizer::getInstance();
-
-$menumode = 0;
-$menumode_other = array();
-$menu_url = htmlSpecialChars(preg_replace("/&menumode=[^&]/", "", $_SERVER[ 'REQUEST_URI' ]));
-$menu_url .= ( false === strpos($menu_url, "?") ) ? "?menumode=" : "&menumode=";
-foreach ($xoopsModuleConfig["valid_menumodes"] as $key => $val) {
- if ($key != $menumode) $menumode_other[] = array("title"=>$val, "link"=>$menu_url.$key);
-}
-
-$newbb_module_header = '';
-$newbb_module_header .= '<link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar("name").'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', "n").'/rss.php" />';
-if (!empty($xoopsModuleConfig['pngforie_enabled'])) {
- $newbb_module_header .= '<style type="text/css">img {behavior:url("include/pngbehavior.htc");}</style>';
-}
-$newbb_module_header .= '
- <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/templates/style.css" />
- <script type="text/javascript">var toggle_cookie="'.$forumCookie['prefix'].'G'.'";</script>
- <script src="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'/include/js/newbb_toggle.js" type="text/javascript"></script>
- ';
-
-if ($menumode == 2) {
- $newbb_module_header .= '
- <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_hover.css" />
- <style type="text/css">body {behavior:url("include/newbb.htc");}</style>
- ';
-}
-
-if ($menumode == 1) {
- $newbb_module_header .= '
- <link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar("dirname").'templates/newbb_menu_click.css" />
- <script src="include/js/newbb_menu_click.js" type="text/javascript"></script>
- ';
-}
-
-$xoops_module_header = $newbb_module_header; // for cache hack
-
-if (!empty($xoopsModuleConfig["welcome_forum"]) && is_object($xoopsUser) && !$xoopsUser->getVar('posts')) {
- mod_loadFunctions("welcome", "newbb");
-}
-
-$pollmodules = NULL;
-$module_handler = &xoops_gethandler('module');
-$xoopspoll = &$module_handler->getByDirname('xoopspoll');
-if (is_object($xoopspoll) && $xoopspoll->getVar('isactive'))
- $pollmodules = 'xoopspoll';
-else
-{
- //Umfrage
- $xoopspoll = &$module_handler->getByDirname('umfrage');
- if (is_object($xoopspoll) && $xoopspoll->getVar('isactive'))
- $pollmodules = 'umfrage';
-}
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/index.php
===================================================================
--- XoopsModules/newbb/branches/alfred/index.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/index.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,254 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id$
- * @package module::newbb
- */
-
-include_once dirname(__FILE__) . "/header.php";
-
-
-/* deal with marks */
-if (isset($_GET['mark_read'])) {
- if (1 == intval($_GET['mark_read'])) { // marked as read
- $markvalue = 1;
- $markresult = _MD_MARK_READ;
- } else { // marked as unread
- $markvalue = 0;
- $markresult = _MD_MARK_UNREAD;
- }
- mod_loadFunctions("read", "newbb");
- newbb_setRead_forum($markvalue);
- $url = 'index.php';
- redirect_header($url, 2, _MD_ALL_FORUM_MARKED.' '.$markresult);
-}
-
-$viewcat = @intval($_GET['cat']);
-$category_handler = xoops_getmodulehandler('category', 'newbb');
-
-$categories = array();
-if (!$viewcat) {
- $categories = $category_handler->getByPermission('access', null, false);
- $forum_index_title = "";
- $xoops_pagetitle = $xoopsModule->getVar('name');
-} else {
- $category_obj = $category_handler->get($viewcat);
- if ($category_handler->getPermission($category_obj)) {
- $categories[$viewcat] = $category_obj->getValues();
- }
- $forum_index_title = sprintf(_MD_FORUMINDEX, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
- $xoops_pagetitle = $category_obj->getVar('cat_title') . " [" .$xoopsModule->getVar('name')."]";
-}
-
-if (count($categories) == 0) {
- redirect_header(XOOPS_URL, 2, _MD_NORIGHTTOACCESS);
- exit();
-}
-
-/* rss feed */
-if (!empty($xoopsModuleConfig['rss_enable'])) {
- $xoops_module_header .= '
- <link rel="alternate" type="application/rss+xml" title="'.$xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/rss.php" />
- ';
-}
-
-$xoopsOption['template_main'] = 'newbb_index.html';
-$xoopsOption['xoops_pagetitle'] = $xoops_pagetitle;
-$xoopsOption['xoops_module_header'] = $xoops_module_header;
-include $GLOBALS['xoops']->path('header.php');
-mod_loadFunctions("render", "newbb");
-
-$xoopsTpl->assign('xoops_pagetitle', $xoops_pagetitle);
-$xoopsTpl->assign('xoops_module_header', $xoops_module_header);
-$xoopsTpl->assign('forum_index_title', $forum_index_title);
-
-//if ($xoopsModuleConfig['wol_enabled']) {
-if (!empty($xoopsModuleConfig['wol_enabled'])) {
- $online_handler = xoops_getmodulehandler('online', 'newbb');
- $online_handler->init();
- $xoopsTpl->assign('online', $online_handler->show_online());
-}
-$forum_handler = xoops_getmodulehandler('forum', 'newbb');
-$post_handler = xoops_getmodulehandler('post', 'newbb');
-
-/* Allowed forums */
-$forums_allowed = $forum_handler->getIdsByPermission();
-
-/* fetch top forums */
-$forums_top = array();
-
-if (!empty($forums_allowed)) {
- $crit_top = new CriteriaCompo(new Criteria("parent_forum", 0));
- $crit_top->add(new Criteria("cat_id", "(".implode(", ", array_keys($categories)).")", "IN"));
- $crit_top->add(new Criteria("forum_id", "(".implode(", ", $forums_allowed).")", "IN"));
- $forums_top = $forum_handler->getIds($crit_top);
-}
-
-/* fetch subforums if required to display */
-if (empty($forums_top) || $xoopsModuleConfig['subforum_display'] == "hidden") {
- $forums_sub = array();
-} else {
- $crit_sub = new CriteriaCompo(new Criteria("parent_forum", "(".implode(", ", $forums_top).")", "IN"));
- $crit_sub->add(new Criteria("forum_id", "(".implode(", ", $forums_allowed).")", "IN"));
- $forums_sub = $forum_handler->getIds($crit_sub);
-}
-
-/* Fetch forum data */
-$forums_available = array_merge($forums_top, $forums_sub);
-$forums_array = array();
-$newtopics = 0;
-$deletetopics = 0;
-$newposts = 0;
-$deleteposts = 0;
-if (!empty($forums_available)) {
- $crit_forum = new Criteria("forum_id", "(".implode(", ", $forums_available).")", "IN");
- $crit_forum->setSort("cat_id ASC, parent_forum ASC, forum_order");
- $crit_forum->setOrder("ASC");
- $forums = $forum_handler->getAll($crit_forum, null, false);
- $newtopics = $forum_handler->getTopicCount($forums, 0, "pending");
- $deletetopics = $forum_handler->getTopicCount($forums, 0, "deleted");
- $forums_array = $forum_handler->display($forums, $xoopsModuleConfig["length_title_index"], $xoopsModuleConfig["count_subforum"]);
- $crit = new CriteriaCompo(new Criteria("forum_id", "(".implode(", ", $forums_available).")", "IN"));
- $crit->add(new Criteria('approved','-1'));
- $deleteposts = $post_handler->getCount($crit);
- $crit = new CriteriaCompo(new Criteria("forum_id", "(".implode(", ", $forums_available).")", "IN"));
- $crit->add(new Criteria('approved','0'));
- $newposts = $post_handler->getCount($crit);
-}
-
-if ($newtopics > 0) $xoopsTpl->assign('wait_new_topic',$newtopics);
-if ($deletetopics > 0) $xoopsTpl->assign('delete_topic',$deletetopics);
-if ($newposts > 0) $xoopsTpl->assign('wait_new_post',$newposts);
-if ($deleteposts > 0) $xoopsTpl->assign('delete_post',$deleteposts);
-
-$report_handler = xoops_getmodulehandler('report', 'newbb');
-$reported = $report_handler->getCount(new Criteria("report_result", 0));
-if ($reported > 0) $xoopsTpl->assign('report_post',sprintf(_MD_NEWBB_SEEWAITREPORT,$reported));
-
-
-if (count($forums_array)>0) {
- foreach ($forums_array[0] as $parent => $forum) {
- if (isset($forums_array[$forum['forum_id']])) {
- $forum['subforum'] = $forums_array[$forum['forum_id']];
- }
- $forumsByCat[$forum['forum_cid']][] = $forum;
- }
-}
-
-$category_array = array();
-$toggles = newbb_getcookie('G', true);
-$icon_handler = newbb_getIconHandler();
-$category_icon = array(
- "expand" => $icon_handler->getImageSource("minus"),
- "collapse" => $icon_handler->getImageSource("plus"))
- ;
-
-foreach (array_keys($categories) as $id) {
- $forums = array();
- $onecat = $categories[$id];
-
- $cat_element_id = "cat_".$onecat['cat_id'];
- $expand = (count($toggles) > 0) ? ( (in_array($cat_element_id, $toggles)) ? false : true ) : true;
- $cat_display = ($expand) ? 'block;' : 'none;';
- $cat_icon_display = ($expand) ? $category_icon["expand"] : $category_icon["collapse"];
-
- if (isset($forumsByCat[$onecat['cat_id']])) {
- $forums = $forumsByCat[$onecat['cat_id']];
- }
-
- $cat_sponsor = array();
- @list($url, $title) = array_map("trim", preg_split("/ /", $onecat['cat_url'], 2));
- if (empty($title)) $title = $url;
- $title = $myts->htmlSpecialChars($title);
- if (!empty($url)) $cat_sponsor = array("title" => $title, "link" => formatURL($url));
- $cat_image = $onecat['cat_image'];
- if ( !empty($cat_image) && $cat_image != "blank.gif") {
- $cat_image = XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") . "/images/category/" . $cat_image;
- } else {
- $cat_image = "";
- }
- $category_array[] = array(
- 'cat_id' => $onecat['cat_id'],
- 'cat_title' => $myts->displayTarea($onecat['cat_title'],1),
- 'cat_image' => $cat_image,
- 'cat_sponsor' => $cat_sponsor,
- 'cat_description' => $myts->displayTarea($onecat['cat_description'],1),
- 'cat_element_id' => $cat_element_id,
- 'cat_display' => $cat_display,
- 'cat_icon_display' => $cat_icon_display,
- 'forums' => $forums
- );
-}
-unset($categories, $forums_array, $forumsByCat);
-$xoopsTpl->assign_by_ref("category_icon", $category_icon);
-$xoopsTpl->assign_by_ref("categories", $category_array);
-
-$xoopsTpl->assign(array(
- "index_title" => sprintf(_MD_WELCOME, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)),
- "index_desc" => _MD_TOSTART,
- ));
-
-/* display user stats */
-if (!empty($xoopsModuleConfig['statistik_enabled'])) {
- $userstats = array();
- if (is_object($xoopsUser)) {
- $userstats_handler =& xoops_getmodulehandler('userstats');
- $userstats_row = $userstats_handler->getStats($xoopsUser->getVar("uid"));
- $userstats["topics"] = sprintf(_MD_USER_TOPICS, intval( @$userstats_row["user_topics"] ));
- $userstats["posts"] = sprintf(_MD_USER_POSTS, intval( @$userstats_row["user_posts"] ));
- $userstats["digests"] = sprintf(_MD_USER_DIGESTS, intval( @$userstats_row["user_digests"] ));
- $userstats["currenttime"] = sprintf(_MD_TIMENOW, formatTimestamp(time(), "s"));
- $userstats["lastvisit"] = sprintf(_MD_USER_LASTVISIT, formatTimestamp($last_visit, "s"));
- $userstats["lastpost"] = empty($userstats_row["user_lastpost"]) ? _MD_USER_NOLASTPOST : sprintf(_MD_USER_LASTPOST, formatTimestamp($userstats_row["user_lastpost"], "s"));
- }
- $xoopsTpl->assign_by_ref("userstats", $userstats);
- $xoopsTpl->assign('currenttime', sprintf(_MD_TIMENOW, formatTimestamp(time(), "m")));
-}
-
-
-/* display forum stats */
-$stats_handler = xoops_getmodulehandler('stats');
-$stats = $stats_handler->getStats(array_merge(array(0), $forums_available));
-$xoopsTpl->assign_by_ref("stats", $stats);
-$xoopsTpl->assign("subforum_display", $xoopsModuleConfig['subforum_display']);
-$xoopsTpl->assign('mark_read', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") . "/index.php?mark_read=1");
-$xoopsTpl->assign('mark_unread', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") . "/index.php?mark_read=2");
-
-$xoopsTpl->assign('all_link', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") ."/list.topic.php?status=all");
-$xoopsTpl->assign('post_link', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") ."/viewpost.php?status=all");
-$xoopsTpl->assign('newpost_link', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") ."/viewpost.php?status=new");
-$xoopsTpl->assign('digest_link', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") ."/list.topic.php?status=digest");
-$xoopsTpl->assign('unreplied_link', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") ."/list.topic.php?status=unreplied");
-$xoopsTpl->assign('unread_link', XOOPS_URL."/modules/" . $xoopsModule->getVar("dirname", "n") ."/list.topic.php?status=unread");
-$xoopsTpl->assign('menumode', $menumode);
-$xoopsTpl->assign('menumode_other', $menumode_other);
-
-$isadmin = $GLOBALS["xoopsUserIsAdmin"];
-$xoopsTpl->assign('viewer_level', ($isadmin) ? 2 : is_object($xoopsUser));
-$mode = (!empty($_GET['mode'])) ? intval($_GET['mode']) : 0;
-$xoopsTpl->assign('mode', $mode );
-
-$xoopsTpl->assign('viewcat', $viewcat);
-$xoopsTpl->assign('version', $xoopsModule->getVar("version"));
-
-/* To be removed */
-if ( $isadmin ) {
- $xoopsTpl->assign('forum_index_cpanel',array("link" => "admin/index.php", "name" => _MD_ADMINCP));
-}
-
-if ($xoopsModuleConfig['rss_enable'] == 1) {
- $xoopsTpl->assign("rss_enable", 1);
- $xoopsTpl->assign("rss_button", newbb_displayImage('rss', 'RSS feed'));
-}
-$xoopsTpl->assign(array(
- "img_forum_new" => newbb_displayImage('forum_new', _MD_NEWPOSTS),
- "img_forum" => newbb_displayImage('forum', _MD_NONEWPOSTS),
- 'img_subforum' => newbb_displayImage('subforum')));
-
-include $GLOBALS['xoops']->path('footer.php');
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/list.tag.php
===================================================================
--- XoopsModules/newbb/branches/alfred/list.tag.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/list.tag.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,14 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-include "header.php";
-include XOOPS_ROOT_PATH."/modules/tag/list.tag.php";
-?>
\ No newline at end of file
Deleted: XoopsModules/newbb/branches/alfred/list.topic.php
===================================================================
--- XoopsModules/newbb/branches/alfred/list.topic.php 2012-01-18 01:33:54 UTC (rev 8746)
+++ XoopsModules/newbb/branches/alfred/list.topic.php 2012-01-18 01:38:16 UTC (rev 8747)
@@ -1,91 +0,0 @@
-<?php
-/**
- * CBB 4.0, or newbb, the forum module for XOOPS project
- *
- * @copyright The XOOPS Project http://xoops.sf.net
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Taiwen Jiang (phppp or D.J.) <ph...@us...>
- * @since 4.00
- * @version $Id $
- * @package module::newbb
- */
-
-include_once dirname(__FILE__) . "/header.php";
-
-if (!empty($xoopsModuleConfig['rss_enable'])) {
- $xoops_module_header .= '<link rel="alternate" type="application/xml+rss" title="'.$xoopsModule->getVar('name').'" href="'.XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/rss.php" />';
-}
-$xoopsOption['xoops_module_header']= $xoops_module_header;
-$xoopsOption['template_main'] = 'newbb_viewall.html';
-include XOOPS_ROOT_PATH."/header.php";
-
-$xoopsTpl->assign('xoops_module_header', $xoops_module_header);
-
-mod_loadFunctions("time", "newbb");
-mod_loadFunctions("render", "newbb");
-
-require "./class/topic.renderer.php";
-$topic_renderer = NewbbTopicRenderer::instance();
-$topic_renderer->userlevel = $GLOBALS["xoopsUserIsAdmin"] ? 2 : is_object($xoopsUser);
-$topic_renderer->is_multiple = true;
-$topic_renderer->config =& $xoopsModuleConfig;
-$topic_renderer->setVars( @$_GET );
-
-$type = intval( @$_GET['type'] );
-$status = (!empty($_GET['status']) && in_array($_GET['status'], array("active", "pending", "deleted", "digest", "unreplied", "unread")))? $_GET['status'] : "all";
-$mode = (!empty($status) && in_array($status, array("active", "pending", "deleted"))) ? 2 : (!empty($_GET['mode']) ? intval($_GET['mode']) : 0);
-
-$isadmin = $GLOBALS["xoopsUserIsAdmin"];
-/* Only admin has access to admin mode */
-if (!$isadmin) {
- $mode = 0;
-}
-
-if ($xoopsModuleConfig['wol_enabled']) {
- $online_handler =& xoops_getmodulehandler('online', 'newbb');
- $online_handler->init();
- $online_handler->render($xoopsTpl);
-}
-
-$topic_renderer->buildHeaders($xoopsTpl);
-$topic_renderer->buildFilters($xoopsTpl);
-$topic_renderer->buildTypes($xoopsTpl);
-$topic_renderer->buildCurrent($xoopsTpl);
-$topic_renderer->renderTopics($xoopsTpl);
-$topic_renderer->buildSearch($xoopsTpl);
-$topic_renderer->buildPagenav($xoopsTpl);
-$topic_renderer->buildSelection($xoopsTpl);
-
-$xoopsTpl->assign('rating_enable', $xoopsModuleConfig['rating_enabled']);
-
-$xoopsTpl->assign('img_newposts', newbb_displayImage('topic_new'));
-$xoopsTpl->assign('img_hotnewposts', newbb_displayImage('topic_hot_new'));
-$xoopsTpl->assign('img_folder', newbb_displayImage('topic'));
-$xoopsTpl->assign('img_hotfolder', newbb_displayImage('topic_hot'));
-$xoopsTpl->assign('img_locked', newbb_displayImage('topic_locked'));
-
-$xoopsTpl->assign('img_sticky', newbb_displayImage('topic_sticky', _MD_TOPICSTICKY));
-$xoopsTpl->assign('img_digest', newbb_displayImage('topic_digest', _MD_TOPICDIGEST));
-$xoopsTpl->assign('img_poll', newbb_displayImage('poll', _MD_TOPICHASPOLL));
-
-$xoopsTpl->assign('post_link', "viewpost.php");
-$xoopsTpl->assign('newpost_link', "viewpost.php?status=new");
-
-
-if (!empty($xoopsModuleConfig['show_jump'])) {
- mod_loadFunctions("forum", "newbb");
- $xoopsTpl->assign('forum_jumpbox', newbb_make_jumpbox());
-}
-$xoopsTpl->assign('menumode', $menumode);
-$xoopsTpl->assign('menumode_other', $menumode_other);
-
-$xoopsTpl->assign('mode', $mode);
-$xoopsTpl->assign('status', $status);
-$xoopsTpl->assign('viewer_level', ($isadmin) ? 2 : is_object($xoopsUser) );
-
-$pagetitle = sprintf(_MD_FORUMINDEX, htmlspecialchars($xoopsConfig['site...
[truncated message content] |