Show latest images extarnaly (joomla)

Hi, i have a Joomla website. i would like to code something to load latest images and if possible latest images from specific categories...

I will after iframe it in Joomla. If somebody could help me with this i will after creat a module for Joomla to aumatically do this... But first i need help in taking latest images to an external normal file.

Bye ;)

Comments

  • Please review the user guide and do a search on this topic. There have been several items related. But I think none with regard t Joomla, so if it is unique in how it does things maybe these suggestions do not work.
  • Could you give me some links?, because i been searching the forum but i couldnt find any usefull thing...

    Anyway, i just need to know how to load LATEST IMAGES FROM SPECIFIC CATEGORY IN AN EXTERNAL FILE.

    For example:
    www.example.com
    www.example.com/zenphoto
    I want to load latest images here: "www.example.com/latestmoviepics.php" < The file isnt in zenphoto's directory.

    Bye ;)
  • acrylian Administrator, Developer
    You probably noticed that our site is more than just the forum... http://www.zenphoto.org/category/User-Guide/
  • Hi, im not a bad person ok?,.. i have looked the forum, but sometimes people just need help.

    Im tryng with this:

    <? define('WEBPATH', 'fotos');
    require_once(WEBPATH . "/zp-core/template-functions.php"); ?>
    <?php printLatestImages(21); ?>

    "fotos" is the folder path... but i get

    Fatal error: Call to undefined function printLatestImages() in /home/duelodehinchadas/ar.duelodehinchadas.com/latest.php on line 3

    Bye ;)
  • Here's a post from the forum that might help you out...

    http://www.zenphoto.org/support/topic.php?id=2165#post-12785

    I've never used Joomla, but here's what I use to print text links for my latest Zenphoto images in my Wordpress footer:

    `
    function show_latest_image_links($number) {
    $sql = "SELECT * FROM zp_images WHERE albumid <> 65 ORDER BY id DESC LIMIT $number";
    $result = mysql_query($sql);
    while($r = mysql_fetch_array($result)) {
    $id=$r['albumid'];
    $sql="SELECT * FROM zp_albums WHERE id = $id";
    $album = mysql_query($sql);
    $a = mysql_fetch_array($album);
    echo '';
    echo '';
    $title=$r['title'];
    echo $title;
    echo '
    ';
    echo '';
    }
    }
    `
    If you want to only show the latest from a specific folder, change "albumid <> 65" in the second line as appropriate. This example only produces text links, but there should be a similar example here in the forum that returns the image thumbnails. Oh, I see I hardcoded my Zenphoto folder "gallery" in this code example, you would need to change that. This code would go in your theme's functions.php file and then you can just use `<?php show_latest_image_links(5); ?>` wherever you want them to be displayed.
  • acrylian Administrator, Developer
    @pancho91:
    Surely you are not a bad person, but since we have a site with a "user guide" it should be obvious that just searching the forum is not enough.

    You get the error because you also need to include the `image_album_statistics.php` plugin which has the `printLatestImages()` function.
  • I tried this code:

    `
    <? define('WEBPATH', 'gallery');
    require_once(WEBPATH . "/zp-core/template-functions.php");
    require_once(WEBPATH . "/zp-core/zp-extensions/image_album_statistics.php"); ?>
    <?php printLatestImages(21); ?>
    `
    where gallery is the subfolder from which this code was called.

    but it shows the error:

    MySQL Error: Zenphoto could not connect to the database server.Check your zp-config.php file for the correct host, user name, and password.Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy.Also make sure the server is running, if you control it.

    Am using ZP 1.2.7
  • acrylian Administrator, Developer
    Seems that the "Zenphoto as a plugin" way does not work with Joomla as it also does not with Wordpress anymore, too (which it did before 2.8). This is theoretically possible but these CMS seem to override or whatever the db connection of Zenphoto. We don't know why.

    Please take a look at this thread where you can download a simple function to get the latest image directly that you can use as a guide to extend. Read the in file comments carefully: http://www.zenphoto.org/support/topic.php?id=6622
  • You should then open a ticket at Wordpress Trac...this should normally not occur. This will make the task damn difficult since I am not a PHP Developer.
  • acrylian Administrator, Developer
    We don't know if this is Wordpress, Zenphoto or both. We consider Zenphoto a standalone script so we don't explicitly test this.
  • Ok..no problem.
  • I'd like to see Zenphoto in Joomla too , and I wonder what is the future of a gallery without that possibility ?
  • acrylian Administrator, Developer
    wonder what is the future of a gallery without that possibility ?
    What is that supposed to mean. Zenphoto is a standalone Gallery CMS and not a plugin. Also is Joomla the only CMS out there so that everythign that does not integrate with it is obsolete???

    Feel free to provide a bridge script for integration. Open source is dependend on contributions for special features.
  • I will add that the future seems pretty solid since so few people have even asked for this interation. Maybe you should consider Wordpress. There seems to be many contributors making that combination work.
  • Hi, sorry to get this up again, but i'm integrating a Joomla site right now and your Zenphoto is what I would need. Any plan to integrate? Or anyone as been able to code something in PHP?
  • acrylian Administrator, Developer
    1st question: No. 2nd: No, not that we know. If we would know it would be listed on our user guide and/or extension section. Maybe better ask on the Joomla community.
Sign In or Register to comment.