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

来自站长百科
跳转至: 导航、​ 搜索
(新页面: = Multiroot Module = Generates different entry-points to your Gallery providing a view on a part of your Gallery. == Description == This module assists in the creation of alternate guest...)
 
→‎用法
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
= Multiroot Module =
= Multiroot 模块 =
Generates different entry-points to your Gallery providing a view on a part of your Gallery.
生成不同的入口点至Gallery,提供Gallery不同部位的视图。


== Description ==
== 描述 ==
This module assists in the creation of alternate guest views for a Gallery.
此模块可协助Gallery备用的游客视图的创建。


Multiroot allows you to create an alternate URL to view part of the Gallery. This configuration screen assists in setup and creation of a PHP file for the alternate URL. This module never activates and is not needed to use multiroot. There are two options:
Multiroot允许你创建一个备用URL来对Gallery的一部分进行查看。此配置页面将协助此备用URL的安装及PHP文件的创建。此模块从不激活而且使用multiroot也不会用到它。有两个选项:


=== Virtual root ===
=== 虚拟的根目录相册 ===
This option defines a default album for this view and adjusts navigation links so that no parent albums above the default are shown. Both guests and logged in users accessing the alternate URL will see this effect. However, Gallery permissions are unchanged so modules like imageblock and search, or manually entered URLs, can lead visitors to items outside the default album. This option is easier to setup as it uses guest permissions already defined for your Gallery.
此选项为视图定义一个默认相册并对导航链接进行调整以使得默认相册之上无父族相册被显示出来。游客及登录用户访问此备用URL都会看到此效果。然而Gallery的权限并没有被修改。因此类似imageblock和search的模块或手动输入的URL会将访问者引导至默认相册外的项目中去。此选项的安装更为简便,因为它使用的游客权限已为Gallery定义过了。


=== Alternate guest user ===
=== 备用游客用户 ===
This option defines a new guest view with permissions defined for exactly what this view should display. Guests using the alternate URL cannot see any items outside those granted permission, by browsing or via any modules or URLs. Logged in users see whatever their permissions allow, whether accessing the normal or alternate URL. This option provides greater access control over the alternate view, but requires additional permissions setup.
此选项定义一个新的游客视图,并且该视图的权限已被精确且适当地定义过了。通过任何模块或URL进行浏览,使用该备用URL的游客无法看到权限允许之外的项目。无论是访问一般的或是备用的URL,登录后的用户可以看到任何权限允许范围内的内容。此选项提供对备用视图更好的访问权限控制,但是需要额外地对权限进行设置。


== Features ==
== 特点 ==
* Configuration assistant to generate new views of parts of your Gallery
* 配置辅助Gallery某部分新视图的生成
* 2 modes:
* 两种模式:
** Lead your visitors to a '''virtual root album''' where they can still escape to see the rest of your Gallery by using the imageblock or the search function.
** 引导你的访问者至一个'''虚拟的根目录相册''',在此他们仍能通过使用imageblock或search功能来查看Gallery的其他部分。
** Create an '''alternate guest user''' to jail your visitors in the sub-tree of the new root album you chose for them.
** 创建一个'''备用游客用户'''来限制访问者对Gallery的查看,即将他们限制在一个新建的根目录相册之下的内容之中。
* Compared to [[Gallery:Multisite]] an admin can manage all albums in a single Gallery.
* [[Gallery:Multisite|多站点]]相比较,管理员可以在单个Gallery中对所有相册进行管理。


