Can I create another page ? I'd like to create a page with a random image which I can then embed as an iframe in another site (my wordpress site which doesn't run on the same machine). Is it possible without changing code in zp ? Or should I do that outside the theme ?
Absolutely possible. You can have as many pages in your theme as you want, and they can do pretty much anything you want. As of 1.0.3, there's even a convention for it:
anything.php becomes /index.php?p=anything
You can add the following rule to your .htaccess to be able to visit the page from /page/anything:
RewriteRule ^page/([A-Za-z0-9-]+)/?$ index.php?p=$1 [L,QSA]
This must go UNDER the RewriteRule ^page/([0-9]+)/?$ line, and will be included in future releases (but isn't in 1.0.3).
Following this line of reasoning, I am trying to get an RSS feed to work (see my other post recently), and I have the code in place, and a validated feed, I just cannot get it to display in a browser with the above procedure. Any suggestions Trisweb?
And interestingly enough, the rewrite rule posted above didn't seem to work for me. I get an internal server error right off the bat.
Here's my htaccess if you want to take a gander Trisweb:
`
RewriteEngine On
RewriteBase /zenphoto
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^.*$ - [R,L]
RewriteRule ^admin/?$ zen/admin.php [R,L]
RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
RewriteRule ^page/([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L,QSA]
RewriteRule ^([^/]+).([a-z]+)$ index.php?album=$1&format=$2 [L,QSA]
RewriteRule ^([^/]+)/?$ index.php?album=$1 [L,QSA]
RewriteRule ^([^/]+)/slideshow/?$ index.php?album=$1&view=Slideshow [L,QSA]
RewriteRule ^([^/]+)/page/(all)/?$ index.php?album=$1&displaythumbs=All [L,QSA]
RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/image/(thumb|[0-9]{1,4})/([^/\]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA]
RewriteRule ^([^/]+)/image/([^/\]+)$ albums/$1/$2 [L]
RewriteRule ^([^/]+)/([^/\]+)$ index.php?album=$1&image=$2 [L,QSA]
`
On the RSS feed thing, I answered my own question. I changed the header designation to:
header ('Content-Type: text/xml');
And it works.
Guess it didn't like the application/rss+xml header type for some reason...
That did it. Definitely the -_ in the line, as I put it back after removing it, and it stopped working again.
What is that supposed to do in the rewrite rule?
Thanks Trisweb.