Pages (2): 1 2   
Member
Member
cloe89   2010-01-13, 19:09
#1
hello! There's a plugin to download an album of a gallery? Thanks
Administrator
Administrator
acrylian   2010-01-13, 20:01
#2
No, if you had looked on our extensions section..:-) but we have this function:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintAlbumZip
Member
Member
cloe89   2010-01-13, 21:44
#3
how i use this function?
Administrator
Administrator
acrylian   2010-01-14, 10:53
#4
Add the function on the album page where you want it to appear. Please read the theming tutorial to learn how to modify Zenphoto themes.
Member
Member
cloe89   2010-01-14, 16:49
#5
sorry i don't understand english very well...
Member
Member
cloe89   2010-01-14, 17:18
#6
in what page i have to put the function?
Member
Member
cloe89   2010-01-14, 17:47
#7
i have the stopdesign theme. Please help me.
Administrator
Administrator
acrylian   2010-01-14, 18:29
#8
The album.php page as this generates an .zip archive of the album.
Member
Member
cloe89   2010-01-15, 11:13
#9
this is my page album.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
<head>
<?php if (!defined('WEBPATH')) die();

require_once('normalizer.php');

header('Last-Modified: ' . gmdate('D, d M Y H:iConfused').' GMT');

?><?php zenJavascript(); ?>
<title><?php echo getBareGalleryTitle(); ?>
> <?php echo getBareAlbumTitle(); ?></title>
<meta http-equiv="content-type"
content="text/html; charset=<?php echo getOption('charset'); ?>" />
<link rel="stylesheet" type="text/css"
media="screen, projection"
href="<?php echo $_zp_themeroot ?>/css/master.css" />
<?php printRSSHeaderLink('Album',getAlbumTitle());

if (function_exists('getCommentErrors') && getCommentErrors()) {

$errors = 1;

?>
<link rel="stylesheet" type="text/css"
href="<?php echo $_zp_themeroot ?>/css/comments-show.css" />
<?php } else {

$errors = 0;

?>
<link rel="stylesheet" type="text/css"
href="<?php echo $_zp_themeroot ?>/css/comments-hide.css" />
<?php }

?>
</head>
<body class="gallery">
<?php echo getGalleryTitle();

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

?>
<div id="content">
<div class="galleryinfo">
<h1><?php printAlbumTitle(true);?></h1>
<p class="desc"><?php printAlbumDesc(true); ?></p>
</div>
<?php $first = true;

while (next_album()) {

if ($first) {

echo '<div class="galleries">';

echo "\n<h2></h2>\n
[list]\n";

$first = false;

}

?>
<li class="gal"> <a
href="<?php echo htmlspecialchars(getAlbumLinkURL());?>"
title="<?php echo gettext('View album:').' '; echo getAnnotatedAlbumTitle();?>"
class="img"><?php printCustomAlbumThumbImage(getAnnotatedAlbumTitle(), null, 210, null, getOption('Gallery_image_crop_width'), getOption('Gallery_image_crop_height')); ?>
<h3><a
href="<?php echo htmlspecialchars(getAlbumLinkURL());?>"
title="<?php echo gettext('View album:').' '; echo getAnnotatedAlbumTitle();?>"><?php printAlbumTitle(); ?></h3>
<p><?php $anumber = getNumSubalbums();

$inumber = getNumImages();

if ($anumber > 0 || $inumber > 0) {

echo '<p>[i](';

if ($anumber == 0 && $inumber == 1) {

printf(gettext('1 photo'));

} else if ($anumber == 0 && $inumber > 1) {

printf(gettext('%u photos'), $inumber);

} else if ($anumber == 1 && $inumber == 1) {

printf(gettext('1 album, 1 photo'));

} else if ($anumber > 1 && $inumber == 1) {

printf(gettext('%u album, 1 photo'), $anumber);

} else if ($anumber > 1 && $inumber > 1) {

printf(gettext('%1$u album, %2$u photos'), $anumber, $inumber);

} else if ($anumber == 1 && $inumber == 0) {

printf(gettext('1 album'));

} else if ($anumber > 1 && $inumber == 0) {

printf(gettext('%u album'),$anumber);

} else if ($anumber == 1 && $inumber > 1) {

printf(gettext('1 album, %u photos'), $inumber);

}

echo ')[/i]';

}

$text = getAlbumDesc();

if(strlen($text) > 50) {

$text = preg_replace("/[^ ]*$/", '', sanitize(substr($text, 0, 50)),1)."...";

}

echo $text;

?> </p>

<?php }

