Gallery:模块:multiroot

来自站长百科
Sunzz1985讨论 | 贡献2008年6月12日 (四) 14:19的版本 (新页面: = 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...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

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 views for a 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:

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.

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.

Features

  • Configuration assistant to generate new views of parts of your 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.
    • Create an alternate guest user to jail your visitors in the sub-tree of the new root album you chose for them.
  • Compared to Gallery:Multisite an admin can manage all albums in a single Gallery.

Usage

  1. Install the multiroot module. See Gallery:Installing Additional Components.
  2. The multiroot module doesn't activate. That's how it's meant to be for this specific module.
  3. To create a new root / entry point for your Gallery:
    • Go to Site Admin -> Plugins
    • Click on multiroot -> configure
      • Example values to field "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.

Advanced

You can manually tweak the settings of your new entry point with these settings in your generated .php file (these are all optional):

 $gallery->setConfig('login', true); /* Specify whether to show a login link or not (defaults to true) */
 $gallery->setConfig('defaultAlbumId', 7682); /* Specify the album ID of the root album for that view (defaults to the normal root) */
 $gallery->setConfig('anonymousUserId', 11270); /* Specify the alternate guest user (defaults to the normal guest) */
 $gallery->setConfig('breadcrumbRootId', 7682); /* Specify what the root album for your breadcrumbs (navigation) */