ZenphotoCMS Forum
Creating a blank themed page? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Creating a blank themed page? (/thread-2322.html)



Creating a blank themed page? - PeterM - 2008-03-03

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


Creating a blank themed page? - acrylian - 2008-03-03

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`


Creating a blank themed page? - PeterM - 2008-03-03

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>`


Creating a blank themed page? - acrylian - 2008-03-03

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...


Creating a blank themed page? - PeterM - 2008-03-03

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.


Creating a blank themed page? - acrylian - 2008-03-04

You have to place it in your theme's folder


Creating a blank themed page? - PeterM - 2008-03-04

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


Creating a blank themed page? - acrylian - 2008-03-04

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.


Creating a blank themed page? - PeterM - 2008-03-05

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 :/


Creating a blank themed page? - acrylian - 2008-03-05

If you would post the code we'll could take a look and maybe help.


Creating a blank themed page? - PeterM - 2008-03-05

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.


Creating a blank themed page? - acrylian - 2008-03-05

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..:-)


Creating a blank themed page? - PeterM - 2008-03-05

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 :$