歡迎光臨, 訪客. 請先 登入註冊一個帳號.
三月 29, 2024, 07:30:50 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  使用與操作  |  PLOG二级域名的问题、(已经找到问题所在了) « 上篇主題 下篇主題 »
頁: [1]
作者 主題: PLOG二级域名的问题、(已经找到问题所在了)  (閱讀 12989 次)
alpha
新手見習
*
文章: 29


檢視個人資料 個人網站
« 於: 八月 30, 2005, 01:16:05 上午 »

深夜睡不着、、起来改PLOG、、终于发现为什么Plog输入不存在的二级域名会转到某个页面了、、 開懷大笑 開懷大笑
虽然找到问题所在了、但是还没看出解决办法、
是这样的、
在“管理设置”的“博客列表”里面、如果你有很多用户、、那么紧挨着字母z之后出现的第一个汉字博客、就是默认的Blog、、至于为什么这样、、汉字是怎样一个排序方法、还没看出来、、因为我这里面在字母b后面跟了4个博客名是汉字的、、4个开头的汉字分别是“珞”、“邓”、“自”、“课”、而字母Z后面紧跟的汉字是“华”、、为什么这样我也不知道、、有知道的朋友能告诉我么、谢谢、、
已記錄

alpha
新手見習
*
文章: 29


檢視個人資料 個人網站
« 回覆文章 #1 於: 八月 30, 2005, 01:21:24 上午 »

另外、、博客名还必须是两个汉字、、才会出现这种效果
已記錄

ericj
新手見習
*
文章: 43



檢視個人資料 個人網站
« 回覆文章 #2 於: 八月 30, 2005, 12:02:42 下午 »

應該是Database裡該blog的mangled_blog字串若轉換失敗變成空白的話
那麼你輸入不存在的網誌位址他就會連到轉換失敗的那一個
SELECT * FROM `plog_blogs` WHERE `mangled_blog` = '';
這樣就能找到是哪個網誌的mangled_blog轉換失敗...

已記錄

Pentium4 1.5GHz + 512MB SDRAM + 200G vinum mirror RAID
FreeBSD6.1+lighttpd+php5-cgi+MySQL5.1
alpha
新手見習
*
文章: 29


檢視個人資料 個人網站
« 回覆文章 #3 於: 八月 30, 2005, 10:49:38 下午 »

我的解决办法、、
把里面两个汉字的中间加空格
然后找到
class\action\blogaction.class.php"(192,22):               
class\action\blogaction.class.php"(198,22):
修改原来的print( 'ERROR: The blog does not exist.');为
print( 'ERROR: The blog does not exist.<a href="http://infoblog.cn">Go to Homepage</a>' );
已記錄

markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #4 於: 九月 02, 2005, 01:20:42 上午 »

我的解决办法、、
把里面两个汉字的中间加空格
然后找到
class\action\blogaction.class.php"(192,22):               
class\action\blogaction.class.php"(198,22):
修改原来的print( 'ERROR: The blog does not exist.');为
print( 'ERROR: The blog does not exist.<a href="http://infoblog.cn">Go to Homepage</a>' );




程式碼:
            // if there is a "blogId" parameter, it takes precedence over the
            // "user" parameter.
            if( !$blogId && !$blogName ) {
            // check if there was a user parameter
                 if( !empty($userName) ) {
                // if so, check to which blogs the user belongs
                $users = new Users();
                  $userInfo = $users->getUserInfoFromUsername( $userName );
                    // if the user exists and is valid...
                if( $userInfo ) {
                    $userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
                        // check if he or she belogs to any blog. If he or she does, simply
                        // get the first one (any better rule for this?)
                    if( !empty($userBlogs)) {
                $blogId = $userBlogs[0]->getId();
                        }
                    }
                }
                else {
                    // if there is no user parameter, we take the blogId from the session
                    if( $this->_session->getValue('blogId') != '' ) {
                    $blogId = $this->_session->getValue('blogId');
                    }
                    else {
                        // get the default blog id from the database
                        $blogId = $this->_config->getValue('default_blog_id');                       
                    }
                }
            }

改為

程式碼:
                        // if there is a "blogId" parameter, it takes precedence over the
            // "user" parameter.
            if( !$blogId && !$blogName ) {
            // check if there was a user parameter
                 if( !empty($userName) ) {
                // if so, check to which blogs the user belongs
                $users = new Users();
                  $userInfo = $users->getUserInfoFromUsername( $userName );
                    // if the user exists and is valid...
                if( $userInfo ) {
                    $userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
                        // check if he or she belogs to any blog. If he or she does, simply
                        // get the first one (any better rule for this?)
                    if( !empty($userBlogs)) {
                $blogId = $userBlogs[0]->getId();
                        }
                    } else {
                    $blogId = $this->_config->getValue('default_blog_id');
                }
                }
                else {
                    // if there is no user parameter, we take the blogId from the session
                    if( $this->_session->getValue('blogId') != '' ) {
                    $blogId = $this->_session->getValue('blogId');
                    }
                    else {
                        // get the default blog id from the database
                        $blogId = $this->_config->getValue('default_blog_id');                       
                    }
                }
            } else {
            $blogId = $this->_config->getValue('default_blog_id');
            }

你測試看看,當找不到 blog 時,應該會直接 到 default blog ...

如果可以,我會把他 commit 到 1.0.2 的 SVN 中。

Mark
« 最後編輯時間: 九月 02, 2005, 01:25:55 上午 由 markwu » 已記錄

alpha
新手見習
*
文章: 29


檢視個人資料 個人網站
« 回覆文章 #5 於: 九月 04, 2005, 03:05:43 下午 »

上面的代码在两个文件里面都有、都要改么??
blogaction.class.php和resource......class.php
已記錄

alpha
新手見習
*
文章: 29


檢視個人資料 個人網站
« 回覆文章 #6 於: 九月 04, 2005, 03:11:15 下午 »

我两个都修改了、、成功!!
PS: 1.0.2现在提供下载么??还有上传的时候选择允许的文件类型不知道解决了没
已記錄

markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #7 於: 九月 04, 2005, 10:39:45 下午 »

我两个都修改了、、成功!!

恭喜! 微笑

PS: 1.0.2现在提供下载么??

這兩週內會釋出 beta 版吧!

还有上传的时候选择允许的文件类型不知道解决了没

什麼意思?

Mark
已記錄

alpha
新手見習
*
文章: 29


檢視個人資料 個人網站
« 回覆文章 #8 於: 九月 04, 2005, 11:46:58 下午 »

引用
还有上传的时候选择允许的文件类型不知道解决了没

什麼意思?

Mark
是这样的Mark、、1.0.1关于文件上传类型不是没有禁止就允许么?我已经在Bug.lifetype.net上面提出了、、而且也得到了支持、不知道新版本解决了没有
另外、Mark你没有收到我的站内消息么?我问你问题了
http://www.lifetype.org.tw/tutor/admin/pLog-Panel-Introduction.html
这个教程里面在右下角小喇叭和“下午”之间的那个图标是什么软件呢?想知道、谢谢回复!!
« 最後編輯時間: 九月 04, 2005, 11:48:43 下午 由 markwu » 已記錄

頁: [1]
LifeType 中文開發論壇  |  支援  |  使用與操作  |  PLOG二级域名的问题、(已经找到问题所在了) « 上篇主題 下篇主題 »
    前往: