Gallery: 模块:picasa:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
 
第1行: 第1行:
= Panorama Module =
= 全景(Panorama)模块 =
Adds a java applet for a scrollable display of wide (panorama) images.
为大尺寸(全景)可卷动的显示添加java小程序。


== Usage ==
== 用法 ==
* Install the module and configure it in site admin.
* 安装该模块并在站点管理中对其进行配置。
* ''Use applet to display wide images'' - Option to show / hide the "Panorama" option in "Edit Photo" -> "Photo"
* ''使用小程序来显示大尺寸图片''–此选项用以显示/隐藏"编辑相片(Edit Photo)" -> "相片(Photo)"中的"全景(Panorama)"选项。
* ''Add "view panorama" option in item actions for wide images'' - Option to automatically show an item action link for wide images to view a photo in the panorama viewer. Wide is defined as: image width must be larger than the configured panorama width AND the ratio of width to height must be larger than 0.6.
* ''为大尺寸图片在项目动作中添加"查看全景(view panorama)"选项'' – 此选项可为大尺寸图片自动显示项目动作链接,从而在全景查看器中查看某张相片。大尺寸被定义为:图片宽度必须大于设定好的全景宽度并且宽高比必须大于0.6。
* Enable / disable the panorama viewer applet for each photo in Edit Photo -> Photo.
* 在编辑相片(Edit Photo) -> 相片(Photo)中启用/禁用每张相片的全景查看器小程序。


[[Category:Gallery 2:Modules]]=Picasa Module=
=Picasa模块=


==Description==
==描述==
This module lets you import albums from Picasa 2 into Gallery 2.
该模块使你能够由Picasa2向Gallery2导入相册。
It will keep the order, the captions and the names.
它将会保持原有的次序标题以及名称。


==Features==
==特点==
Adds Picasa 2 xml import functionality
添加Picasa 2 xml导入功能。


==Usage==
==用法==
*Exporting From Picasa
*自Picasa导出


