Add 4x ramdom image in the top of page..

perroquet

Joined: 2006-01-11
Posts: 27
Posted: Sat, 2006-01-28 11:39

Hello !

I try to put in place to the "gallery logo", at the top of the album some thing like that :

Quote:
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p align="center">{php}<?php @readfile('http://www.album.psitta.com/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none&g2_linkTarget=_blank'); ?>{/php}</td>
<td>
<p align="center">{php}<?php @readfile('http://www.album.psitta.com/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none&g2_linkTarget=_blank'); ?>{/php}</td>
<td>
<p align="center">{php}<?php @readfile('http://www.album.psitta.com/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none&g2_linkTarget=_blank'); ?>{/php}</td>
<td>
<p align="center">{php}<?php @readfile('http://www.album.psitta.com/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none&g2_linkTarget=_blank'); ?>{/php}</td>
</tr>
</table>

in the "theme.tpl"

but it don't works :( I've an error message :((

How to "include" the block image 4 time, in this page ??

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-01-28 17:34

if you adding this in theme.tpl you should use {g->block type="imageblock.ImageBlock" ...additional params..} instead of php readfile. also blocks="randomImage|randomImage|randomImage|randomImage" will show 4 random images without repeats. finally, for the above technique, I don't think you want the <?php and ?> inside the {php} and {/php}