[pLog-svn] r3059 - in plugins/trunk/gallery: class/action
class/gallery locale
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Mar 12 21:16:35 GMT 2006
Author: oscar
Date: 2006-03-12 21:16:35 +0000 (Sun, 12 Mar 2006)
New Revision: 3059
Added:
plugins/trunk/gallery/locale/locale_zh_TW.php
Modified:
plugins/trunk/gallery/class/action/plugingalleryupdateconfigaction.class.php
plugins/trunk/gallery/class/gallery/galleryhelper.class.php
plugins/trunk/gallery/locale/locale_en_UK.php
Log:
fix for Gallery 2.1RC and UTF-8 Chinese locale file
Modified: plugins/trunk/gallery/class/action/plugingalleryupdateconfigaction.class.php
===================================================================
--- plugins/trunk/gallery/class/action/plugingalleryupdateconfigaction.class.php 2006-03-12 21:00:14 UTC (rev 3058)
+++ plugins/trunk/gallery/class/action/plugingalleryupdateconfigaction.class.php 2006-03-12 21:16:35 UTC (rev 3059)
@@ -87,7 +87,7 @@
}
if ( $this->_blocks != "specificItem" ) {
- $this->_itemid = "";
+ //$this->_itemid = "";
}
if ( !file_exists( $this->_absolutePath ) ) {
Modified: plugins/trunk/gallery/class/gallery/galleryhelper.class.php
===================================================================
--- plugins/trunk/gallery/class/gallery/galleryhelper.class.php 2006-03-12 21:00:14 UTC (rev 3058)
+++ plugins/trunk/gallery/class/gallery/galleryhelper.class.php 2006-03-12 21:16:35 UTC (rev 3059)
@@ -59,12 +59,12 @@
// Set up the gallery call
$ret = GalleryEmbed::init( array( 'embedUri' => $this->_embedUri,
- 'embedPath' => $this->_embedPath,
- 'relativeG2Path' => $this->_relativePath,
+ 'g2Uri' => $this->_relativePath,
+ 'loginRedirect' => '/index.php',
'activeUserId' => '' ) );
// Return error details if there is a problem
- if ($ret->isError()) {
+ if ($ret != null) {
$this->_error = $ret->getAsHtml();
return;
}
@@ -79,7 +79,7 @@
// Gallery has already sent output (redirect or binary data)
if ( $g2data['isDone'] ) {
- return;
+ exit;
}
// Retrieve the html head
@@ -94,7 +94,7 @@
$ret = GalleryEmbed::done();
// Check for errors
- if ($ret->isError()) {
+ if ($ret != null) {
return $ret->getAsHtml();
}
@@ -120,18 +120,21 @@
// Set up the gallery call
$ret = GalleryEmbed::init( array( 'embedUri' => $this->_embedUri,
- 'embedPath' => $this->_embedPath,
- 'relativeG2Path' => $this->_relativePath,
+ 'g2Uri' => $this->_relativePath,
+ 'loginRedirect' => '/index.php',
'activeUserId' => '',
'fullInit' => true) );
// Check for errors
- if ($ret->isError()) {
+ if ($ret != null) {
return $ret->getAsHtml();
}
// Get the image block
if ( $itemid != "" ) {
+ if (is_numeric($itemid) == false) {
+ list($ret, $itemid) = GalleryCoreApi::fetchItemIdByPath($itemid);
+ }
list($ret, $g2data) = GalleryEmbed::getImageBlock( array( 'blocks' => $blocks,
'show' => $show,
'itemId' => $itemid) );
@@ -141,7 +144,7 @@
}
// Check for errors
- if ($ret->isError()) {
+ if ($ret != null) {
return $ret->getAsHtml();
}
@@ -149,7 +152,7 @@
$ret = GalleryEmbed::done();
// Check for errors
- if ($ret->isError()) {
+ if ($ret != null) {
return $ret->getAsHtml();
}
Modified: plugins/trunk/gallery/locale/locale_en_UK.php
===================================================================
--- plugins/trunk/gallery/locale/locale_en_UK.php 2006-03-12 21:00:14 UTC (rev 3058)
+++ plugins/trunk/gallery/locale/locale_en_UK.php 2006-03-12 21:16:35 UTC (rev 3059)
@@ -19,10 +19,10 @@
$messages["label_sidebar"] = "Enable side bar";
$messages["label_sidebar_greeting"] = "Enable side bar greeting";
$messages["label_sidepath"] = "Enable side path";
-$messages["label_absolute_path"] = "Absolute path";
-$messages["label_embed_uri"] = "Embed uri";
-$messages["label_embed_path"] = "Embed path";
-$messages["label_relative_path"] = "Relative path";
+$messages["label_absolute_path"] = "embed.php path";
+$messages["label_embed_uri"] = "embedUri";
+$messages["label_embed_path"] = "embedPath (never use now)";
+$messages["label_relative_path"] = "g2Uri";
$messages["label_example"] = "Example:";
$messages["label_blocks"] = "Blocks";
$messages["label_show"] = "Show";
@@ -32,21 +32,50 @@
$messages["help_sidebar"] = "Enable the Gallery side bar. This allows for extended functionality.";
$messages["help_sidebar_greeting"] = "Displays a welcome message to the user.";
$messages["help_sidepath"] = "Displays a navigation path to the user.";
-$messages["help_absolute_path"] = "Path to Gallery's embed.php file (ex. /var/www/gallery2/embed.php).";
-$messages["help_embed_uri"] = "Filename (and query parameters, but no path) of pLog.";
-$messages["help_embed_path"] = "URL path from document root to pLog directory.";
-$messages["help_relative_path"] = "Path from pLog directory to Gallery base directory.";
-$messages["help_example"] = "<pre> __ access point __ __ G2 base dir __<br/>".
-" a) plog/index.php plog/gallery2<br/>".
-" b) index.php?page=gallery albums<br/>".
-"For the above examples these settings are:<br/>".
-" __ embedURI __ __ embedPath __ __ relativeG2Path __<br/>".
-" a) index.php /plog gallery2<br/>".
-" d) index.php?page=gallery / albums</pre>";
+$messages["help_absolute_path"] = "Path to Gallery's embed.php file (ex. /usr/share/gallery2/embed.php).";
+$messages["help_embed_uri"] = "Gallery URI used in LifeType.";
+$messages["help_embed_path"] = "URL path from document root to pLog directory. (Never use now, just input / or anything you like)";
+$messages["help_relative_path"] = "Gallery's main.php directory.";
+$messages["help_example"] = "<pre><br />".
+"a) Use different virtualhost:<br />".
+"<br />".
+" Gallery install at /usr/share/gallery2<br />".
+" LifeType URL is http://blog.teatime.com.tw<br />".
+" Gallery URL is http://gallery.teatime.com.tw<br />".
+" LifeType's blogId is 123<br />".
+" The imageblock you want is Gallery's photo in 'v/tommy_baby' this album<br />".
+"<br />".
+" Setting:<br />".
+"<br />".
+" embed.php path: /usr/share/gallery2/embed.php<br />".
+" embedUri: blog.teatime.com.tw/index.php?op=gallery&blogId=123<br />".
+" g2Uri: gallery.teatime.com.tw/main.php<br />".
+" Blocks: randomImage<br />".
+" Item ID: /tommy_baby<br />".
+"<br />".
+"<br />".
+"b) Use same virtualhost:<br />".
+"<br />".
+" Gallery install at /home/abc/public_html/gallery2<br />".
+" LifeType install at /home/abc/public_html/blog<br />".
+" LifeType URL is http://www.teatime.com.tw/~abc/blog<br />".
+" Gallery URL is http://www.teatime.com.tw/~abc/gallery2<br />".
+" LifeType's blogId is 321<br />".
+" The imageblock you want is this photo 'v/tommy_baby/abc/123.jpg' in gallery<br />".
+"<br />".
+" Setting:<br />".
+"<br />".
+" embed.php path: /home/abc/public_html/gallery2/embed.php<br />".
+" embedUri: /blog/index.php?op=gallery&blogId=321<br />".
+" g2Uri: /gallery2/main.php<br />".
+" Blocks: specificItem<br />".
+" ItemID: /tommy_baby/abc/123.jpg<br />".
+"<br /></pre>";
$messages["help_blocks"] = "A pipe (|) separated list, of one or more possible blocks which are:<br/>".
" * randomImage|recentImage|viewedImage|randomAlbum|recentAlbum|viewedAlbum|specificItem<br/>".
" * dailyImage|weeklyImage|monthlyImage|dailyAlbum|weeklyAlbum|monthlyAlbum";
$messages["help_show"] = "A pipe (|) separated list of one or more possible choices which are:<br/>".
" * title|date|views|owner|heading|fullSize or just 'none'";
-$messages["help_itemid"] = "If you choose 'blocks' = 'specificItem', you have to specify this field.";
-?>
\ No newline at end of file
+$messages["help_itemid"] = "If you choose 'blocks' = 'specificItem', you have to specify this field. If you chioose 'blocks' = 'randomImage', you can specify this field to a ablum, it will show the picture in this album randomly.<br />".
+"PS: itemId could be an ID show in Gallery's URL, or if you use a rewrite function in gallery, you can use the path name as the itemId, just like the example above.";
+?>
Added: plugins/trunk/gallery/locale/locale_zh_TW.php
===================================================================
--- plugins/trunk/gallery/locale/locale_zh_TW.php 2006-03-12 21:00:14 UTC (rev 3058)
+++ plugins/trunk/gallery/locale/locale_zh_TW.php 2006-03-12 21:16:35 UTC (rev 3059)
@@ -0,0 +1,81 @@
+<?php
+$messages["embeddedApps"] = "嵌入應用程式外掛";
+$messages["Gallery"] = "Gallery 外掛設定";
+$messages["gallery_plugin"] = "Gallery 外掛設定";
+
+$messages["gallery_sidebar_enabled"] = "Show sidebar";
+$messages["gallery_sidebarGreeting_enabled"] = "Show sidebar greeting";
+$messages["gallery_pathbar_enabled"] = "Show pathbar";
+
+$messages["error_gallery_not_enabled"] = "請先啟動 Gallery 外掛模組.";
+$messages["error_required_missing"] = "請輸入所有必要欄位.";
+$messages["error_absolute_path"] = "embed.php 的路徑不正確.";
+$messages["error_itemid"] = "當你選擇使用 specificItem 時, 就必須輸入 Gallery 項目代碼.";
+$messages["gallery_settings_saved_ok"] = "Gallery 外掛模組設定成功儲存!";
+
+$messages["label_configuration"] = "設定";
+$messages["label_enable"] = "啟動這個外掛模組";
+$messages["label_default"] = "預設值";
+$messages["label_sidebar"] = "顯示 Gallery 中的 side bar";
+$messages["label_sidebar_greeting"] = "在 Gallery 中的 side bar 顯示歡迎訊息";
+$messages["label_sidepath"] = "在 Gallery 的 side bar 顯示瀏覽路徑";
+$messages["label_absolute_path"] = "embed.php 所在路徑";
+$messages["label_embed_uri"] = "embedUri 參數";
+$messages["label_embed_path"] = "embedPath 參數 (無作用)";
+$messages["label_relative_path"] = "g2Uri 參數";
+$messages["label_example"] = "範例:";
+$messages["label_blocks"] = "圖片區塊";
+$messages["label_show"] = "顯示項目";
+$messages["label_itemid"] = "Gallery 項目代碼";
+
+$messages["help_enable"] = "啟動 Gallery 外掛模組";
+$messages["help_sidebar"] = "顯示 Gallery 的 side bar. (試不出選不選有什麼差別)";
+$messages["help_sidebar_greeting"] = "在 Gallery 的 side bar 中顯示歡迎訊息. (試不出選不選有什麼差別)";
+$messages["help_sidepath"] = "在 Gallery 的 side bar 中顯示瀏覽路徑. (試不出選不選有什麼差別)";
+$messages["help_absolute_path"] = "Gallery 的 embed.php 檔案完整路徑 (如: /usr/share/gallery2/embed.php).";
+$messages["help_embed_uri"] = "在 LifeType 中執行 Gallery 功能時所用的連結.";
+$messages["help_embed_path"] = "目前已經無作用, 請輸入 / 就可以了.";
+$messages["help_relative_path"] = "Gallery main.php 的路徑.";
+$messages["help_example"] = "<pre><br />".
+"a) 使用不用虛擬主機時:<br />".
+"<br />".
+" Gallery 安裝於 /usr/share/gallery2<br />".
+" LifeType 網址是 http://blog.teatime.com.tw<br />".
+" Gallery 網址是 http://gallery.teatime.com.tw<br />".
+" LifeType 的 blog 代碼是 123<br />".
+" 要顯示的圖片區塊是隨機選擇 Gallery 內 v/tommy_baby 這個相簿內的相片<br />".
+"<br />".
+" 設定如下:<br />".
+"<br />".
+" embed.php 所在路徑: /usr/share/gallery2/embed.php<br />".
+" embedUri 參數: blog.teatime.com.tw/index.php?op=gallery&blogId=123<br />".
+" g2Uri 參數: gallery.teatime.com.tw/main.php<br />".
+" 圖片區塊: randomImage<br />".
+" Gallery 項目代碼: /tommy_baby<br />".
+"<br />".
+"<br />".
+"b) 使用相同虛擬主機時:<br />".
+"<br />".
+" Gallery 安裝於 /home/abc/public_html/gallery2<br />".
+" LifeType 安裝於 /home/abc/public_html/blog<br />".
+" LifeType 網址是 http://www.teatime.com.tw/~abc/blog<br />".
+" Gallery 網址是 http://www.teatime.com.tw/~abc/gallery2<br />".
+" LifeType 的 blog 代碼是 321<br />".
+" 要顯示的圖片區塊是指定 Gallery 內 v/tommy_baby/abc/123.jpg 這張相片<br />".
+"<br />".
+" 設定如下:<br />".
+"<br />".
+" embed.php 所在路徑: /home/abc/public_html/gallery2/embed.php<br />".
+" embedUri 參數: /blog/index.php?op=gallery&blogId=321<br />".
+" g2Uri 參數: /gallery2/main.php<br />".
+" 圖片區塊: specificItem<br />".
+" Gallery 項目代碼: /tommy_baby/abc/123.jpg<br />".
+"<br /></pre>";
+$messages["help_blocks"] = "選擇要顯示的圖片區塊, 可以是下面選項中的一個或數個, 當選擇不只一個選項時, 請使用 | 分隔<br />".
+" * randomImage|recentImage|viewedImage|randomAlbum|recentAlbum|viewedAlbum|specificItem<br/>".
+" * dailyImage|weeklyImage|monthlyImage|dailyAlbum|weeklyAlbum|monthlyAlbum";
+$messages["help_show"] = "選擇在圖片區塊中要顯示的文字訊息, 可以是下面選項的一個或數個, 如果選擇不只一個選項時, 請使用 | 分隔<br />".
+" * title|date|views|owner|heading|fullSize 或者不要顯示時, 請填入 'none'";
+$messages["help_itemid"] = "圖片區塊所要顯示的相片或相簿在 Gallery 的項目代碼. 也就是一般在 Gallery 中, 使用的 itemId 參數 (如果沒有使用 rewrite 功能, 應該在 URL 上頭可以看到). 或者是相片或相簿的路徑 (在使用 rewrite 功能後, Gallery 通常用 /v/abc/def/ijk.jpg 來表示相片, 或 /v/abc/def 來表示相簿, 這時路徑就是 /abc/def/ijk.jpg 或 /abc/def, 就是表前頭的 /v 移除就對了). 如果你要使用的是路徑, 請在最前頭加上 / 字元, 以避免路徑剛好是數字時, 會被認為是項目代碼. 如果你的圖片區塊選擇 'specificItem' 時, 這個欄位就必須輸入正確的資料.<br />".
+"PS. 如果圖片區塊選擇 'randomImage', 且這個欄位輸入的是相簿的項目代碼或路徑, 表示隨機顯示該相簿內的相片.";
+?>
More information about the pLog-svn
mailing list