Member
Member
PeterM   2008-03-03, 18:51
#1
Hello!
Is there a way I can use http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin to create a blank themed page? Basically, I am looking into fitting my site around Zen Photo, so in order to get the right layout, I need a blank page with space so I can add a php include for news or something similar.

Any pointers?

Thanks
Administrator
Administrator
acrylian   2008-03-03, 19:39
#2
Even easier, just take album.php for example and remove all the album/image stuff. Then rename that page to "info.php" for example and you can call it with `zenphoto/index.php?p=info` or with modrewrite `zenphoto/page/info`
Member
Member
PeterM   2008-03-03, 20:20
#3
Ooo, I get this though:

Zenphoto Error: the requested object was not found. Please go back and try again.

Maybe I took out too much?

`<?php

if (!defined('WEBPATH')) die();

$firstPageImages = normalizeColumns(3, 6);

setOption('images_per_page', getOption('images_per_page') - 1, false);

if ($firstPageImages > 0) { $firstPageImages = $firstPageImages - 1; }

setOption('thumb_crop_width', 89, false);

setOption('thumb_crop_height', 67, false);

global $_zp_current_image;

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title><?php printGalleryTitle() . " > " . getAlbumTitle();?></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="<?php echo $_zp_themeroot ?>/css/master.css" />

<?php printRSSHeaderLink('Album',getAlbumTitle()); zenJavascript(); ?>

</head>

<body class="gallery">

<p id="path"><?php printHomeLink('', ' > '); ?><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?> <?php printAlbumTitle(false);?>




[hr]

Powered by ZenPhoto.




</body>

</html>`
Administrator
Administrator
acrylian   2008-03-03, 21:00
#4
No, more too less, you need to remove all album related stuff, since there is no album context, you get an error.

Here the more or less core stuff (from default theme):
`<?php

if (!defined('WEBPATH')) die();

$themeResult = getTheme($zenCSS, $themeColor, 'light'); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>

<title><?php printGalleryTitle(); ?> | </title>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<link rel="stylesheet" href="<?php echo $zenCSS ?>" type="text/css" />

<?php printRSSHeaderLink('',''; ?>

<?php zenJavascript(); ?>

</head>

<body>

<?php printAdminToolbox(); ?>



<div id="gallerytitle">

<?php if (getOption('Allow_search')) { printSearchForm(); } ?>

<?php echo getGalleryTitle(); ?>



</div>

<?php printRSSLink('', '', 'RSS', ''); ?> | Archive View | Powered by zenphoto

</body>

</html>`

I hope I missed nothing myself...
Member
Member
PeterM   2008-03-03, 22:46
#5
Parse error: syntax error, unexpected ';' in /public_html/zenphoto/test.php on line 10
Tongue sorry

Where can I put this file? Currently I have it in the zenphoto directory.
Administrator
Administrator
acrylian   2008-03-04, 10:09
#6
You have to place it in your theme's folder
Member
Member
PeterM   2008-03-04, 10:44
#7
How would I edit it to work outside the themes folder, say, in the "zenphoto" root folder?
I also still get the same error: `Parse error: syntax error, unexpected ';' in /public_html/zenphoto/themes/stopdesign/test.php on line 10` - looks like there was a missing ")" so i put that in, but now i get a blank page: http://www.petermakosch.com/02/zenphoto/themes/stopdesign/test.php

Hmm :S
Administrator
Administrator
acrylian   2008-03-04, 11:13
#8
Why do you want that page to be outside the theme's folder? To repeat it, the url for a custom theme page ist `zenphoto/index.php?p=info` or with modrewrite `zenphoto/page/info`

There is apparently something missing in your theme, since it shows an error, too, when using the correct url. of course my example was from the default theme which is much simple than the somewhat stopdesign theme. So her an empty page for stopdesign:
`

<?php if (!defined('WEBPATH')) die(); normalizeColumns(3, 6); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title><?php printGalleryTitle(); ?></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="<?php echo $_zp_themeroot ?>/css/master.css" />

<?php

printRSSHeaderLink('Gallery','Gallery RSS');

zenJavascript();

?>

</head>

<body class="index">

<?php echo getGalleryTitle(); ?><?php if (getOption('Allow_search')) { printSearchForm(''); } ?>



<?php echo getGalleryTitle(); ?>



<p id="path"><?php printHomeLink('', ' > '); echo getGalleryTitle(); ?>




[hr]



Photo Templates from Stopdesign.

Powered by ZenPhoto.






<?php printAdminToolbox(ZP_INDEX); ?>

</body>

</html>

`

Please note that sometimes pasting code from the forum does not work because of some characters. So take this more as a guide.
Member
Member
PeterM   2008-03-05, 10:31
#9
Well, I edited it to look the same but I am still getting a blank page.
Not to worry, I will find another way of adding news content :/
Administrator
Administrator
acrylian   2008-03-05, 10:47
#10
If you would post the code we'll could take a look and maybe help.
Member
Member
PeterM   2008-03-05, 13:33
#11
Hmm, it is at: http://www.petermakosch.com/02/zenphoto/
http://www.petermakosch.com/02/zenphoto/themes/stopdesign/test.php

`<?php

if (!defined('WEBPATH')) die();

$firstPageImages = normalizeColumns(3, 6);

setOption('images_per_page', getOption('images_per_page') - 1, false);

if ($firstPageImages > 0) { $firstPageImages = $firstPageImages - 1; }

setOption('thumb_crop_width', 89, false);

setOption('thumb_crop_height', 67, false);

global $_zp_current_image;

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title><?php printGalleryTitle() . " > " . getAlbumTitle();?></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="<?php echo $_zp_themeroot ?>/css/master.css" />

<?php printRSSHeaderLink('Album',getAlbumTitle()); zenJavascript(); ?>

</head>

<body class="gallery">

<?php

echo getGalleryTitle();

if (getOption('Allow_search')) { printSearchForm(); }

?>



<div class="galleryinfo">

This is a Test



</div>

<p id="path"><?php printHomeLink('', ' > '); ?><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?> <?php printAlbumTitle(false);?>




[hr]

Powered by ZenPhoto.




<?php printAdminToolbox(); ?>

</body>

</html>`

Would it matter that I have it within a few directories? It's just this is my test bed and then I will move everything to a new location when it is working okay-ish Smile

I will have a look at editing index.php also, as this might be another option.

I would have usually given up by now, but I really like the script.
Thanks for the support on this issue.
Administrator
Administrator
acrylian   2008-03-05, 13:51
#12
No, subdirectories do not matter. Here is the a example for stoppdesign based on your posted code. I just tested it:
`

<?php

if (!defined('WEBPATH')) die();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title><?php printGalleryTitle(); ?></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="<?php echo $_zp_themeroot ?>/css/master.css" />

<?php printRSSHeaderLink("",""); zenJavascript(); ?>

</head>

<body class="gallery">

<?php

echo getGalleryTitle();

if (getOption('Allow_search')) { printSearchForm(); }

?>



<div class="galleryinfo">

This is a Test



</div>

<p id="path"><?php printHomeLink('', ' > '); ?><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?>




[hr]

Powered by ZenPhoto.




<?php printAdminToolbox(); ?>

</body>

</html>

`
Thanks for not giving in..:-)
Member
Member
PeterM   2008-03-05, 14:01
#13
I am so thick sometimes.
No, really. So all this time, I have been trying to call it from it's absolute location, but after re-reading, calling it from the index with the ?p=blah query and it works a treat.

Boy, I feel so sheepish! oops!
Sorry :$
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.