if (!$first) { echo "\n[/list]
\n</div>\n"; }

?>
<ul class="slideset">
<?php $firstImage = null;

$lastImage = null;

if ($myimagepage > 1) {

?>
<li class="thumb"><span class="backward"><em
style="background-image: url(<?php echo $_zp_themeroot ?>/images/moreslide_prev.gif);"><a
href="<?php echo htmlspecialchars(getPrevPageURL()); ?>"
style="background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><?php echo gettext('Next page'); ?></span>
<?php }

while (next_image(false, $firstPageImages)) {

if (is_null($firstImage)) {

$lastImage = imageNumber();

$firstImage = $lastImage;

} else {

$lastImage++;

}

if (isLandscape()) {

$iw = 89;

$ih = NULL;

$cw = 89;

$ch = 67;

} else {

$iw = NULL;

$ih = 89;

$ch = 89;

$cw = 67;

}

echo '<li class="thumb"><span><em style="background-image:url(' . htmlspecialchars($_zp_current_image->getCustomImage(NULL, $iw, $ih, $cw, $ch, NULL, NULL, true)) . '); ">"'.getImageTitle().'"</span>';

}

if (!is_null($lastImage) && $lastImage < getNumImages()) {

$np = getCurrentPage()+1;

?>
<li class="thumb"><span class="forward"><em
style="background-image: url(<?php echo $_zp_themeroot ?>/images/moreslide_next.gif);">
<a>"
style="background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><?php echo gettext('Next page'); ?></a></span>
<?php }

?>

<div class="galleryinfo">
<?php printRSSLink('Album', '<p>', gettext('Album RSS feed').' ', '</p>', true, 'i'); ?>

<p><?php if (!is_null($firstImage)) {

echo '<em class="count">';

printf(gettext('photos %1$u-%2$u of %3$u'), $firstImage, $lastImage, getNumImages());

echo "";

}

?><?php if (function_exists('printSlideShowLink') && isImagePage()) printSlideShowLink(gettext('View Slideshow')); ?><?php if (hasPrevPage()) { ?> <a
href="<?php echo htmlspecialchars(getPrevPageURL()); ?>"
accesskey="x">«<?php echo gettext('prev page'); ?>
<?php } ?><?php if (hasNextPage()) { if (hasPrevPage()) { echo ' '; } ?> <a
href="<?php echo htmlspecialchars(getNextPageURL()); ?>"
accesskey="x"><?php echo gettext('next page'); ?>
»<?php } ?> </p>
<?php if (function_exists('printUserLogin_out')) { printUserLogin_out(""); } ?>
</div>
</div>
<p id="path"><?php printHomeLink('', ' > '); ?> <a
href="<?php echo htmlspecialchars(getGalleryIndexURL(false));?>"
title="<?php echo gettext('Main Index'); ?>"><?php echo gettext('Home');?>
> <a
href="<?php echo htmlspecialchars(getGalleryIndexURL());?>"
title="<?php echo gettext('Albums Index'); ?>"><?php echo getGalleryTitle();?>
><?php printParentBreadcrumb("", " > ", " > "); ?><?php printAlbumTitle(false);?> </p>
<div class="main"><?php if (function_exists('printCommentForm')) {

require_once('comment.php');

}

?> </div>
<div id="footer">
<hr />
<p><?php printZenphotoLink(); ?> </p>
</div>
<?php printAdminToolbox(); ?>
</body>
</html>

where i have to insert the function? sorry for my bad english.
Member
Member
cloe89   2010-01-15, 11:25
#10
solved! I added <?php printAlbumZip(true);?> after <p class="desc"><?php printAlbumDesc(true); ?></p>.
thanks for your help.
Administrator
Administrator
acrylian   2010-01-15, 11:41
#11
Was not really that hard, was it?..;-)
Member
Member
cloe89   2010-01-15, 14:32
#12
no, thanks Big Grin
Member
Member
cloe89   2010-01-15, 21:36
#13
hi! now i have a download button, but i have this error in the top of the page:
http://theultimategallery.net/gallery/telefilm/

how i can fix it?
Administrator
Administrator
acrylian   2010-01-15, 21:38
#14
Hm, the function should not have anything to do with that. Did you change anything else?
Member
Member
sbillard   2010-01-16, 00:57
#15
You may have done a cut and paste from somewhere. Anyway, the HTML for your title is definately wrong. Probably there are other things as well. Compare your version of the script with the orginal and see what has got changed.
Member
Member
cloe89   2010-01-16, 12:27
#16
No, i didn't change anything else...and this error appear only with the current theme (the one that i modified.)
Member
Member
cloe89   2010-01-16, 16:01
#17
i saw also that the effervescent theme has in the option the possibility to check : Download a zip from the album.
There's any other theme that do this in automatic?
Administrator
Administrator
acrylian   2010-01-16, 16:16
#18
If that error only appears in your modified theme you will have to find out what is different to those where it does not.

None of the other three standard themes do have that (since it is normally easy to add that if needed)
Member
Member
cloe89   2010-01-17, 09:31
#19
but this fuction i added : <?php printAlbumZip(true);?> it's correct?
Member
Member
cloe89   2010-01-17, 13:27
#20
the only difference from the original album.php is <?php printAlbumZip(true);?>
Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.