== Usage ==
== 用法 ==
# Install the '''multiroot''' module. See [[Gallery:Installing Additional Components]].
# 安装'''multiroot'''模块。参见[[Gallery:Installing Additional Components|额外组件的安装]]
# The multiroot module doesn't activate. That's how it's meant to be for this specific module.
# multiroot模块不会激活。这就是该模块的特殊之处。
# To create a new root / entry point for your Gallery:
# 为你的Gallery新建一个根目录或入口点:
** Go to ''Site Admin'' -> ''Plugins''
** 打开''站点管理(Site Admin)'' -> ''插件(Plugins)''
** Click on multiroot -> ''configure''
** 点击multiroot -> ''配置(configure)''
*** Example values to field "''URI for new guest view''":
*** 为字段"''URI for new guest view''"给予的用于举例的数值:
**** (())
**** (())
**** (())
**** (())
** Follow the instructions to either create a ''virtual root'' or a ''alternate guest user'' and let assistant generate the resulting code.
** 按照创建''虚拟根目录''''备用游客用户''的相关指导进行操作并让辅助功能协助生成结果代码。
** Copy the generated code into a .php file (e..g 'myphotos.php') and put that file e.g. in your gallery2 folder.
** 将生成的代码复制到一个.php文件(如'myphotos.php')中去并将该文件放到你的gallery2文件夹下。


=== Advanced ===
=== 高级 ===
You can manually tweak the settings of your new entry point with these settings in your generated .php file (these are all optional):
你可以通过生成的.php文件中的这些设定手动调整新建入口点的设定(这些均为可选的):
   $gallery->setConfig('login', true); /* Specify whether to show a login link or not (defaults to true) */
   $gallery->setConfig('login', true); /*定义是否显示一个登录链接(默认为true)*/
   $gallery->setConfig('defaultAlbumId', 7682); /* Specify the album ID of the root album for that view (defaults to the normal root) */
   $gallery->setConfig('defaultAlbumId', 7682); /*定义该视图根目录相册的相册ID(默认为一般根目录)*/
   $gallery->setConfig('anonymousUserId', 11270); /* Specify the alternate guest user (defaults to the normal guest) */
   $gallery->setConfig('anonymousUserId', 11270); /*定义备用游客用户(默认为一般游客)*/
   $gallery->setConfig('breadcrumbRootId', 7682); /* Specify what the root album for your breadcrumbs (navigation) */
   $gallery->setConfig('breadcrumbRootId', 7682); /*定义导航信标(breadcrumb)的根目录相册*/


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

2008年8月13日 (三) 17:22的最新版本

Multiroot 模块[ ]

生成不同的入口点至Gallery,提供Gallery不同部位的视图。

描述[ ]

此模块可协助Gallery备用的游客视图的创建。

Multiroot允许你创建一个备用URL来对Gallery的一部分进行查看。此配置页面将协助此备用URL的安装及PHP文件的创建。此模块从不激活而且使用multiroot也不会用到它。有两个选项:

虚拟的根目录相册[ ]

此选项为视图定义一个默认相册并对导航链接进行调整以使得默认相册之上无父族相册被显示出来。游客及登录用户访问此备用URL都会看到此效果。然而Gallery的权限并没有被修改。因此类似imageblock和search的模块或手动输入的URL会将访问者引导至默认相册外的项目中去。此选项的安装更为简便,因为它使用的游客权限已为Gallery定义过了。

备用游客用户[ ]

此选项定义一个新的游客视图,并且该视图的权限已被精确且适当地定义过了。通过任何模块或URL进行浏览,使用该备用URL的游客无法看到权限允许之外的项目。无论是访问一般的或是备用的URL,登录后的用户可以看到任何权限允许范围内的内容。此选项提供对备用视图更好的访问权限控制,但是需要额外地对权限进行设置。

特点[ ]

  • 配置辅助Gallery某部分新视图的生成
  • 两种模式:
    • 引导你的访问者至一个虚拟的根目录相册,在此他们仍能通过使用imageblock或search功能来查看Gallery的其他部分。
    • 创建一个备用游客用户来限制访问者对Gallery的查看,即将他们限制在一个新建的根目录相册之下的内容之中。
  • 多站点相比较,管理员可以在单个Gallery中对所有相册进行管理。

用法[ ]

  1. 安装multiroot模块。参见额外组件的安装
  2. multiroot模块不会激活。这就是该模块的特殊之处。
  3. 为你的Gallery新建一个根目录或入口点:
    • 打开站点管理(Site Admin) -> 插件(Plugins)
    • 点击multiroot -> 配置(configure)
      • 为字段"URI for new guest view"给予的用于举例的数值:
        • (())
        • (())
    • 按照创建虚拟根目录备用游客用户的相关指导进行操作并让辅助功能协助生成结果代码。
    • 将生成的代码复制到一个.php文件(如'myphotos.php')中去并将该文件放到你的gallery2文件夹下。

高级[ ]

你可以通过生成的.php文件中的这些设定手动调整新建入口点的设定(这些均为可选的):

 $gallery->setConfig('login', true); /*定义是否显示一个登录链接(默认为true)*/
 $gallery->setConfig('defaultAlbumId', 7682); /*定义该视图根目录相册的相册ID(默认为一般根目录)*/
 $gallery->setConfig('anonymousUserId', 11270); /*定义备用游客用户(默认为一般游客)*/
 $gallery->setConfig('breadcrumbRootId', 7682); /*定义导航信标(breadcrumb)的根目录相册*/