URL Shortener


Downloads

 

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.

WSE US - Screenshot

URLs filter integration

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

http://my.domain.com/us/view/004v
 
Redirect to :
 
http://my.domain.com/Solutions/Web-publishing/Bastille-004v

Devlopment helpers

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.

Installation

The installation follows thoses steps :

$ php bin/php/ezpgenerateautoloads.php -e wse_us
 $ php bin/php/ezcache.php --clear-all --purge

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 :
 

 
 http://www.domain.com ==> http://s.domain.com
 

 RewriteCond %{QUERY_STRING} ^([a-zA-Z0-9]{4})$
 RewriteRule ^/$ /us/view/%1? [R=301,L]

 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} 

 Troubleshooting

 If you have some trouble with this extension, contact us at wascou.org.

License

The license is GPL3