Recent Topics

1 May 27, 2008 01:52    

My b2evolution Version: 1.10.x

The "photoblog" skin is broken for blogs with more than one photo in some posts.

Take a look at this:

http://www.lalaurette.com.ar/blog/index.php/flog/?disp=mediaidx

As you see, the mediaidx is no longer a beautiful rectangular grid of thumbnails.

There are other limitations for this skin (missing container for a flogroll, for example), but almost everything is doable by modifying the CSS code. But this is a php bug, I think. I would fix it myself if I knew enough php, but sadly, I don't.

2 May 27, 2008 03:34

Feel like trying a tiny bit of hacking?

So what seems to be going on is that it is saying "make a thumbnail of each linked image in all these posts, and make a new table row after 8 posts". The obvious drawback, as you've noticed, is that if a post has more than 1 image linked to it then you get more than 8 columns per row. Therefore the corrective action is to make it know that each time it makes an image it needs to count up towards 8 instead of waiting for a new post ID to come along.

With me so far? Good! Crack open skins/_mediax.disp.php in your favorite editor and look for something like this:

	$post_ID = $FileList->rows[$FileList->current_idx-1]->post_ID;
	if( $post_ID != $prev_post_ID ) {
		$prev_post_ID = $post_ID;
		$count++;
		}


The "$count++" is what we want to do something about. Where it's at right now it'll only go up when the post ID changes, which is the root cause of the trouble here. So let's move it. Hopefully to a good place of course!

	$post_ID = $FileList->rows[$FileList->current_idx-1]->post_ID;
	if( $post_ID != $prev_post_ID ) {
		$prev_post_ID = $post_ID;
		}
	$count++;


Personally I think that'll be a dandy spot for it, but wow I really REALLY don't know for sure. So if you try this little change don't rent it's room out just yet because it might want to move back in fairly quick. In the event that, you know, things go from bad to worse.

By the way that's a rather nice couple of beach photos :D

3 May 27, 2008 03:54

EdB wrote:

By the way that's a rather nice couple of beach photos :D

Aaah, being a journalist and being sent to Pinamar to cover the summer season somehow has its pros. ;)

I tried your hack. It worked like a charm, from what I am seeing. I'll report any problem, but for now, everything's wonderful.

So, the fact that the php file is outside the photoblog skin folder means the bug is not in the skin, but in b2evo itself? So this thread should be moved to "b2evolution support"?

Thanks a lot, as always, EdB!

4 May 27, 2008 04:24

I dunno. It's a skin issue, it's a support issue, and to my way of thinking it's also a bug. I'll just leave it where it is and trust that someone with more crisper focus comes along and decides on a more appropriate home for it.

BTW the thing to watch out for will be ... heck I don't really know. 7 images in a row instead of 8 except for the last row obviously. Missing images would be easier for you to notice than anyone else, but honestly I don't really see how this rather small little change can cause much troubles.

5 May 27, 2008 04:28

Moved to the Bug Forum...
and also edited the B2 version number.
Cheers


Form is loading...