I searched and searched and can not figure this out. On a member profile page (Matrix,2.3), it currently lists the last uploaded images as filenames. I would like to replace the icons (file.gif) with small thumbnails that link to the image. And show more than 5. Here's the code from MembersProfile.tpl
Quote:
<tr class="{cycle values="gbEven,gbOdd"}">
<td valign="top">
{g->text text="Last Items:"}
</td><td>
{if count($MembersProfile.lastItems)}
<table>
{foreach from=$MembersProfile.lastItems item=item}
<tr>
<td>
{if $item.canContainChildren}
<img src="{g->url href="modules/members/data/directory.gif"}"
alt="{g->text text="Album"}" width="16" height="16"/>
{else}
<img src="{g->url href="modules/members/data/file.gif"}"
alt="{g->text text="Item"}" width="16" height="16"/>
{/if}
</td><td>
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$item.id`"}">
{$item.title|default:$item.pathComponent}
</a>
</td>
</tr>
{/foreach}
<tr>
<td colspan="2">
<a href="{g->url arg1="view=members.MembersItems"
arg2="userId=`$MembersProfile.user.id`"}">
{g->text text="List All »"}
</a>
</td>
I thought I could just drop a {g->image item=$child image=$child.thumbnail} in there but it won't work. Any ideas? Thanks.
Posts: 40
No response?
I guess it's not as easy as I thought. Is there a better way to do this? Thanks for any suggestions.
Posts: 6136
You could use mediaBlock
something like:
{php} @readfile('http://www.yoursite.com/gallery2/mediaBlock.php?g2_itemId=`$item.id`&useThumb=1'); {/php}or imageblock may even work.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 40
Thanks for the reply suprsidr. Mediablock wouldn't work so I've been trying imageblock. How do I call the item id?
Posts: 6136
it would be more like:
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$item.id`"}">{g->image item=$item image=$item.thumbnail}</a>-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 40
I think I found the problem. I need to modify the helper class file as mentioned in http://gallery.menalto.com/node/59372 for this to work. Is Roi's code from the first post correct? Do I just drop that in line 150ish?