Junior Member
Junior Member
sanderdw   01-03-2011, 23:13
#1

There is no good integration possible between Joomla 1.5/1.6 and Zenphoto 1.3. So i made a dirty hack to do this.

This code shows a random picture from Zenphoto with a link to the gallery. Albums or pictures that are unpublished are excluded.

I use the Jumi Joomla extension to execute php in a Joomla module or article.

2 problems:

  1. Images in Zenphoto have to be precached. Can't be fixed because only the original pics are stored in the database.
  2. png files don't work.

Explanation:
$num_displayed: The ammount of random pictures to show.
$path: The path to your cache folder
$ext:The last part of the cached images. You have to adjust it to your situation. Just look in de cache directory.
Example: _w595_h446.jpg or something like that.

mysql_query: In the example (see code part) the zenphoto tables are stored in a different database.
Adjust sander1x_oscalbum to the zenphoto database name. And make sure the Joomla database user can also acces to the Zenphoto database. Read rights is enough.

a href: Change it to your Joomla wrapper url

width='240': Adjust this to the desired width.

Code that you put in a Jumi module or article:

`

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.