(Also see: [[Gallery:How_to_Add_Items#How_to_Add_Items_from_Picasa_2|How to Add Items from Picasa]]
(另见: [[Gallery:How_to_Add_Items#如何从Picasa2添加项目|如何从Picasa添加项目]]


To export from Picasa you right click an album and click
要从Picasa进行导出的话,请右键点击某相册,接着点击
on "Make a Webpage" (or you choose "Folder/Export as Webpage or even ctrl-w)"  
"Make a Webpage"(或选择"Folder/Export as Webpage,还可以直接ctrl键+w)"  
from the menu), from there you select the sizes, and the export
,再次你进行尺寸的选择,并导出
folder location. In the next window you need to choose "XML Code",
文件夹位置。在下一个窗口中你需要选择"XML Code"
and off it goes. Then you navigate to the folder you just chose
并执行。接着浏览到刚选择的文件夹
and beam that up on your Gallery Server.
并将其架设到你的Gallery服务器上。


Or you can directly try using the new "Tools>Experimental>Publish via FTP..." function in Picasa. This uses the same export function as "Make a Webpage", but lets you then choose/configure an FTP account where Picasa will directly upload the folder. This eliminates the need for a manual upload using a separate FTP client.
或者你可直接试用Picasa中新的"Tools>Experimental>Publish via FTP..."功能。它使用类似"Make a Webpage"的导出功能,但稍后会让你选择/配置FTP帐号,而在此Picasa会直接上传文件夹。这就无需使用单独的FTP客户端进行手动上传了。


*Importing Into Gallery 2 (From Add Item)
*导入Gallery2(自Add Item)


The new feature to this module is that any user can import files
该模块的新特点,所有的用户可以从Picasa
from Picasa by simply clicking on "Add Item". A Picasa 2-Tab will
导入文件,只需简单地点击"Add Item"即可。Picasa 2标签会出现
appear where a local ZIP file can be selected. That ZIP file has
在可选择本地ZIP文件的位置。该ZIP文件夹必须
to contain a picasa export (index.xml being in the root of the archive).
含有picasa到处(归档root中的index.xml)。
The user also can select how picture titles, summaries and descriptions
用户可以选择相片标题,摘要以及描述的
are assigned.
分派方式。


*Importing into Gallery 2 (From Site Admin)
*导入Gallery 2(自Site Admin)


Once you have activated the module you get a new entry "Picasa 2"
一旦你激活了该模块,就会在管理菜单的导入部分
in the Import section of your Administration menu. If you click on
看到新的条目"Picasa 2"。如果你点击它的话,
that it will let you select the local path to the Picasa export
就可以 选择Picasa导出目录的本地路径,
directory which should be stored locally (there will be upload
而该目录应当保存于本地(将来会有
support in the future). You also select the album you want to import
上传支持)。你还可以选择导入相册的
your album into.
目标相册,
''Valid local paths are relative folder paths to your Gallery 2 installation, end with a slash and don't include any file information (no need to point to the xml-file itself). Example: "../upload/myexportedalbum/" would point to the just uploaded folder "myexportedalbum" in the parent folder "upload" that is on the same level as your Gallery 2 install.''
''有效本地路径为Gallery2的相对文件夹路径,以短破折号结尾并且不包括任何文件信息(无需指向xml-file自身)。举例: "../upload/myexportedalbum/"将会指向父族文件夹"upload"中刚上传的文件夹"myexportedalbum",该文件夹与Gallery2处于同一级位置。''


Thereafter it should do everything by itself and report back to you.
此后,它就能自己运作并进行告知。


==Requested Features==
==被请求的特点==
It would be nice if the Site Admin version also allowed you to choose how captions were assigned.
如果站点管理也允许选择标题的分派方式的话就好了。


[http://feeds.feedburner.com/~r/blogspot/Dcni/~3/258635000/add-your-own-buttons-to-picasa-upload.html| Integration with Picasa API]
[http://feeds.feedburner.com/~r/blogspot/Dcni/~3/258635000/add-your-own-buttons-to-picasa-upload.html| 与Picasa API的整合]


==Hacks==
==Hacks==
If you do not enter a caption Picassa will automatically copy the itemName into the itemCaption field.  Personally if I don't enter a caption on a photo, I would prefer it remain un-captioned.  To prevent captions from being duplicates of the itemName simply modify the code as described below:
如果你没有输入标题,Picassa会自动将itemName复制到itemCaption字段中。就个人而言,如果我没有在某相片上输入一个标题的话,我宁愿它保持没有标题的样子。为了防止标题成为itemName 的副本,请按下面的描述进行修改:


Edit '''GALLERYROOT/modules/picasa/classes/Picasa2DataParser.class''' at line 211.
编辑211行的'''GALLERYROOT/modules/picasa/classes/Picasa2DataParser.class'''


'''Delete''':
'''删除'''
             $albumArray['images'][$i]['caption'] = $imageArray[$i]['itemCaption'];
             $albumArray['images'][$i]['caption'] = $imageArray[$i]['itemCaption'];
and '''Replace''' with:
'''替换'''
             if ($imageArray[$i]['itemName'] == $imageArray[$i]['itemCaption']){
             if ($imageArray[$i]['itemName'] == $imageArray[$i]['itemCaption']){
                 $albumArray['images'][$i]['caption'] == <nowiki>''</nowiki>;
                 $albumArray['images'][$i]['caption'] == <nowiki>''</nowiki>;
第71行: 第71行:
             }
             }


==Bugs==
==Bug==
Currently there are no known issues for this module.
目前尚无有关该模块的已知问题。


==Notes==
==注释==


[[Category:Gallery 2:Modules]]
[[Category:Gallery 2:Modules]]


The module doesn't like "&" in the captions of exported pictures. This is not a bug since Picasa's the one generating invalid XML.
该模块无法接受导出相片的标题中出现"&"。这并非一个bug,因为Picasa是会生成无效XML的。

2008年9月19日 (五) 15:58的最新版本

全景(Panorama)模块[ ]

为大尺寸(全景)可卷动的显示添加java小程序。

用法[ ]

  • 安装该模块并在站点管理中对其进行配置。
  • 使用小程序来显示大尺寸图片–此选项用以显示/隐藏"编辑相片(Edit Photo)" -> "相片(Photo)"中的"全景(Panorama)"选项。
  • 为大尺寸图片在项目动作中添加"查看全景(view panorama)"选项 – 此选项可为大尺寸图片自动显示项目动作链接,从而在全景查看器中查看某张相片。大尺寸被定义为:图片宽度必须大于设定好的全景宽度并且宽高比必须大于0.6。
  • 在编辑相片(Edit Photo) -> 相片(Photo)中启用/禁用每张相片的全景查看器小程序。

Picasa模块[ ]

描述[ ]

该模块使你能够由Picasa2向Gallery2导入相册。 它将会保持原有的次序标题以及名称。

特点[ ]

添加Picasa 2 xml导入功能。

用法[ ]

  • 自Picasa导出

(另见: 如何从Picasa添加项目

要从Picasa进行导出的话,请右键点击某相册,接着点击 "Make a Webpage"(或选择"Folder/Export as Webpage,还可以直接ctrl键+w)" ,再次你进行尺寸的选择,并导出 文件夹位置。在下一个窗口中你需要选择"XML Code", 并执行。接着浏览到刚选择的文件夹 并将其架设到你的Gallery服务器上。

或者你可直接试用Picasa中新的"Tools>Experimental>Publish via FTP..."功能。它使用类似"Make a Webpage"的导出功能,但稍后会让你选择/配置FTP帐号,而在此Picasa会直接上传文件夹。这就无需使用单独的FTP客户端进行手动上传了。

  • 导入Gallery2(自Add Item)

该模块的新特点,所有的用户可以从Picasa 导入文件,只需简单地点击"Add Item"即可。Picasa 2标签会出现 在可选择本地ZIP文件的位置。该ZIP文件夹必须 含有picasa到处(归档root中的index.xml)。 用户可以选择相片标题,摘要以及描述的 分派方式。

  • 导入Gallery 2(自Site Admin)

一旦你激活了该模块,就会在管理菜单的导入部分 看到新的条目"Picasa 2"。如果你点击它的话, 就可以 选择Picasa导出目录的本地路径, 而该目录应当保存于本地(将来会有 上传支持)。你还可以选择导入相册的 目标相册, 有效本地路径为Gallery2的相对文件夹路径,以短破折号结尾并且不包括任何文件信息(无需指向xml-file自身)。举例: "../upload/myexportedalbum/"将会指向父族文件夹"upload"中刚上传的文件夹"myexportedalbum",该文件夹与Gallery2处于同一级位置。

此后,它就能自己运作并进行告知。

被请求的特点[ ]

如果站点管理也允许选择标题的分派方式的话就好了。

与Picasa API的整合

Hacks[ ]

如果你没有输入标题,Picassa会自动将itemName复制到itemCaption字段中。就个人而言,如果我没有在某相片上输入一个标题的话,我宁愿它保持没有标题的样子。为了防止标题成为itemName 的副本,请按下面的描述进行修改:

编辑211行的GALLERYROOT/modules/picasa/classes/Picasa2DataParser.class

删除

           $albumArray['images'][$i]['caption'] = $imageArray[$i]['itemCaption'];

替换

           if ($imageArray[$i]['itemName'] == $imageArray[$i]['itemCaption']){
               $albumArray['images'][$i]['caption'] == '';
           } else {
               $albumArray['images'][$i]['caption'] = $imageArray[$i]['itemCaption'];
           }

Bug[ ]

目前尚无有关该模块的已知问题。

注释[ ]

该模块无法接受导出相片的标题中出现"&"。这并非一个bug,因为Picasa是会生成无效XML的。