It is important that the full-size image and the thumbnail have the same name, otherwise silex won’t be able to find the full-sized image when you click on the thumbnail.php
Before we start, put your full sized images in /media/gallery/full and your thumbnails in /media/gallery/thumb.html
Thumblist.cmp.swfide
DataSelector.cmp.swfthis
RssConnector.cmp.swfurl
The idea is that the DataSelector will ask the RssConnector to read the contents of a directory where you store your thumbnails and push this information to the list. The list will then display the thumbnails.idea
To do this, drag the 3 components onto the stage and configure them in the following way :spa
RssConnector.cmp.swfrest
URL Base : <<silex.rootUrl>>cgi/scripts/rss_browse_folder.php?folder_path=media/gallery/thumbcomponent
Troubleshoot : To make sure this works you can try putting this in your browser and you should see some XML. This is the RSS feed generated by the server. Don’t forget to replace <<silex.rootUrl>> by the url to silex. For example http://arielsommeria.com/silextest/ cgi/scripts/rss_browse_folder.php?folder_path=media/gallery/thumborm
The thumblist shouldn’t need any configuration, but you might want to play with the parameters for the look and feel afterwards.
DataSelector.cmp.swf
connector name :
paste the connector name you use on the scene.
If you didn’t rename it this should be « RssConnector.cmp.swf » .
List name
Name of the list you use to reveal thumbs.
If you didn’t rename it this should be « Thumblist.cmp.swf » .
icon field = link
dans le data selector
Save your page, refresh, and if all goes well, you should see thumbnails in your list. If that works, you’re ready for step2.
We need to link it to the other components.
To do that, you must do the following config on the dataselector that you put on the stage earlier:
DataSelector.cmp.swf
Commands to execute on click
ImageDisplay.cmp.swf.value=/media/gallery/full/<<title>>
Save your page, refresh, and if all goes well, you should see the full size image when you click on the thumbnail. If that works, you’re mostly done. The next stuff is optional, you don’t have to do them in order.
onResult selectedIndex=0
Save your page, refresh, and if all goes well, you should see the first full size image when you load.
(pour maitriser la typo / le corps de la typo / la couleur)
soit mettre le html dans les fichiers texte,
soit rééditer le singleLineIo pour que les champs textes aient la bonne mise en forme. Pas idéal, je sais. Il faudrait pouvoir configurer les SingleLineoIo comme les champs texte silex, mais ça n’est pas fait pour l’instant