Path

ez projects / wse_us


Wascou Software Edition - URL Shortener (wse_us)

UNIX name Owner Status Version Compatible with
wse_us Maxime Thomas stable 1.0.0 4.4
Download available here : http://www.wascou.org/eng/Software/URL-Shortener

This extension is designed for the Content Management System eZPublish.
Its aim is to provide a simple system that will allow users to get short urls
of an article, a folder, a video or any content.

The features are :

- Integrated system of urls filter : a key of 4 characters is generated at the
publication time and added into the URL. As it's unique for a node ID, it can
match Google News requirements (limited to first version). For ex :

http://my.domain.com/Solutions/Web-publishing/Bastille

Turned in :

http://my.domain.com/Solutions/Web-publishing/Bastille-004v

- Accessible module that handles the key :

http://my.domain.com/us/view/004v

Redirect to :

http://my.domain.com/Solutions/Web-publishing/Bastille-004v

- Operator to encrypt / decrypt a key,

- Specific configuration for Apache can reduce the number of characters,

- Special template that contains an url of the short url, useful for mobile
interface and lazy people.

"URL Shortener" by Maxime THOMAS - maxime.thomas@wascou.org

(C) Wascou.org 2010 - Check the website for more extensions
http://www.wascou.org
================================================================================
1. Description
2. Requirements
3. Installation
4. Set up
5. How to
6. Troubleshooting
================================================================================
1. DESCRIPTION
This extension is designed for the Content Management System eZPublish.
Its aim is to provide a simple system that will allow users to get short urls
of an article, a folder, a video or any content.
The features are :
- Integrated system of urls filter : a key of 4 characters is generated at the
publication time and added into the URL. As it's unique for a node ID, it can
match Google News requirements (limited to first version). For ex :
http://my.domain.com/Solutions/Web-publishing/Bastille
Turned in :
http://my.domain.com/Solutions/Web-publishing/Bastille-004v
- Accessible module that handles the key :
http://my.domain.com/us/view/004v
Redirect to :
http://my.domain.com/Solutions/Web-publishing/Bastille-004v
- Operator to encrypt / decrypt a key,
- Specific configuration for Apache can reduce the number of characters,
- Special template that contains an url of the short url, useful for mobile
interface and lazy people.
================================================================================
2. REQUIREMENTS
This extension has been tested under eZPublish 4.4.
As it used standard apis of eZPublish, there's no other requirement to make it
work.
If you want to use this extension correctly, we recommand to enable the Apache
rewrite module and enable it in the configuration.
================================================================================
3. INSTALLATION
The installation follows thoses steps :
- Unzip / untar the extension
- Move the "wse_us" folder inside the extension folder
- Enable the extension, by the admin interface or by the site.ini file.
- Regenerate the autoloads :
$ php bin/php/ezpgenerateautoloads.php -e wse_us
- Clear the caches
$ php bin/php/ezcache.php --clear-all --purge
================================================================================
4. SET UP
You can set up the content typ on which this extension will apply in the block
"AppendShortURLFilterSettings" of the site.ini of the extension (or do an
override, it's cleaner). The setting "ApplyOnClass" is an array containing the
string identifiers of the concerned classes.
To insure that URL will be the shorter, the most common things to do are the
following :
- Get a short domain name for this service. Example :
http://www.domain.com ==> http://s.domain.com
- Add a rewrite rule in Apache so url are set to /?WXYZ and not /us/view/WXYZ.
In order to do that, edit your Apache configuration file (Virtual host or
other), take care that the rewrite module is enabled and add the following
configuration :
RewriteCond %{QUERY_STRING} ^([a-zA-Z0-9]{4})$
RewriteRule ^/$ /us/view/%1? [R=301,L]
- Restart Apache.
- Edit the wse_us.ini.append.php file and check that the setting ApacheRedirect
is set to enabled.
- Clear the caches
================================================================================
5. HOW TO
It's very easy, you just have to include the short_url template and provide a
node id.
Example :
{include uri="design:us/short_url.tpl" node_id=$node.node_id}
================================================================================
6. TROUBLESHOOTING
If you have some trouble with this extension, contact-us at wascou.org :
http://www.wascou.org/eng/Company/Contact-us
================================================================================
END OF THE DOCUMENT

This project has no reviews yet. Be the first one to review it!

No forum messages yet.