ez projects / ez_news_afp
| UNIX name | Owner | Status | Version | Compatible with |
|---|---|---|---|---|
| ez_news_afp | Sébastien Morel | planning | 1.0 | 4.0 |
Most of the french press website subscribed to the AFP flow. AFP using a
FTP folder, updates the xml news files and pictures on the clients
reposotories.
The news are ordered in categorie (one per folder), and are updated in
real-time with the last informations. AFP uploads several articles
and pictures with differents formats and the index.
This extension allows to integrate one or several block to access the
news.
1) Unpack this archive in your ezPublish extension folder.=>
_storage/depotAFP is the repository updated by AFP.
The archive contains a set of example files sent by AFP (To test)
2) Activate the extension in your site.ini Affect all rights to
Anonymous User on this extension thanks the admin interface.
3) Add a new Rewritreule in your virtualhost or your htaccess It
permits to bypass the redirection on index.php, because eZ rdirect
everything to index.php.
=> Installation is done.
4) Configuration
The eznewsafp.ini lets you define the main AFP folder.This section
define a new News categorycalled "Generale" which contains the
news xml of the folder :
The array keys (France or People here) will be used to display the
selector in the front-office.
Limit is the default value overriden in the template.
We can also have an another category :
Here is a simple pagelayout to demonstrate how to quickly use this
extension.
Jquery is mandatory, as is the javascript/eznewsafp.js file.
stylesheets/eznewsafp.css is optionnal, it contains a basic css for
the extension.
Including the eznewsafp_bloc.tpl template with its two arguments is enough to
display the AFP news block. (So, one include for one block)
For example :Two blocks are loaded in AJAX, each containing a selector
and the index.
Clicking a link wil display the full news.
Note: The blocks are reloaded automatically every 15 secondes.
Improvement ideas :
- Replace XPath with Simple XML (because the extension was designed
for eZ 3.10)
++