[
自宅サーバーWebRing
┃
前
|ID=54
前後5表示
|
次
┃
乱移動
|
サイト一覧
]
このサイト内
書籍 DVD CD
Google(日本語)
Google(Web全体)
Google(イメージ)
Google(キャッシュ)
Yahoo! JAPAN
goo 英和
goo 和英
goo 国語
goo 新語
サイトマップ
リンク集
ダウンロード
フォーラム
Users Wiki
最新情報
TOP
»
UsersWiki
»
nao-pon
»
blog
» 2004-10-25 をテンプレートにして作成
|
一覧
検索
最新
ヘルプ
ページへ戻る
履歴
リンク元
印刷
フォーラムを静的URLに
をテンプレートにして作成
UsersWiki
:nao-pon/blog/2004-10-25 をテンプレートにして作成
開始行:
**フォーラムを静的URLに
#keyword()
RIGHT:&tag(プログラミング);
PukiWikiModで静的URL((静的ページ風URL))のSEO効果(([[IT用...
***まず mod_rewrite で
newbb のディレクトリに以下の内容の .htaccess を置く
#code(){{{
RewriteEngine on
RewriteRule ^(viewforum|viewtopic|index)/(.*)$ ...
}}}
***PATH_INFO を使い
各 .php で、PATH_INFO を使いパラメータを得る。
#code(){{{
if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\...
{
$val = explode("/",$match[1]);
for($i=1;$i<=count($val);$i=$i+2)
{
if (!empty($val[$i-1]) && !empty($val[$i]))
$HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[$i];
}
}
}}}
***適宜リンクを書き換え
あとは、いろんなところで指定されているリンクを適宜書き換...
とりあえず、XOOPS 2.0.7 の newbb と、このサイトの newbb ...
部分的にこの件とは関係ない改造も含まれていますが、適当に...
また、この他にテンプレートも相対URLの部分を絶対URLに書き...
#code(){{{
diff -crN xoops207/modules/newbb/.htaccess xoops/modules/...
*** xoops207/modules/newbb/.htaccess Thu Jan 01 09:00:00 ...
--- xoops/modules/newbb/.htaccess Mon Oct 25 09:14:06 2004
***************
*** 0 ****
--- 1,4 ----
+ RewriteEngine on
+ #RewriteRule ^(.+)\.php/(([^/]+)/([^/]+))?(/([^/]+)/([^...
+ RewriteRule ^(viewforum|viewtopic|index)/(.*)...
+
diff -crN xoops207/modules/newbb/functions.php xoops/modu...
*** xoops207/modules/newbb/functions.php Sun Aug 22 12:54...
--- xoops/modules/newbb/functions.php Wed Oct 20 15:19:36...
***************
*** 198,204 ****
{
global $xoopsDB;
$myts = MyTextSanitizer::getInstance();
! $box = '<form action="viewforum.php" method="get">
<select name="forum">
';
$sql = 'SELECT cat_id, cat_title FROM '.$xoopsDB->pref...
--- 198,204 ----
{
global $xoopsDB;
$myts = MyTextSanitizer::getInstance();
! $box = '<form action="'.XOOPS_URL.'/modules/newbb/view...
<select name="forum">
';
$sql = 'SELECT cat_id, cat_title FROM '.$xoopsDB->pref...
diff -crN xoops207/modules/newbb/index.php xoops/modules/...
*** xoops207/modules/newbb/index.php Sun Aug 22 12:54:26 ...
--- xoops/modules/newbb/index.php Wed Oct 27 22:53:20 2004
***************
*** 29,34 ****
--- 29,44 ----
// Project: The XOOPS Project ...
// ----------------------------------------------------...
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*...
+ {
+ $val = explode("/",$match[1]);
+ for($i=1;$i<=count($val);$i=$i+2)
+ {
+ if (!empty($val[$i-1]) && !empty($val[$i]))
+ $HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[...
+ }
+ }
+
include "header.php";
// this page uses smarty template
// this must be set before including main header.php
diff -crN xoops207/modules/newbb/viewforum.php xoops/modu...
*** xoops207/modules/newbb/viewforum.php Sun Aug 22 12:54...
--- xoops/modules/newbb/viewforum.php Wed Oct 27 22:51:03...
***************
*** 29,48 ****
// Project: The XOOPS Project ...
// ----------------------------------------------------...
include "header.php";
$forum = intval($HTTP_GET_VARS['forum']);
if ( $forum < 1 ) {
! redirect_header("index.php", 2, _MD_ERRORFORUM);
exit();
}
$sql = 'SELECT forum_type, forum_name, forum_access, al...
if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header("index.php", 2, _MD_ERRORCONNECT);
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header("index.php", 2, _MD_ERROREXIST);
exit();
}
// this page uses smarty template
--- 29,61 ----
// Project: The XOOPS Project ...
// ----------------------------------------------------...
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*...
+ {
+ $val = explode("/",$match[1]);
+ for($i=1;$i<=count($val);$i=$i+2)
+ {
+ if (!empty($val[$i-1]) && !empty($val[$i]))
+ $HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[...
+ }
+ }
+
include "header.php";
$forum = intval($HTTP_GET_VARS['forum']);
if ( $forum < 1 ) {
! //redirect_header("index.php", 2, _MD_ERRORFORUM);
! redirect_header($bbUrl['root'], 2, _MD_ERRORFORUM);
exit();
}
$sql = 'SELECT forum_type, forum_name, forum_access, al...
if ( !$result = $xoopsDB->query($sql) ) {
! //redirect_header("index.php", 2, _MD_ERRORCONNECT);
! redirect_header($bbUrl['root'], 2, _MD_ERRORCONNECT);
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! //redirect_header("index.php", 2, _MD_ERROREXIST);
! redirect_header($bbUrl['root'], 2, _MD_ERROREXIST);
exit();
}
// this page uses smarty template
***************
*** 65,71 ****
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! redirect_header("index.php",2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
--- 78,85 ----
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! //redirect_header("index.php",2,_MD_NORIGHTTOACCESS);
! redirect_header($bbUrl['root'],2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
***************
*** 108,114 ****
$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORU...
$xoopsTpl->assign('forum_image_folder', $bbImage['folde...
$myts =& MyTextSanitizer::getInstance();
! $xoopsTpl->assign('forum_name', $myts->makeTboxData4Sho...
$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
$forum_moderators = "";
--- 122,132 ----
$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORU...
$xoopsTpl->assign('forum_image_folder', $bbImage['folde...
$myts =& MyTextSanitizer::getInstance();
! //nao-pon
! $forumdata['forum_name'] = $myts->makeTboxData4Show($fo...
! $xoopsTpl->assign("xoops_pagetitle",$forumdata['forum_n...
! $xoopsTpl->assign('forum_name', $forumdata['forum_name'...
! //$xoopsTpl->assign('forum_name', $myts->makeTboxData4S...
$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
$forum_moderators = "";
***************
*** 153,159 ****
// assign to template
$xoopsTpl->assign('forum_selection_order', $forum_selec...
! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intv...
$sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 7...
$forum_selection_since = '<select name="sortsince">';
foreach ($sel_since_array as $sort_since_v) {
--- 171,179 ----
// assign to template
$xoopsTpl->assign('forum_selection_order', $forum_selec...
! //nao-pon
! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intv...
! //$sortsince = !empty($HTTP_GET_VARS['sortsince']) ? in...
$sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 7...
$forum_selection_since = '<select name="sortsince">';
foreach ($sel_since_array as $sort_since_v) {
***************
*** 182,193 ****
$xoopsTpl->assign('h_date_link', "viewforum.php?forum=$...
$xoopsTpl->assign('lang_date', _MD_DATE);
! $startdate = time() - (86400* $sortsince);
$start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP...
$sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p...
if ( !$result = $xoopsDB->query($sql,$forumdata['topics...
! redirect_header('index.php',2,_MD_ERROROCCURED);
exit();
}
--- 202,216 ----
$xoopsTpl->assign('h_date_link', "viewforum.php?forum=$...
$xoopsTpl->assign('lang_date', _MD_DATE);
! //nao-pon
! $startdate = ($sortsince == 1000)? 0 : time() - (86400*...
! //$startdate = time() - (86400* $sortsince);
$start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP...
$sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p...
if ( !$result = $xoopsDB->query($sql,$forumdata['topics...
! //redirect_header('index.php',2,_MD_ERROROCCURED);
! redirect_header($bbUrl['root'],2,_MD_ERROROCCURED);
exit();
}
***************
*** 219,225 ****
}
$pagination = '';
$addlink = '';
! $topiclink = 'viewtopic.php?topic_id='.$myrow['topic_i...
$totalpages = ceil(($myrow['topic_replies'] + 1) / $fo...
if ( $totalpages > 1 ) {
$pagination .= ' <img src="'.XOOPS_U...
--- 242,249 ----
}
$pagination = '';
$addlink = '';
! //$topiclink = 'viewtopic.php?topic_id='.$myrow['topic...
! $topiclink = 'viewtopic/topic_id/'.$myrow['topic_id']....
$totalpages = ceil(($myrow['topic_replies'] + 1) / $fo...
if ( $totalpages > 1 ) {
$pagination .= ' <img src="'.XOOPS_U...
***************
*** 228,235 ****
if ( $i > 3 && $i < $totalpages ) {
$pagination .= "...";
} else {
! $addlink = '&start='.(($i - 1) * $forumdata['posts_...
! $pagination .= '[<a href="'.$topiclink.$addlink.'">...
}
}
}
--- 252,260 ----
if ( $i > 3 && $i < $totalpages ) {
$pagination .= "...";
} else {
! //$addlink = '&start='.(($i - 1) * $forumdata['post...
! $addlink = 'start/'.(($i - 1) * $forumdata['posts_p...
! $pagination .= '[<a href="'.$bbUrl['root'].$topicli...
}
}
}
diff -crN xoops207/modules/newbb/viewtopic.php xoops/modu...
*** xoops207/modules/newbb/viewtopic.php Sun Aug 22 12:54...
--- xoops/modules/newbb/viewtopic.php Wed Oct 27 22:53:08...
***************
*** 29,42 ****
// Project: The XOOPS Project ...
// ----------------------------------------------------...
include 'header.php';
$forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_...
$topic_id = isset($HTTP_GET_VARS['topic_id']) ? intval(...
if ( empty($forum) ) {
! redirect_header('index.php',2,_MD_ERRORFORUM);
exit();
} elseif ( empty($topic_id) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_ER...
exit();
}
$topic_time = (isset($HTTP_GET_VARS['topic_time'])) ? i...
--- 29,52 ----
// Project: The XOOPS Project ...
// ----------------------------------------------------...
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*...
+ {
+ $val = explode("/",$match[1]);
+ for($i=1;$i<=count($val);$i=$i+2)
+ {
+ if (!empty($val[$i-1]) && !empty($val[$i]))
+ $HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[...
+ }
+ }
+
include 'header.php';
$forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_...
$topic_id = isset($HTTP_GET_VARS['topic_id']) ? intval(...
if ( empty($forum) ) {
! redirect_header($bbUrl['root'],2,_MD_ERRORFORUM);
exit();
} elseif ( empty($topic_id) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$for...
exit();
}
$topic_time = (isset($HTTP_GET_VARS['topic_time'])) ? i...
***************
*** 82,93 ****
}
if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_ER...
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_FO...
exit();
}
$xoopsTpl->assign('topic_id', $forumdata['topic_id']);
--- 92,103 ----
}
if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$for...
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$for...
exit();
}
$xoopsTpl->assign('topic_id', $forumdata['topic_id']);
***************
*** 111,117 ****
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! redirect_header("index.php",2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
--- 121,127 ----
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! redirect_header($bbUrl['root'],2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
***************
*** 140,146 ****
}
$myts =& MyTextSanitizer::getInstance();
$forumdata['topic_title'] = $myts->makeTboxData4Show($f...
! $xoopsTpl->assign(array('topic_title' => '<a href="'.$b...
// add image links to admin page if the user viewing th...
if ( $xoopsUser ) {
--- 150,159 ----
}
$myts =& MyTextSanitizer::getInstance();
$forumdata['topic_title'] = $myts->makeTboxData4Show($f...
! $xoopsTpl->assign(array('topic_title' => '<a href="'.$b...
!
! //nao-pon
! $xoopsTpl->assign("xoops_pagetitle",$forumdata['topic_t...
// add image links to admin page if the user viewing th...
if ( $xoopsUser ) {
***************
*** 205,211 ****
$post_image = '<img src="'.XOOPS_URL.'/images/icons...
}
if ($current != $key) {
! $subject = '<a href="viewtopic.php?viewmode=thread&a...
$GLOBALS['xoopsTpl']->append("topic_trees", array_me...
} else {
$subject = '<b>'.$arr[$key]['obj']->subject().'</b>';
--- 218,225 ----
$post_image = '<img src="'.XOOPS_URL.'/images/icons...
}
if ($current != $key) {
! //$subject = '<a href="viewtopic.php?viewmode=thread...
! $subject = '<a href="'.$bbUrl['root'].'viewtopic/vie...
$GLOBALS['xoopsTpl']->append("topic_trees", array_me...
} else {
$subject = '<b>'.$arr[$key]['obj']->subject().'</b>';
***************
*** 242,248 ****
}
if ( $can_post == 1 ) {
! $xoopsTpl->assign(array('viewer_can_post' => true, 'fo...
} else {
$xoopsTpl->assign('viewer_can_post', false);
if ( $show_reg == 1 ) {
--- 256,262 ----
}
if ( $can_post == 1 ) {
! $xoopsTpl->assign(array('viewer_can_post' => true, 'fo...
} else {
$xoopsTpl->assign('viewer_can_post', false);
if ( $show_reg == 1 ) {
}}}
----
しかし、自分ではいいと思っていても不具合はあるもの。なに...
***コメント
-&areaedit(uid:429,preview:5){素晴らしい!!「各 .php で...
-&areaedit(uid:429,preview:5){「適宜リンクを書き換え」、...
--&areaedit(uid:1,preview:5){とりあえず DIFF を示しておき...
-&areaedit(uid:429,preview:5){NEWSモジュールもご教示くだ...
--&areaedit(uid:1,preview:5){NEWS のほうは全く見てないの...
-&areaedit(uid:1,preview:5){新規トピックが作成できない問...
#comment(btn:つっこみ)
終了行:
**フォーラムを静的URLに
#keyword()
RIGHT:&tag(プログラミング);
PukiWikiModで静的URL((静的ページ風URL))のSEO効果(([[IT用...
***まず mod_rewrite で
newbb のディレクトリに以下の内容の .htaccess を置く
#code(){{{
RewriteEngine on
RewriteRule ^(viewforum|viewtopic|index)/(.*)$ ...
}}}
***PATH_INFO を使い
各 .php で、PATH_INFO を使いパラメータを得る。
#code(){{{
if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\...
{
$val = explode("/",$match[1]);
for($i=1;$i<=count($val);$i=$i+2)
{
if (!empty($val[$i-1]) && !empty($val[$i]))
$HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[$i];
}
}
}}}
***適宜リンクを書き換え
あとは、いろんなところで指定されているリンクを適宜書き換...
とりあえず、XOOPS 2.0.7 の newbb と、このサイトの newbb ...
部分的にこの件とは関係ない改造も含まれていますが、適当に...
また、この他にテンプレートも相対URLの部分を絶対URLに書き...
#code(){{{
diff -crN xoops207/modules/newbb/.htaccess xoops/modules/...
*** xoops207/modules/newbb/.htaccess Thu Jan 01 09:00:00 ...
--- xoops/modules/newbb/.htaccess Mon Oct 25 09:14:06 2004
***************
*** 0 ****
--- 1,4 ----
+ RewriteEngine on
+ #RewriteRule ^(.+)\.php/(([^/]+)/([^/]+))?(/([^/]+)/([^...
+ RewriteRule ^(viewforum|viewtopic|index)/(.*)...
+
diff -crN xoops207/modules/newbb/functions.php xoops/modu...
*** xoops207/modules/newbb/functions.php Sun Aug 22 12:54...
--- xoops/modules/newbb/functions.php Wed Oct 20 15:19:36...
***************
*** 198,204 ****
{
global $xoopsDB;
$myts = MyTextSanitizer::getInstance();
! $box = '<form action="viewforum.php" method="get">
<select name="forum">
';
$sql = 'SELECT cat_id, cat_title FROM '.$xoopsDB->pref...
--- 198,204 ----
{
global $xoopsDB;
$myts = MyTextSanitizer::getInstance();
! $box = '<form action="'.XOOPS_URL.'/modules/newbb/view...
<select name="forum">
';
$sql = 'SELECT cat_id, cat_title FROM '.$xoopsDB->pref...
diff -crN xoops207/modules/newbb/index.php xoops/modules/...
*** xoops207/modules/newbb/index.php Sun Aug 22 12:54:26 ...
--- xoops/modules/newbb/index.php Wed Oct 27 22:53:20 2004
***************
*** 29,34 ****
--- 29,44 ----
// Project: The XOOPS Project ...
// ----------------------------------------------------...
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*...
+ {
+ $val = explode("/",$match[1]);
+ for($i=1;$i<=count($val);$i=$i+2)
+ {
+ if (!empty($val[$i-1]) && !empty($val[$i]))
+ $HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[...
+ }
+ }
+
include "header.php";
// this page uses smarty template
// this must be set before including main header.php
diff -crN xoops207/modules/newbb/viewforum.php xoops/modu...
*** xoops207/modules/newbb/viewforum.php Sun Aug 22 12:54...
--- xoops/modules/newbb/viewforum.php Wed Oct 27 22:51:03...
***************
*** 29,48 ****
// Project: The XOOPS Project ...
// ----------------------------------------------------...
include "header.php";
$forum = intval($HTTP_GET_VARS['forum']);
if ( $forum < 1 ) {
! redirect_header("index.php", 2, _MD_ERRORFORUM);
exit();
}
$sql = 'SELECT forum_type, forum_name, forum_access, al...
if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header("index.php", 2, _MD_ERRORCONNECT);
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header("index.php", 2, _MD_ERROREXIST);
exit();
}
// this page uses smarty template
--- 29,61 ----
// Project: The XOOPS Project ...
// ----------------------------------------------------...
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*...
+ {
+ $val = explode("/",$match[1]);
+ for($i=1;$i<=count($val);$i=$i+2)
+ {
+ if (!empty($val[$i-1]) && !empty($val[$i]))
+ $HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[...
+ }
+ }
+
include "header.php";
$forum = intval($HTTP_GET_VARS['forum']);
if ( $forum < 1 ) {
! //redirect_header("index.php", 2, _MD_ERRORFORUM);
! redirect_header($bbUrl['root'], 2, _MD_ERRORFORUM);
exit();
}
$sql = 'SELECT forum_type, forum_name, forum_access, al...
if ( !$result = $xoopsDB->query($sql) ) {
! //redirect_header("index.php", 2, _MD_ERRORCONNECT);
! redirect_header($bbUrl['root'], 2, _MD_ERRORCONNECT);
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! //redirect_header("index.php", 2, _MD_ERROREXIST);
! redirect_header($bbUrl['root'], 2, _MD_ERROREXIST);
exit();
}
// this page uses smarty template
***************
*** 65,71 ****
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! redirect_header("index.php",2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
--- 78,85 ----
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! //redirect_header("index.php",2,_MD_NORIGHTTOACCESS);
! redirect_header($bbUrl['root'],2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
***************
*** 108,114 ****
$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORU...
$xoopsTpl->assign('forum_image_folder', $bbImage['folde...
$myts =& MyTextSanitizer::getInstance();
! $xoopsTpl->assign('forum_name', $myts->makeTboxData4Sho...
$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
$forum_moderators = "";
--- 122,132 ----
$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORU...
$xoopsTpl->assign('forum_image_folder', $bbImage['folde...
$myts =& MyTextSanitizer::getInstance();
! //nao-pon
! $forumdata['forum_name'] = $myts->makeTboxData4Show($fo...
! $xoopsTpl->assign("xoops_pagetitle",$forumdata['forum_n...
! $xoopsTpl->assign('forum_name', $forumdata['forum_name'...
! //$xoopsTpl->assign('forum_name', $myts->makeTboxData4S...
$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
$forum_moderators = "";
***************
*** 153,159 ****
// assign to template
$xoopsTpl->assign('forum_selection_order', $forum_selec...
! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intv...
$sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 7...
$forum_selection_since = '<select name="sortsince">';
foreach ($sel_since_array as $sort_since_v) {
--- 171,179 ----
// assign to template
$xoopsTpl->assign('forum_selection_order', $forum_selec...
! //nao-pon
! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intv...
! //$sortsince = !empty($HTTP_GET_VARS['sortsince']) ? in...
$sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 7...
$forum_selection_since = '<select name="sortsince">';
foreach ($sel_since_array as $sort_since_v) {
***************
*** 182,193 ****
$xoopsTpl->assign('h_date_link', "viewforum.php?forum=$...
$xoopsTpl->assign('lang_date', _MD_DATE);
! $startdate = time() - (86400* $sortsince);
$start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP...
$sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p...
if ( !$result = $xoopsDB->query($sql,$forumdata['topics...
! redirect_header('index.php',2,_MD_ERROROCCURED);
exit();
}
--- 202,216 ----
$xoopsTpl->assign('h_date_link', "viewforum.php?forum=$...
$xoopsTpl->assign('lang_date', _MD_DATE);
! //nao-pon
! $startdate = ($sortsince == 1000)? 0 : time() - (86400*...
! //$startdate = time() - (86400* $sortsince);
$start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP...
$sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p...
if ( !$result = $xoopsDB->query($sql,$forumdata['topics...
! //redirect_header('index.php',2,_MD_ERROROCCURED);
! redirect_header($bbUrl['root'],2,_MD_ERROROCCURED);
exit();
}
***************
*** 219,225 ****
}
$pagination = '';
$addlink = '';
! $topiclink = 'viewtopic.php?topic_id='.$myrow['topic_i...
$totalpages = ceil(($myrow['topic_replies'] + 1) / $fo...
if ( $totalpages > 1 ) {
$pagination .= ' <img src="'.XOOPS_U...
--- 242,249 ----
}
$pagination = '';
$addlink = '';
! //$topiclink = 'viewtopic.php?topic_id='.$myrow['topic...
! $topiclink = 'viewtopic/topic_id/'.$myrow['topic_id']....
$totalpages = ceil(($myrow['topic_replies'] + 1) / $fo...
if ( $totalpages > 1 ) {
$pagination .= ' <img src="'.XOOPS_U...
***************
*** 228,235 ****
if ( $i > 3 && $i < $totalpages ) {
$pagination .= "...";
} else {
! $addlink = '&start='.(($i - 1) * $forumdata['posts_...
! $pagination .= '[<a href="'.$topiclink.$addlink.'">...
}
}
}
--- 252,260 ----
if ( $i > 3 && $i < $totalpages ) {
$pagination .= "...";
} else {
! //$addlink = '&start='.(($i - 1) * $forumdata['post...
! $addlink = 'start/'.(($i - 1) * $forumdata['posts_p...
! $pagination .= '[<a href="'.$bbUrl['root'].$topicli...
}
}
}
diff -crN xoops207/modules/newbb/viewtopic.php xoops/modu...
*** xoops207/modules/newbb/viewtopic.php Sun Aug 22 12:54...
--- xoops/modules/newbb/viewtopic.php Wed Oct 27 22:53:08...
***************
*** 29,42 ****
// Project: The XOOPS Project ...
// ----------------------------------------------------...
include 'header.php';
$forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_...
$topic_id = isset($HTTP_GET_VARS['topic_id']) ? intval(...
if ( empty($forum) ) {
! redirect_header('index.php',2,_MD_ERRORFORUM);
exit();
} elseif ( empty($topic_id) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_ER...
exit();
}
$topic_time = (isset($HTTP_GET_VARS['topic_time'])) ? i...
--- 29,52 ----
// Project: The XOOPS Project ...
// ----------------------------------------------------...
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*...
+ {
+ $val = explode("/",$match[1]);
+ for($i=1;$i<=count($val);$i=$i+2)
+ {
+ if (!empty($val[$i-1]) && !empty($val[$i]))
+ $HTTP_GET_VARS[$val[$i-1]]=$_GET[$val[$i-1]] = $val[...
+ }
+ }
+
include 'header.php';
$forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_...
$topic_id = isset($HTTP_GET_VARS['topic_id']) ? intval(...
if ( empty($forum) ) {
! redirect_header($bbUrl['root'],2,_MD_ERRORFORUM);
exit();
} elseif ( empty($topic_id) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$for...
exit();
}
$topic_time = (isset($HTTP_GET_VARS['topic_time'])) ? i...
***************
*** 82,93 ****
}
if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_ER...
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_FO...
exit();
}
$xoopsTpl->assign('topic_id', $forumdata['topic_id']);
--- 92,103 ----
}
if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$for...
exit();
}
if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$for...
exit();
}
$xoopsTpl->assign('topic_id', $forumdata['topic_id']);
***************
*** 111,117 ****
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! redirect_header("index.php",2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
--- 121,127 ----
$accesserror = 1;
}
if ( $accesserror == 1 ) {
! redirect_header($bbUrl['root'],2,_MD_NORIGHTTOACCESS);
exit();
}
$can_post = 1;
***************
*** 140,146 ****
}
$myts =& MyTextSanitizer::getInstance();
$forumdata['topic_title'] = $myts->makeTboxData4Show($f...
! $xoopsTpl->assign(array('topic_title' => '<a href="'.$b...
// add image links to admin page if the user viewing th...
if ( $xoopsUser ) {
--- 150,159 ----
}
$myts =& MyTextSanitizer::getInstance();
$forumdata['topic_title'] = $myts->makeTboxData4Show($f...
! $xoopsTpl->assign(array('topic_title' => '<a href="'.$b...
!
! //nao-pon
! $xoopsTpl->assign("xoops_pagetitle",$forumdata['topic_t...
// add image links to admin page if the user viewing th...
if ( $xoopsUser ) {
***************
*** 205,211 ****
$post_image = '<img src="'.XOOPS_URL.'/images/icons...
}
if ($current != $key) {
! $subject = '<a href="viewtopic.php?viewmode=thread&a...
$GLOBALS['xoopsTpl']->append("topic_trees", array_me...
} else {
$subject = '<b>'.$arr[$key]['obj']->subject().'</b>';
--- 218,225 ----
$post_image = '<img src="'.XOOPS_URL.'/images/icons...
}
if ($current != $key) {
! //$subject = '<a href="viewtopic.php?viewmode=thread...
! $subject = '<a href="'.$bbUrl['root'].'viewtopic/vie...
$GLOBALS['xoopsTpl']->append("topic_trees", array_me...
} else {
$subject = '<b>'.$arr[$key]['obj']->subject().'</b>';
***************
*** 242,248 ****
}
if ( $can_post == 1 ) {
! $xoopsTpl->assign(array('viewer_can_post' => true, 'fo...
} else {
$xoopsTpl->assign('viewer_can_post', false);
if ( $show_reg == 1 ) {
--- 256,262 ----
}
if ( $can_post == 1 ) {
! $xoopsTpl->assign(array('viewer_can_post' => true, 'fo...
} else {
$xoopsTpl->assign('viewer_can_post', false);
if ( $show_reg == 1 ) {
}}}
----
しかし、自分ではいいと思っていても不具合はあるもの。なに...
***コメント
-&areaedit(uid:429,preview:5){素晴らしい!!「各 .php で...
-&areaedit(uid:429,preview:5){「適宜リンクを書き換え」、...
--&areaedit(uid:1,preview:5){とりあえず DIFF を示しておき...
-&areaedit(uid:429,preview:5){NEWSモジュールもご教示くだ...
--&areaedit(uid:1,preview:5){NEWS のほうは全く見てないの...
-&areaedit(uid:1,preview:5){新規トピックが作成できない問...
#comment(btn:つっこみ)
ページ名:
ぺージ情報
ぺージ名 :
nao-pon/blog/2004-10-25
ページ別名 :
未設定
ページオーナー :
nao-pon
閲覧可
グループ :
すべての訪問者
ユーザー :
すべての訪問者
編集可
グループ :
なし
ユーザー :
ゲスト
Counter: 0, today: 0, yesterday: 0
メインメニュー
ホーム
価格比較 百貨
UsersWiki
新規ページ作成
最新ページ一覧
全ページ一覧
全コメント一覧
ヘルプ
xpwiki
お問い合わせ
ファイルマネージャー
ログイン
ユーザー名:
パスワード:
パスワード紛失
|
新規登録
最近の更新
#recent(): You called me too much
オンライン状況
616 人のユーザが現在オンラインです。 (13 人のユーザが UsersWiki を参照しています。)
登録ユーザ: 0
ゲスト: 616
もっと...
サイト情報