Configuration

This section describes how to set up multiple users for WebYep. You can skip this if you only have one user.

Multiple Logins

$webyep_aMultiLoginName[]
$webyep_aMultiLoginPassword[]
$webyep_aMultiLoginURLPatterns[]
These options allow you to specify other users than the Administrator.

You can add more than one username/password pair if you want different people to be able to edit different parts of the website.

The above username/password then acts as the master login - this user will be able to edit any content of the website.

You can add additional logins by adding one ore more of these blocks to your configuration:

$webyep_aMultiLoginName[] = "someUserName";
$webyep_aMultiLoginPassword[] = "somePassword";
$webyep_aMultiLoginURLPatterns[] = "/somePage.php /someOtherPage.php";

With the first two lines you define the username and password for the login. With the third line, you define one ore more pages or groups of pages (via wildcards) that this user should be allowed to edit, by stating the URL paths of these pages.

Note: Please note the brackets after the variable names – this is different compared to other configuration variables!

In the simplest case you would just state the URL path of one page here.

But you can also define several paths, separated by spaces. Please note that URL paths are not supposed to contain spaces! Special characters like spaces must be URL-encoded (e.g. space = %20) in a URL path.

A path can also contain the wildcard character ("*", the asterisk) to match several pages. For example to match all pages in a certain folder, you would state the path to the folder, followed by a slash, followed by the wildcard:

$webyep_aMultiLoginURLPatterns[] = "/someFolder/*";

A word on URL paths

When setting the URL patterns for a login it's important to be clear about the path structure of your website.

The path part of a URL is the part following the hostname - e.g. in the URL

http://www.somewebsite.com/foldername/subfoldername/pagename.php

the path would be:

/foldername/subfoldername/pagename.php

So if you want to give some login the right to edit this page, you would set the $webyep_aMultiLoginURLPatterns[] to:

$webyep_aMultiLoginURLPatterns[] = "/foldername/subfoldername/pagename.php";

Note: The slash at the beginning of the path is important. If omitted, the path would be a relative path. Such path can match multiple pages which full paths simply end with the given sequence.


To Top of Page

URL Pattern Examples

The login should be able to...

...edit only the pages "/pageA.php" and "/pageB.php":

$webyep_aMultiLoginURLPatterns[] = "/pageA.php /pageB.php";

...edit all pages in the folder "/workshops" and the page "/news.php":

$webyep_aMultiLoginURLPatterns[] = "/workshops/* /news.php";

...edit all pages in the folder "/workshops" and its immediate subfolders:

$webyep_aMultiLoginURLPatterns[] = "/workshops/* /workshops/*/*";

...edit all pages which filename is "events.php" - regardless of where (in which folder) the page is located:

$webyep_aMultiLoginURLPatterns[] = "events.php";

(Note the missing slash in front of the filename! This makes the path relative and able to match all paths that simply end with ".../events.php")

...edit all pages which filename end with "...public.php" - regardless of where (in which folder) the page is located:

$webyep_aMultiLoginURLPatterns[] = "*public.php";

Note: To find the right pattern for a login its best to first set the username and password, then login using your browser and navigate to the page in question. If the WebYep edit buttons appear disabled, correct the pattern and reload the page – until the edit buttons become enabled...

But then be sure to also check whether the other logins really are not able to edit that page!

Switching logins (logging out)

Once logged in you will stay in that login for the current browser session. Usually users do not switch logins.

If you're checking your configuration, however, you will want to switch between the different logins. To do so either simply quit the browser (end thereby end the browser session).

Or you can hold the ALT and/or SHIFT modifier key(s) while clicking the WebYep Logout Button in the page (the open lock icon) - depending on which browser you use: Use SHIFT in Safari [1], SHIFT and ALT together in Firefox and just ALT in Internet Explorer).

[1] With Safari 5.1 this is no longer possible, since all modifier keys in combination with a click fulfill other tasks.

Other Login Options

$webyep_bShowDisabledEditButtons
If a page contains editable fields but the user has insiffucient privileges WebYep can display the edit buttons disabled (true) or not at all (false).
Default: true

$webyep_bOtherLoginsMayEditGlobalData
Whether editors other than the main editor should be able to edit "global" fields.
WebYep Elements marked global (with the "Content" attribute set to "for all documents") normally can only be edited by the master login.
Default: false

If you want all other logins to be able to edit global content on pages they have edit rights for, change the following configuration variable in your configuration file:

$webyep_bOtherLoginsMayEditGlobalData = true;


To Top of Page

 

© 2011, Objective Development