Creating a blank themed page?

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

Comments

  • acrylian Administrator, Developer
    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`
  • 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 <br />
    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">





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



    /css/master.css" />

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


    <?php printHomeLink('', ' > '); ?>" title="Albums Index"><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?> <?php printAlbumTitle(false);?>





    `
  • acrylian Administrator, Developer
    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 <br />
    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">





    <?php printGalleryTitle(); ?> |



    " type="text/css" />

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

    <?php zenJavascript(); ?>





    <?php printAdminToolbox(); ?>





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

    <?php echo getGalleryTitle(); ?>





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




    `

    I hope I missed nothing myself...
  • Parse error: syntax error, unexpected ';' in /public_html/zenphoto/test.php on line 10
    :P sorry

    Where can I put this file? Currently I have it in the zenphoto directory.
  • acrylian Administrator, Developer
    You have to place it in your theme's folder
  • 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
  • acrylian Administrator, Developer
    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">





    <?php printGalleryTitle(); ?>



    /css/master.css" />

    <?php <br />
    printRSSHeaderLink('Gallery','Gallery RSS');

    zenJavascript();

    ?>





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

    <?php echo getGalleryTitle(); ?>

    <?php printHomeLink('', ' > '); echo getGalleryTitle(); ?>



    <?php printAdminToolbox(ZP_INDEX); ?>





    `

    Please note that sometimes pasting code from the forum does not work because of some characters. So take this more as a guide.
  • 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 :/
  • acrylian Administrator, Developer
    If you would post the code we'll could take a look and maybe help.
  • Hmm, it is at: http://www.petermakosch.com/02/zenphoto/
    http://www.petermakosch.com/02/zenphoto/themes/stopdesign/test.php

    `<?php <br />
    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">





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



    /css/master.css" />

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





    <?php <br />
    echo getGalleryTitle();

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

    ?>



    This is a Test



    <?php printHomeLink('', ' > '); ?>" title="Albums Index"><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?> <?php printAlbumTitle(false);?>



    <?php printAdminToolbox(); ?>



    `

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

    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.
  • acrylian Administrator, Developer
    No, subdirectories do not matter. Here is the a example for stoppdesign based on your posted code. I just tested it:
    `

    <?php <br />
    if (!defined('WEBPATH')) die();

    ?>

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





    <?php printGalleryTitle(); ?>



    /css/master.css" />

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





    <?php <br />
    echo getGalleryTitle();

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

    ?>



    This is a Test



    <?php printHomeLink('', ' > '); ?>" title="Albums Index"><?php echo getGalleryTitle();?> > <?php printParentBreadcrumb("", " > ", " > "); ?>



    <?php printAdminToolbox(); ?>





    `
    Thanks for not giving in..:-)
  • 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 :$
Sign In or Register to comment.