Hello,
To get a random banner on my wordpress blog, I use a heading.php file as nicely provided by Bert Simmons on this post : http://www.zenphoto.org/support/topic.php?id=2639.
It worked like a charm... until my ISP (providing web space) has restricted php include function usage. Basically, having the heading.php file in my zenphoto theme direcotry, I add the following to my wordpress header.php:
Now it does not work anymore (access denied message). I am told to use relative path for such function, but I believe this is not possible here, as I must use http protocol.
Am I right ?
Do you see another way to achieve that ?
Note I understand this is not a zenphoto issue at all.. just trying to get my nice random banner back...
Thanks
I did a lot of tests without success : I am now sure the path is good (using getcwd() and file_exists(), and here are the results (on my local desktop, where I have no permission issue) :
So the following works :
``
If I use the following :
``
=> I get the following error : "failed to open stream: No such file or directory"
But if I use :
``
=> then I get : "Call to undefined function getRandomImages()"
So I tried to add the following without success :
`
`
So I conclude the path is good. But I have no idea why the relative path does not work.
If someone has an idea how to make this works using relative path, that would be great !
We call the last you tried the "Zenphoto as a plugin" way. Sadly it simply does not work anymore with current Wordpress versions (which is noted on the user guide page for it btw). Wordpress changed the way how its theme files are loaded. We had a thread about that a while back, too.
If heading.php is a custom theme page the links are wrong anyway. Please review the theming tutorial on custom pages.