hi acrylian
i did not get 100%
i am not that good with php files.
my zendphoto folder are inside my site folder directory_path.
i need to have a box of random images and another one for video.
the page is html so what is the html code should i use to execute the random image or video from the zendphoto??
regards
You need a php file, meaning a file with .php as suffix to execute php functions. On a .html page that will not work because the server won't recognize it as php. You can just rename your .hml file to .php. That does not really matter.
Try adding the code here http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin
I hope that helps a little more.
hi
if i rename the file to php is that all i have to insert into the box where i want the random image to show:
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
$randomImage = getRandomImages();
$randomImageURL = getURL($randomImage);
echo "';
regards
hi acrylian
the script working 100% but to include Random images or videos into my home website is a nughtmare.
unfortanatly, i can not change the file name from html into php. this is how the site was developed.
can u find me another solution for this html issue pls?
regards
hi acrylian
ok, i will give it another shot and try something else.
first i need to meke sure of this bellow:
define('ZENFOLDER', 'zp-core'); (for this one what folder they mean in this)
define('WEBPATH', 'zenphoto'); (for this one what path they mean in this)
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php"); (for this one what folder they mean in this)
[i]define('ZENFOLDER', 'zp-core'); (for this one what folder they mean in this)[/i]
the zp-core folder within you zenphoto installation
[i]define('WEBPATH', 'zenphoto'); (for this one what path they mean in this)[/i]
the folder of your zenphoto installation, you have of course to change that if you renamed it.
[i]require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php"); (for this one what folder they mean in this)[/i]
The ones you defined above...
try
AddType application/x-httpd-php .html
in your .htaccess file
Or even
`
AddType application/x-httpd-php .html
`
to make it just process PHP for a specific file.
Alternatively, you can put rewrite rule in .htaccess to internally redirect the call to the .html URL to your .php version.
RewriteRule ^example.html$ example.php [L]
If you can't change your .htaccess, or your host doesn't let use AddType or rewrites, then you might be stuck. The only other thing I could think of would be to get the HTML page to redirect to the PHP pages -- either with a meta refresh tag or some document.location JavaScript.
And as an absolute last option, you can have a random image picked and displayed solely by JavaScript. This would requiring you updating the page each time you want to change the list of possible images it picks from, though.
Lots of options
hi AlexWilson
thanks for your reply
i am not that familiar with php.
however, the htaccess file for my website i can open it from my ftp no problems.
can u pls guide me step by step how to go in this process to get the random working on my html page.
the : zenphoto folder in this case named : mediabox.
also is it possible to have random for specific folders in the album??
thanks