Pages (2): 1 2   
Member
Member
invision   2008-04-02, 21:10
#1

Hi!

I have a site, e.g. www.michaelsite.com/michaelspages/wordpress which displays a random thumbnail and does so rather well

However, I also want to display it in my zenphoto directory, so if I type in:
www.michaelsite.com/michaelspages/zenphoto/gallery1 the random photo will appear, however, this does not work. When I right-click the image to see the src, it has an extra 'zenphoto' in the address

How do I get around this issue?
Is it to do with my 'template-functions.php' file?
Or is there a bit of PHP I can do to eliminate any 'extra' zenphotos from the image src address.

Basically my use of the printRandomImages function is in a small php file held in www.michaelsite.com/michaelspages which then does the function and displays the pic - is this causing the issue?

Many thanks for any help.

Am happy to supply a link, if it could be removed at a later stage.

Administrator
Administrator
acrylian   2008-04-03, 10:13
#2

Did you set the right home (main) page path in the zenphoto options? That needs to be a full path like http://www.michaelsite.com.
Did you use the "zenphoto as a plugin" solution from our extenstions page?

I guess it would be easier if you post a link, we of course can remove it later if you wish.

Member
Member
invision   2008-04-03, 10:28
#3

Thanks for the reply

OK.

As you can see bottom left:
it works great

However as you can see bottom left:
it doesn't work

The file I'm using(that stores the printRandomImages() function) is at:

The code for 'test.php' is:

`

`

Any help at all, you can give, would be brilliant.

Thank you.

Administrator
Administrator
acrylian   2008-04-03, 13:29
#4

It's has clearly to do with the WEBPATH, but I just don't see right now...

Did you try exactly the solution "zenphoto as a plugin" on our extensions page: http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin

I have to admit I never tried that personally...(I just built two themes....;-))

Member
Member
invision   2008-04-03, 13:32
#5

Yes, it's definitely the webpath. It seems to add that extra 'zenphoto' to the path, where it's not needed

I'm now using:

`

`

But still the same error

Any ideas?

Administrator
Administrator
acrylian   2008-04-03, 13:37
#6

Yes, please try that. Can't do much more than not working, right?..:-) This is a common way to combine for example wordpress and zenphoto and has been done several times. We use it that way on zenphoto.org, too (to be exact that part aitf311 did set up).

Member
Member
invision   2008-04-03, 13:42
#7

Please see ammended post above.

I used that but still got the same error.

Administrator
Administrator
acrylian   2008-04-03, 13:46
#8

Ah, try this, set for WEBPATH your full basic path `http://www.domain.com".

Well, I fear I am not gaining any glory from this today...I guess we better wait until one of my fellow devs who actually used it himself appears...

Member
Member
invision   2008-04-03, 13:49
#9

I got an error

Fatal error: Call to undefined function: printrandomimages() in on line 10

With the code

`

`

Hmm, I'm tearing my hair out here.

Member
Member
aitf311   2008-04-03, 14:05
#10

What version of Zenphoto are you using? the Stopdesign theme prints random images, check out its index.php and look at lines 88 - 96

Member
Member
invision   2008-04-03, 14:33
#11

How do I check what version it is?

I see the Stopdesign code(it also doesn't work when I take it down to to the zenphoto directory). I just don't know why it can display a random image on one part, but not the other

Is it because my 'test.php' is in the WordPress folder?

Would it make more sense to have ZenPhoto in the 'wordpress' directory, so it'd be wordpress/zenphoto/

Member
Member
AlexWilson   2008-04-03, 14:41
#12

try
define('WEBPATH', '/flannigan/zenphoto');

Member
Member
invision   2008-04-03, 14:45
#13

Re: AlexWilson

Tried that, but got a very ugly error:

Warning: main(/flannigan/zenphoto/zp-core/template-functions.php) [function.main]: failed to open stream: Operation not permitted in /home/mysiteuk/public_html/flannigan/wordpress/test.php on line 4

Administrator
Administrator
acrylian   2008-04-03, 14:49
#14

Yes, try placing zenphoto within the wordpress folder.

Member
Member
invision   2008-04-03, 14:51
#15

Sorry to be such a newbie on this, but should it just be a case of moving the directory, to be under wordpress, or should I have to make any tweaks in the admin part?

You have all been very patient, and hopefully this resolves the issue.

Member
Member
invision   2008-04-03, 15:53
#16

Man, no matter what I do, it won't work

I've now got it so 'zenphoto' is below my 'wordpress', but it's still adding the 'zenphoto/eric-flannigan' part TWICE to my URL, when in zenphoto

E.g visit: - look at the random pic, bottom left and look at the img src for it.

I'm losing the will to live. Someone please help me out

`

`

Member
Member
invision   2008-04-03, 18:23
#17

The include line, referencing the 'test.php' file is actually in the 'header.php' file in my WP theme folder.

I use the same 'header.php' for my WP as I do for ZP.

Would this cause a problem?

Member
Member
invision   2008-04-03, 19:09
#18

GOT IT WORKING!!!

Runs off to play Boston - More than a Feeling so loud, it'll become popular again

Moderator:
Please remove the links to my temp site. Thanks!

Thank you once again for all your input.

In the end, I made two 'test.php' files and tweaked one of them.

Administrator
Administrator
acrylian   2008-04-03, 19:40
#19

Great! I have removed the links.

Member
Member
invision   2008-04-03, 20:23
#20

Many thanks.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.