Your SlideShare is downloading. ×
Ez Community Gandbox.fr
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Ez Community Gandbox.fr

1,658
views

Published on

eZ Publish Blog posts compilation : …

eZ Publish Blog posts compilation :
Netvibes / iGoogle widget, custom RSS, google maps & others tips…

Published in: Technology, News & Politics

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,658
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. eZ Publish Blog posts compilation : Netvibes / iGoogle widget, custom RSS, google maps & others tips… Gilles Guirand : info@gandbox.fr Gilles Guirand http://www.gandbox.fr webmaster Technical Director / Kaliop eZ International Winter Conference 2010 Summary
  • 2. eZ Publish Blog posts compilation : Netvibes / iGoogle widget, custom RSS, google maps & others tips… Gilles Guirand : info@gandbox.fr
    • About gandbox.fr
    • Working with Google Maps
    • Building an UWA Widget (Netvibes / iGoogle)
    • Building a custom RSS
    eZ International Winter Conference 2010 Summary
  • 3.
    • About the “ French language ” blog : http://www.gandbox.fr
      • 1st Tab : eZ Publish Blog posts (technical posts, HOWTOs…)
        • My webmaster point of view : explain how to build a “seems to be complex” feature in few time, with an easy way (I hope)
      • 2 nd Tab : My Personal French wine cellar (Wine regions, appellations, domains, bottles, color, rating, stock, google maps location, ...)
        • Useful to manage my real wine cellar
        • Useful to find eZ Publish technical posts ideas : how to build “…”
        • Useful to contribute to the eZ Publish community, outside any commercial or professional branding
    Gilles Guirand : info@gandbox.fr Demo : http://www.gandbox.fr/ma-Cave/ About gandbox.fr Note : You can play with useless geek tools like drag & drop, changing the stylesheet
  • 4. eZ Publish Blog posts compilation : Netvibes / iGoogle widget, custom RSS, google maps & others tips… Gilles Guirand : info@gandbox.fr
    • About gandbox.fr
    • Working with Google Maps
    • Building an UWA Widget (Netvibes / iGoogle)
    • Building a custom RSS
    eZ International Winter Conference 2010 Summary
  • 5. Gilles Guirand : info@gandbox.fr Demo : http://www.gandbox.fr/ma-Cave/(sortby)/localisation Working with Google Maps / What I need ? Set 1 location for each domain Display multiple domains locations on a same view (using a cluster Markers lib) Working with Google Maps
  • 6. Gilles Guirand : info@gandbox.fr
    • Working with Google Maps / Choose your extension
    • Install the Gmaps Location datatype : http://projects.ez.no/googlemaps
    • Create a ‘ location ’ attribute in your content class
    Working with Google Maps
    • Set the GMapKey for both ‘site’ and ‘site_admin’ : each domain or subdomain
      • http://www.site.com : /settings/siteaccess /[ my_siteaccess ]/site.ini.append.php
      • http://admin.site.com : /settings/siteaccess /[ my_siteaccess_admin ]/site.ini.append.php
      • [SiteSettings] GMapsKey=ABQIAAAAjjI5W4TgQODhLDv08YeFbRRHSVirfEVF1qGURhjW3ZpcMfgZzRQJfj9WirFbjfdTtkgqHOkHUjP7mQ
    • Advice : override front / back templates, and use Google Maps API V3 : no more keys
  • 7. Gilles Guirand : info@gandbox.fr
    • Working with Google Maps / Choose your extension
    • Edit your content, and set your locations using the google maps control features
    Working with Google Maps 1. Google maps search 2. Auto Long / Lat setting Advice : override the edit.tpl template extension/[ mon_extension ]/design/standard/templates/content/datatype/edit/ezgmaplocation.tpl Enhance the default features using Google maps API (add controls…)
  • 8. Gilles Guirand : info@gandbox.fr
    • Working this Google Maps / multiple locations in the same view
    • Include once unique gmap/gmap.tpl template for each parent templates
    Working with Google Maps { include uri=' design:gmap/gmap.tpl ‘ locations = $nodes_location_list location_attribute = 'localisation' size =array(600,400) center =array( $node.data_map.localisation.content.latitude, $node.data_map.localisation.content.longitude ) show_popups_on_page=false() zoom=$node.data_map.zoom.content } Domain.tpl Custom zoom attribute Include gmap.tpl Region.tpl Include gmap.tpl Allwines.tpl Include gmap.tpl Search.tpl Include gmap.tpl 1 location N locations N locations N results / locations Locations Array
  • 9. Gilles Guirand : info@gandbox.fr
    • Working this Google Maps / multiple locations in the same view
    • Fetch your node list : $node_list
      • $node_list = fetch ( ‘content’, ‘list’, …)
      • $node_list = fetch ( ‘ezfind’, ‘search’, …)
      • $node_list = array(…)
    Working with Google Maps { foreach $node_list as $node } {if $node.data_map.localisation.content.latitude|ne('')} { set $nodes_location_list = $nodes_location_list |append( $node )} {/if} {/ foreach } Exclude empty locations { include uri=' design:gmap/gmap.tpl ‘ locations = $nodes_location_list … }
  • 10. Gilles Guirand : info@gandbox.fr
    • Working this Google Maps / Markers clustering
    • Zoom managing : the defaut view does not manage the zoom
      • Option 1 : Add a zoom content class attribute (integer)
      • Option 2 : Enhance the default datatype
      • Option 3 : Manage zoom using Google Maps API, or using a Cluster Markers lib : ClusterMarker (cluster + auto bounds detection)
    • ClusterMarker : http://googlemapsapi.martinpearman.co.uk/articles.php?cat_id=1
    Working with Google Maps
  • 11. eZ Publish Blog posts compilation : Netvibes / iGoogle widget, custom RSS, google maps & others tips… Gilles Guirand : info@gandbox.fr
    • About gandbox.fr
    • Working with Google Maps
    • Building an UWA Widget (Netvibes / iGoogle)
    • Building a custom RSS
    eZ International Winter Conference 2010 Summary
  • 12. About the “ UWA ” FrameWork : http://dev.netvibes.com/ Gilles Guirand : info@gandbox.fr Demo : http://www.gandbox.fr/ (add widgets by clicking on the right box ) Building an UWA Widget (Netvibes / iGoogle) A Netvibes FrameWork : Universal Widget API (UWA) Concept : Write once, run everywhere Languages : xHTML / CSS / JavaScript (AJAX) Others… (not tested) Vista / Apple / iPhone / WordPress / …
  • 13. Add my Widget on iGoogle / Netvibes Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) Add on Netvibes Add on iGoogle
  • 14. Widget features : Last posts & comments Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) Last comments, from a custom RSS Last blog posts , from a custom RSS Set options : RSS Feeds, number of full view items, number of short view items…
  • 15. Widget features : My personal wine cellar (full AJAX features) Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) Wine cellar home page : Browse by region, last buying, searching… Domain view : Description, wine list Wine view : description, color, rating, stock, price…
  • 16. How UWA works ? Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) http://www.google.com/ig/adde?moduleurl= nvmodules.netvibes.com/widget/gspec%3FuwaUrl%3D http%253A%252F%252Fwww.gandbox.fr%252Fmywidget%252Fgandbox_V1.0.html
    • Blue URL part : my custom UWA Widget URL (with encoding)
      • URL1 : http://www.gandbox.fr/mywidget/gandbox_V1.0.html
    • Red URL part : UWA transformation (UWA XML format -> iGoogle XML format)
      • URL2 : http://nvmodules.netvibes.com/widget/gspec/uwaUrl= URL1
    • Black URL part : Final URL to add a Google gadget
      • URL3 : http://www.google.com/ig/adde?moduleurl= URL2
  • 17. Build your UWA Widget : http://www.gandbox.fr/mywidget/gandbox_V1.0.html Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle)
  • 18. Use the UWA JavaScript FrameWork : Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) Working with tabs Working with generic RSS
  • 19. Working with AJAX and eZ Publish module calls Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) eZ Publish module URL Callback function Generate AJAX linking this dataprocessor set a recursive AJAX linking. If the 'ajax' CSS class is found, the script transforms all your default ez publish links by any AJAX call links Class selector ‘ ajax ’ means : AJAX link to generate On submit search event
  • 20. Build the eZ Publish module : URL calls Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) PHP Ajax proxy for your development mode : _URL_PROXY = 'http://localhost/html/widget/ajaxProxy.php?url=‘; Absolute path : http://www.gandbox.fr
    • eZ Publish module access :
      • widget : module name
      • action : module function
      • search : module param1
      • text : module param2 (search value)
    AJAX Proxy ? http://www.gandbox.fr/widget/action/search/gassac/
  • 21. Build the eZ Publish module : module definition Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Faire-un-Widget-Netvibes-iGoogle-avec-UWA-AJAX-eZ-Publish-La-couche-eZ-Publish-Partie-2 Load your widget search template result Load your widget pagelayout
  • 22. Build the eZ Publish module : search template exemple Gilles Guirand : info@gandbox.fr Building an UWA Widget (Netvibes / iGoogle) Get full path URL … … Set your CSS Class for your JavaScript selector Build your module URL call Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Faire-un-Widget-Netvibes-iGoogle-avec-UWA-AJAX-eZ-Publish-La-couche-eZ-Publish-Partie-2
  • 23. eZ Publish Blog posts compilation : Netvibes / iGoogle widget, custom RSS, google maps & others tips… Gilles Guirand : info@gandbox.fr
    • About gandbox.fr
    • Working with Google Maps
    • Building an UWA Widget (Netvibes / iGoogle)
    • Building a custom RSS
    eZ International Winter Conference 2010 Summary
  • 24. Building a custom RSS (by keyword) : create your content class Gilles Guirand : info@gandbox.fr Building a custom RSS Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Un-flux-RSS-par-Keyword-ou-autre-sur-eZ-Publish Add your custom attributes if needed Set your 3 templates overrides : RSS Pagelayout Full view (items list) link view Text line Limit Text line Description Text line Title Datatype Attribute
  • 25. Building a custom RSS (by keyword) : create your templates Gilles Guirand : info@gandbox.fr Building a custom RSS Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Un-flux-RSS-par-Keyword-ou-autre-sur-eZ-Publish Rss_pagelayout.tpl : Debug XML escape Rss_full.tpl : Full URL Path Keyword fetching Ezrssdate template operator
  • 26. Building a custom RSS (by keyword) : create your templates Gilles Guirand : info@gandbox.fr Building a custom RSS Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Un-flux-RSS-par-Keyword-ou-autre-sur-eZ-Publish Rss_link.tpl : Full path : http://www.gandbox.fr Ezrssdate template operator : Pattern : Wed, 21 Jan 2010 15:30:00 +0000
  • 27. Building a custom RSS (by keyword) : result Gilles Guirand : info@gandbox.fr Building a custom RSS Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Un-flux-RSS-par-Keyword-ou-autre-sur-eZ-Publish http://www.gandbox.fr/rss2/(tag)/eZ%20Publish
  • 28. Any (french) questions ? Gilles Guirand : info@gandbox.fr Building a custom RSS Full code exemple : http://www.gandbox.fr/Blogs/Technologies-Web/Un-flux-RSS-par-Keyword-ou-autre-sur-eZ-Publish

×