need help adding date and title in Album.tpl

criticalkaos

Joined: 2011-03-14
Posts: 9
Posted: Wed, 2011-03-16 19:40

Hi i have removed to much from album.tpl im a bit lost i have removed the date and title from all my gallerries but now want to use them and need re add it to album.tpl but lost where to put the code every where i try is wrong or im using the wrong code any help..please..thanks

Quote:
<td>
<table style="width:100%;">
<tr style ="height:85px;">
<td>
</td>
<td valign="top" align="right">
<a name="fb_share"
type="button_count"
share_url="http://www.peterboroughnightlife.co.uk/gallery/index.php"
href="http://www.facebook.com/sharer.php">Share
</a>
<script
src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</script>
</td>
</tr>
<tr>
<td width="1" bgcolor="#333333"> </td>
<td>
&nbsp;&nbsp;SHOWING ALBUM PAGE {$theme.currentPage} OF {$theme.totalPages}
{if !empty($theme.navigator)}
<div class="gbNavigator" style="padding-top:10px;">
{g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
</div>
{/if}
<div>
<table style="width:100%;">
<tr>
{assign var="count" value=0}
{foreach from=$theme.children item=cover}
{*Title = {$cover.title} : Id = {$cover.id}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$cover.id`"}">Album</a>*}

{if $count is div by 5}
</tr><tr>
{/if}
{assign var="count" value=$count+1}
<td style="padding-bottom:7px;padding-left:7px;">
<div style="border-right:3px solid #000000; border-bottom:3px solid #000000; width:151px;height:151px;">
<div style="border:1px solid #999999;width:150px;height:150px;">
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$cover.id`"}&g2_enterAlbum=1" alt="{$cover.title}" title= "{$cover.title}">
{g->image item=$cover image=$cover.thumbnail
onmouseover="this.className='opacity40'"
onmouseout="this.className='opacity10'"}
</a>
{g->block type="core.ItemLinks" item=$cover links=$cover.itemLinks}
</div>
<div>
</td>
{/foreach}

</tr>
</table>
</div>
{if !empty($theme.navigator)}
<div class="gbNavigator">
{g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
</div>
{/if}
</td>
</tr>
<tr style ="height:85px;">
</tr>
</table>
</td>
</tr>
</table>

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-03-16 20:06

Restore from the backup you made before you started editing the file :)

If that doesn't work, there is a reason we ask for this:
FAQ: What information is required when I ask for help in the forums?

In addition to useful information for most problems, it also lists the theme you're using... Otherwise, get a copy of the original version of the theme before you made changes and look at where that code is in that file.
____________________________________________
Like Gallery? Like the support? Donate now!

 
criticalkaos

Joined: 2011-03-14
Posts: 9
Posted: Wed, 2011-03-16 20:43

one thing i cant do is that was hoping for an easier way.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-03-16 21:15

I'm sorry, I mis-placed my magic, remote, undo button.

You can't tell me what theme you're using?

You can't get the original version of the theme? (http://gallery.menalto.com)

What can't you do?
____________________________________________
Like Gallery? Like the support? Donate now!

 
criticalkaos

Joined: 2011-03-14
Posts: 9
Posted: Wed, 2011-03-16 22:21

apologies i didn't read all of your reply, to be honest i thought the rest was a signature lol its late is my excuse.
theme is carbon but its been messed and edited and hacked and due to being rubbish at this sort of thing its taken along time to do it i was just hoping there would be a simple code i cant type somewhere to show the date and file name been trying all night but sometimes its just easier to ask. cheers

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-03-17 01:46

is this what you're missing?

  <div class="gbBlock">
      {g->block type="core.ItemInfo"
          item=$theme.item
          showDate=false
          showSize=true
          showOwner=false
          class="giInfo"}
    </div>

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
criticalkaos

Joined: 2011-03-14
Posts: 9
Posted: Thu, 2011-03-17 19:36

yes mate thats what im missing jus stuck as to where to put it, everywhere i put it is wrong and it dont work?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2011-03-17 21:24

Change "showDate=false" to "showDate=true"

I don't know what you're trying to do here though:

{*Title = {$cover.title} : Id = {$cover.id}

If you want to display the title of an item:

                {if !empty($theme.item.title)}
                <h2> {$theme.item.title|markup} </h2>
                {/if}

I took that out of Matrix because I haven't had time to download and look at Carbon yet.

____________________________________________
Like Gallery? Like the support? Donate now!

 
criticalkaos

Joined: 2011-03-14
Posts: 9
Posted: Mon, 2011-03-21 13:09

hi I tride both of them and it nearly works adding

Quote:
{if !empty($theme.item.title)}
<h2> {$theme.item.title|markup} </h2>
{/if}

puts "Gallery" heading under every thumb rather then name of child gallery or file name of photo.

I Have removed

Quote:
{*Title = {$cover.title} : Id = {$cover.id}

didnt make any change though cheers for the help.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-03-21 13:27

look for the childItems loop:
{foreach from=$theme.children item=child} ... {/foreach}
inside this loop, look for where the thumb is being placed:
{g->image item=$child image=$child.thumbnail class="giThumbnail"}
below that, is where the thumbs info is displayed:

		      {if !empty($child.title)}
			{if $child.canContainChildren}
			<table cellpadding="0" cellspacing="0">
			  <tr>
			    <td class="giTitleIcon">
			      <img src="{g->url href="themes/carbon/images/album.gif"}" alt=""/>
			    </td>
			    <td>
			      <p class="giTitle">{$child.title|markup}</p>
			    </td>
			  </tr>
			</table>
			{else}
			<p class="giTitle">{$child.title|markup}</p>
			{/if}
		      {/if}

and the rest of the infor would be below that:

		      {if !empty($child.summary)}
		      <p class="giDescription">
			{$child.summary|markup|entitytruncate:256}
		      </p>
		      {/if}

		      {if !$theme.params.itemDetails}
			{g->block type="core.ItemInfo"
				  item=$child
				  showSummaries=true
				  class="giInfo"}
		      {else}
			{if ($child.canContainChildren && $theme.params.showAlbumOwner) ||
			    (!$child.canContainChildren && $theme.params.showImageOwner)}
			{assign var="showOwner" value=true}
			{else}
			{assign var="showOwner" value=false}
			{/if}
			{g->block type="core.ItemInfo"
				  item=$child
				  showDate=true
				  showOwner=$showOwner
				  showSize=true
				  showViewCount=true
				  showSummaries=true
				  class="giInfo"}
		      {/if}

All of this info could have been obtained if you had looked at the original version of the template as advised above.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
criticalkaos

Joined: 2011-03-14
Posts: 9
Posted: Mon, 2011-03-21 14:28

hi sorry im not very good with this im trying but cannot get this to work any chance i could give you the .tpl to have a qucik look at if you dont mind?