Page 1 of 1

Gallery2 Block "Double Title"

Posted: Wed Mar 07, 2007 4:43 am
by JPTN
Gallery2 Random Image Block Plug-In for Serendipity (www.s9y.org) blog.
The code edit is in Gallery2, but I thought I'd ask.

It displays the title "Random Image"

The file that generates this is in /Gallery2/modules/imageblock/templates/ImageBlock.tpl

The code is
{foreach from=$ImageBlockData.blocks item=block}
<div class="one-image">
{if !empty($block.title)}
<h3> {g->text text=$block.title} </h3>
{/if}
The Serendipity plugin references main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_itemFrame=none to call the function.

Unfortunately, I don't know enough php to create something that can disable this for the Serendipity plugin. (Probably add an argument to that main.php? call.

In the attached picture, the thicker title is generated by Gallery2 (which I want removed).
The smaller title is generated by Serendipity, which I want to keep (and has nothing to do with Gallery2).

Image

Any help or information is appreciated!

Posted: Thu Mar 08, 2007 3:21 am
by judebert
You could remove

Code: Select all

 {if !empty($block.title)}
<h3> {g->text text=$block.title} </h3>
{/if}
, but then all the other single-image blocks won't have titles, either.

Perhaps you can look in the style.css and/or the Serendipity plugin to find "one-image"; then you can make or change this rule:

Code: Select all

one-image h3
{
    display:none;
}
That'll get rid of the title, but only in Serendipity.