Home « Server software «
Documentation: go.php
go.php - Locate a page by name
The page locator is aiming to streamline the usage of nick names.YACS is supporting nick names for a long-time for articles, categories, sections and also for user profiles. Nick names are good, except that you have to remember the kind of things they are referencing. This is because the URL used to view user profiles is different from the URL used to access other kinds of things, including categories or server profiles.
For example to view the user profile associated with the nick name 'foo' you have to use the URL '
/yacs/users/view.php/foo'.But to view the category with the nick name 'bar' you would use '
/yacs/categories/view.php/bar' instead.The page locator will take care of nick names at a central place. It attempts to search the provided name in: sections, categories, articles and user profiles.
This means that to look for user 'foo' or for category 'bar' now you just have to submit nick names to the page locator with either '
/yacs/go.php/foo' or '/yacs/go.php/bar'.On successful search this script will redirect the surfer to the matching page. Else it will offer to redirect to the regular search engine.
Please note that you can invoke this script from within any article, using the yacs code
[go=<name>, <label>], like in
the following example:Please use our [go=monthly, monthly archive] for reference
This page locator has been largely inspired from the Cisco web site, featuring the famous
cisco.com/go URLsNote that the
mod_rewrite module is not required to run this script.However, you can add ad hoc directives to
.htaccess configuration file.
If the mod_rewrite module is available, 'go.php' can be rewritten to 'go', making this script
strictly equivalent to the Cisco's GO link.This script is a reference file of this system.
Voir aussi:
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
Reste à faire:
- to associates, on no result, offer to create a new page using provided nick name (wiki)