PDA

View Full Version : browse_template questions


romamor
10-31-2006, 10:58 PM
I am testing my first template on my PC but I have a couple of problems I don't know how to solve.

Specifically, I need my browse_template to show one thumb from each category (i.e. album) that I have, with the category name under the thumb. When I click on the thumb, I need to get an album page showing the thumbs for that album.

So, I tried to use the THUMBNAILS or THUMBNAILS_WHOLE_PAGED tags, but I need to wrap the html for each thumb in a <div class="thumb"> , like this:

<div class="thumb">
<a href="..."><img src="../photo.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel</p>
</div>

Of course, putting the THUMBNAILS tag inside the div, places all my thumbs in a single div, and my layout breaks. This is problem number one.

The second problem is that I need to pull only one thumb from each category (i.e. album, to represent that album in my galleries/archives page).

I don't know if this is feasible without massive hacking in the pixelpost code, in any case, I'd appreciate any hints on how to go about it.

At the very least, I'd be happy to just solve the first problem, so that at least I get a layout that does not brake.

GeoS
11-01-2006, 10:49 AM
Can you give us link to example?

<div class="thumb">
<a href="/?x=browse&amp;category=1&amp;pagenum=1"><img src="../photo.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel</p>
<a href="/?x=browse&amp;category=2&amp;pagenum=1"><img src="../photo2.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel2</p>
</div>

romamor
11-01-2006, 01:40 PM
Can you give us link to example?


This is on my PC only, I do not have a link. but here's the relevant code for the first problem:

<div id="thumbsbox" class="clearfix">
<div class="thumb">
<THUMBNAILS_WHOLE_PAGED>
</div>
</div>

I need each individual thumbnail to be enclosed in <div class="thumb">...</div>, like this:

<div class="thumb">
<a href="photo1.html"><img src="photo.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel</p>
</div>

I know this can be done somehow, probably hacking the code for the THUMBNAILS tag, I'll keep looking. Then I need to pull the right caption somehow for each photo.

GeoS
11-01-2006, 06:00 PM
The easiest solution is to make new template file like:
thumb_template.html

Then you can call it in browser by http://yourdomain.com/index.php?x=thumb

Then you can edit this template file and put there want you want, i.e.:
<div class="thumb">
<a href="photo1.html"><img src="photo.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel</p>
</div>
<div class="thumb">
<a href="photo1.html"><img src="photo2.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel2</p>
</div>
<div class="thumb">
<a href="photo1.html"><img src="photo3.jpg" width="60" height="60"/></a>
<p class="thumb_caption">Travel3</p>
</div>
...

romamor
11-02-2006, 02:09 PM
The easiest solution is to make new template file like:
thumb_template.html

Then you can call it in browser by http://yourdomain.com/index.php?x=thumb

Then you can edit this template file and put there want you want, ...

Well, that's exactly what I did and the entire gallery works just fine like that. However, I wanted to use Pixelpost so I don't have to manually edit the HTML file each time I add a new photo/thumb. I was hoping to use one of the Pixelpost tags to pull the thumbs and not have to edit the files manually. I guesst I will have to try some other layout, maybe an existing one, something similar to the existing templates that do work with Pixelpost.

GeoS
11-02-2006, 04:51 PM
This problem isnt at template side but at functionality which isnt part of Pixelpost. PP doesnt generate one thumb for each category. It can generate all thumbs, from specific category, specific month or in paged mode. This what you want needs to be done in additional addon.