Member
Member
NazzDesigns   01-05-2010, 12:12
#1

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.

Administrator
Administrator
acrylian   01-05-2010, 12:24
#2

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).

Member
Member
NazzDesigns   01-05-2010, 12:51
#3

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

Administrator
Administrator
acrylian   01-05-2010, 14:50
#4

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.

Member
Member
Blue Dragonfly   01-05-2010, 15:32
#5

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.

Member
Member
NazzDesigns   01-05-2010, 16:31
#6

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?

Member
Member
howler358   01-05-2010, 16:45
#7

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.

Administrator
Administrator
acrylian   01-05-2010, 16:55
#8

@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.

Member
Member
NazzDesigns   01-05-2010, 17:35
#9

I broke out the frame
using the following

code

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

Member
Member
NazzDesigns   01-05-2010, 17:46
#10

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?

Administrator
Administrator
acrylian   01-05-2010, 18:08
#11

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.

Member
Member
Blue Dragonfly   02-05-2010, 04:39
#12

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! :-)

Administrator
Administrator
acrylian   02-05-2010, 07:44
#13

Well, maybe his server does support that, too. But of course we don't know that..;-)

Member
Member
NazzDesigns   02-05-2010, 10:58
#14

yes my server supports ASP.Net 2.0/3.0/3.5
PHP 5 and IIS 7.0

Administrator
Administrator
acrylian   02-05-2010, 11:13
#15

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).

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