Photo Gallery setup

30 posts by 7 authors in: Forums > CMS Builder
Last Post: April 30, 2012   (RSS)

Thanks.. :-)

Re: [efi-revivo] Photo Gallery setup

By efi-revivo - December 6, 2009 - edited: December 8, 2009

how can i add jump to page?

Re: [efi-revivo] Photo Gallery setup

By ross - December 8, 2009

Hi there.

I don't quite understand this part:

"and whan i go to the next page it will show the first image big? now its show the first image on gallery each page "

Could you give me some more detail? Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Photo Gallery setup

i want to see the first image on each page in the middle. where the big image show.
my gallery page (http://www.midnights.co.il/gallery.php?8)

Re: [efi-revivo] Photo Gallery setup

By ross - December 11, 2009

Hi there.

I think I understand now :). You want a way to link right to a specific image instead of always seeing the same one in the middle first.

Does that sound right? If so, could you post an up to date copy of your template so I can see how it's setup?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [efi-revivo] Photo Gallery setup

By Chris - December 15, 2009

Here is your existing code which displays the big image:

<td colspan="2" align="center" valign="middle" bgcolor="#333333"><DIV class="images" id="photoload"><?php foreach ($clubsRecord['images'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php break; ?>
<?php endforeach ?></DIV></td>


Earlier in the page, you calculate $firstIndex. So, to display the first image on the current photo page as the big image, try replacing the above with this:

<?php $upload = $clubsRecord['images'][$firstIndex] ?>
<td colspan="2" align="center" valign="middle" bgcolor="#333333"><DIV class="images" id="photoload">
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
</DIV></td>


I hope this helps!
All the best,
Chris
thanks.

and how can i add jump to page that user can type the number of the page and click go to page?
the problem that i have now is the first page start with 0 and the next page is 1 and if i have 6 pages and the user type 6 i get error..

Re: [efi-revivo] Photo Gallery setup

By Chris - December 15, 2009

Hi efi-revivo,

To add a jump-to-page feature, you'd only need an HTML form:

<form action="?num=<?php echo $galleryRecord['num'] ?>" method="post">
<input type="text" name="photoPage" />
<input type="submit" value="Go" />
</form>


To avoid errors, you could add this line right after $firstIndex is assigned:

if ($firstIndex > sizeof($weekpicRecord['images'])-1) { $firstIndex = 0; }

I hope this helps! :D
All the best,
Chris
Hi Chris,

The jump page don't work for me.

I have 6 pages the first page is 0 and no 1 this is the problem so when i click page 6 i get error.
to get page 6 i need to click page 5...
how can i fix it that the pages start with 1?