Latest Images on External Page

hey everyone,

I have been trying to show the recent images uploaded to my zenphotoalbum.

I have managed to continue the tutorial to get a random image
using the instructions given
http://www.zenphoto.org/2009/12/zenphoto-as-a-plug-in-using-zenphoto-functions-from-outside-zenphoto/

When I try to call the
printLatestImages();
using the insturctions given in the tutrial above (which calls the template-functions.php),
it tells me that the function does not exists.

But when I tried calling
image_album_statistics.php
I got the following error
Fatal error: Call to undefined function zp_loggedin() in D:\Hosting\4154963\html\zenphoto\zp-core\zp-extensions\image_album_statistics.php on line 316

anyone can help me?
thanks a lot.

Comments

  • acrylian Administrator, Developer
    You have also to the template-functions.php and additionally the file oof the plugin if you wish to use a plugin function.

    Besides that this does not work with all systems, as written on that page (and you did not tell, if and what you use).
  • ok thanks acrylian,
    i just had to require the template-function.php

    i consider myself only as a designer
    but im still a newbie at php and all that coding
    atlough i get a grasp at what is happening, i dont know the syntax and stuff.

    I now have to ask if it is possible
    to call a php function
    from .asp page?
    as the current website is designed in asp.net 2.0/3.0

    thanks
  • acrylian Administrator, Developer
    No, I don't think so. ASP is a completely different server programming language than PHP. But actually I do not know anything about ASP. You probably should ask that in a PHP or ASP forum.
  • NazzDesigns, it is possible to include some of zenphoto's functionality in an ASP page, but it will be slightly "clunky", and depend on what you want to accomplish, exactly. It sounds like you want to include the images and their links into your page. There are ways to do this - you can use an inline frame to include a PHP page (ugly), or you can put together some ASP code to pull data from a PHP page, and re-parse it or display it directly (like an inline include). In either case, you wouldn't have direct access to zenphoto's PHP functions, but you would have access to the results returned by a PHP page. You might need to create a custom PHP file that essentially returns just what you need from your ASP page, such as the linked images without any other page content.
  • Unfortunately I am not such an expert to create the system Blue Dragonfly explained in the second solution.
    ....
    however what I did was create an iframe within the asp page,
    that was linked to php page which showed me the recent image uploaded in the gallery.
    take a look at it, http://xaghrascouts.com/default2.asp

    however i have a slight problem..
    when i am clicking on the recent images,
    the gallery is opening up in the small iframe...

    anyone can help me sort this out?
  • I think the script I use to post random images on a WordPress blog posted in this thread ( http://www.zenphoto.org/support/topic.php?id=7006 ) could be adapted easily to show the most recent photo. Instead of picking a random image, modify the mysql query to sort on id or date and pull the last record.
  • acrylian Administrator, Developer
    @howler458: I don't think that will help him because of the widely discussed ASP vs PHP problem (Wordpress is PHP, too...)

    @Nazzdesigns: YOu have to break out of the frame (yes, this is partly why they are ugly). I suggest to learn a few things about the basics, for example on www.w3schools.com.
  • I broke out the frame
    using the following

    code
    <script language="Javascript">
    <!--
    if (top.location!= self.location) {
    top.location = self.location.href
    }
    //-->
    </script>
    code

    in the index.php in the main folder...
    it worked ok...
    however the theme broke up.. (im using the original stopdesign)

    anyone have a workout for this?

    thanks a lot
  • if this is not possible, could i edit the coding the image_album_statistics.php
    so that the links it provide will open a new window with the link clicked upon?
  • acrylian Administrator, Developer
    You can edit everything but you will probably get problems when updating. I suggest to either rework your site or just theme Zenphoto so it looks like your site.
  • Acrylian - You do have a point that I overlooked: While I run my own server that supports PHP and ASP.NET for the same site, I suppose not many hosted sites support both simultaneously like that.

    Life is so much easier when you get to make up yor own rules! :-)
  • acrylian Administrator, Developer
    Well, maybe his server does support that, too. But of course we don't know that..;-)
  • yes my server supports ASP.Net 2.0/3.0/3.5
    PHP 5 and IIS 7.0
  • acrylian Administrator, Developer
    Well, as said I don't know anything about ASP. Maybe you should check with your host if you can use ASP and PHP calls on the same page (don't know if that is even possible though).
Sign In or Register to comment.