I know there are ways to integrate Zenphoto with Wordpress but are there ways to do the opposite? I'm looking for a way to show the first ten albums in the sidebar of my blog, either with a plug or coding that the loads the database and displays the albums with php shortcodes.
Thanks,
Greg
Comments
<?php
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'gallery');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
header ('Content-Type: text/html; charset=' . getOption('charset'));
?>
<div id="photocontent" class="photopost">
<div id="zenphoto">
<div id="albums">
<?php while (next_album()): ?>
<div class="album">
" title="View album: <?php echo getAlbumTitle();?>">
<?php printAlbumThumbImage(getAlbumTitle()); ?>
<div class="albumdesc">
<h3>" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?></h3>
<p><?php printAlbumDesc(); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>
<?php printPageListWithNav('<', '>'); ?>
</div>
</div>
Only problem is that it displays all the albums. How do I fix it to display the first ten?
Thanks,
Greg
Thanks,
Greg
Besides, since you did not show the solution you found there is no way anyone here can provide you with an answer. These things really depend on what has gone on before.
I've tried using plugins and many didn't work.
Here's what I have so far: http://gregschultz.net/gallery.php
With this code:
'<?php
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'gallery');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
header ('Content-Type: text/html; charset=' . getOption('charset'));
?>
<div id="albums">
<?php while (next_album()): ?>
<div class="album">
" title="View album: <?php echo getAlbumTitle();?>">
<?php printAlbumThumbImage(getAlbumTitle()); ?>
<div class="albumdesc">
<h3>" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?></h3>
<p><?php printAlbumDesc(); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>'
It displays all of my albums.
With this code:
'<?php
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'gallery');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
header ('Content-Type: text/html; charset=' . getOption('charset'));
?>
<div id="albums">
<?php while (next_album()): ?>
" title="View album: <?php echo getAlbumTitle();?>">
<?php printAlbumThumbImage(getAlbumTitle()); ?>
<?php printAlbumTitle(); ?>
<?php printAlbumDescAlt(); ?>
<?php endwhile; ?>
</div>'
It displays the first album only.
I'm not familiar with PHP programming so this is why I'm asking for help.
Thanks,
Greg
This takes care of insuring that your HTML markup in the code shows up.
Unless some of your code has been swallowed because of the HTML interpretation, the two loops you show would process exactly the same number of albums. The only significant difference between the two is the HTML `
`
<?php while (next_album()): ?>
" title="View album: <?php echo getAlbumTitle();?>">
<?php printAlbumThumbImage(getAlbumTitle()); ?>
<?php printAlbumTitle(); ?>
<?php break; ?>
<?php endwhile; ?>
`
x10