歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 20, 2024, 10:41:06 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  外掛程式  |  修正 LifeType 1.2 使用 Gallery 外掛無法顯示相簿的問題 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 修正 LifeType 1.2 使用 Gallery 外掛無法顯示相簿的問題  (閱讀 10503 次)
twu2
初級會員
**
文章: 61



檢視個人資料 個人網站
« 於: 四月 05, 2007, 08:52:51 上午 »

原本之前改了 Gallery 的外掛給 LifeType 1.2 使用, 以為一切的正常, 結果今天才發現, 雖然可以顯示圖片, 不過一點選圖片或選擇進入相簿時, 並無法像之前在 1.1 時的運作一般, 可以進入 Gallery 系統中.

檢查一下程式, 發現在改成 1.2 使用時,  在註冊相關服務時, 變成只有 admin 才會去註冊, 一般的使用就沒有註冊 gallery 服務, 所以在執行 op=gallery 時, 就無法運作了.

這個 patch 可以修正這個問題: http://www.teatime.com.tw/~tommy/mypatch/lifetype12_gallery_plugin.patch
程式碼:
--- plugingallery.class.php.orig 2007-04-05 09:37:58.971689103 +0800
+++ plugingallery.class.php 2007-04-05 09:38:48.741881593 +0800
@@ -31,15 +31,23 @@
$this->id = "gallery";
$this->author = "Laurent Vauthrin";
$this->desc = "Integrates gallery into plog.";
- $this->version = "20070321";
+ $this->version = "20070405";
 
// Setup the locale
$this->locales = Array( "en_UK" );
 
if ($source == "admin")
$this->initAdmin();
+ else
+ $this->init();
}
 
+ function init()
+ {
+ // Register the actions
+ $this->registerBlogAction( "gallery", "PluginGalleryShowAction" );
+ }
+
function initAdmin()
{
// Register the actions
經過修正之後, 果然可以正常運作了.

這個 patch 也送到官方的網站了: http://bugs.lifetype.net/view.php?id=1263   
已記錄

頁: [1]
LifeType 中文開發論壇  |  開發  |  外掛程式  |  修正 LifeType 1.2 使用 Gallery 外掛無法顯示相簿的問題 « 上篇主題 下篇主題 »
    前往: