hide thumbnail name in entire site

diegosanchez

Joined: 2009-12-07
Posts: 54
Posted: Wed, 2009-12-09 02:45

i wish to hide the thumbnail name from being displayed. it currently shows up everywhere. and shows in the exact same place on the thumbnail screen as the album screen.

i am modding the classic theme

{*
* $Revision$
* Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates
*}
<table width="100%" align="left" cellspacing="0" cellpadding="0">
<tr>
<td style="background-image:url(img/orangebar.png); background-repeat:repeat-x; height:18px;">
<div id="gsNavBar" class="gcBorder1">
<div class="gbBreadCrumb">
{g->block type="core.BreadCrumb"}
</div>
</div> </td>
{if !empty($theme.params.sidebarBlocks)}
<script type="text/javascript">
{* hide the sidebar if there's nothing in it *}
// <![CDATA[
var el = document.getElementById("gsSidebarCol");
var text = el.innerText; // IE
if (!text) text = el.textContent; // Firefox
if (!text || !text.match(/\S/)) el.style.display = 'none';
// ]]>
</script>
{/if}
</tr><tr><td>
{if !empty($theme.navigator)}
<div class="gbBlock gcBackground2 gbNavigator">
{g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
</div>
{/if}

{if !count($theme.children)}
<div class="gbBlock giDescription gbEmptyAlbum">
<h3 class="emptyAlbum">
{g->text text="This album is empty."}
{if isset($theme.permissions.core_addDataItem)}
<br/>
<a href="{g->url arg1="view=core.ItemAdmin" arg2="subView=core.ItemAdd" arg3="itemId=`$theme.item.id`"}"> {g->text text="Add a photo!"} </a>
{/if}
</h3>
</div>
{else}

{assign var="childrenInColumnCount" value=0}
<div class="gbBlock">
<table id="gsThumbMatrix" width="100%">
<tr valign="top">
{foreach from=$theme.children item=child}

{* Move to a new row *}
{if ($childrenInColumnCount == $theme.params.columns)}
</tr>
<tr valign="top">
{assign var="childrenInColumnCount" value=0}
{/if}

{assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"}
<td class="{if $child.canContainChildren}giAlbumCell gcBackground1{else}giItemCell{/if}">
{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
{assign var=frameType value="albumFrame"}
{capture assign=linkUrl}{g->url arg1="view=core.ShowItem"
arg2="itemId=`$child.id`"}{/capture}
{else}
{assign var=frameType value="itemFrame"}
{capture assign=linkUrl}{g->url params=$theme.pageUrl
arg1="itemId=`$child.id`"}{/capture}
{/if}
<div>
{if isset($theme.params.$frameType) && isset($child.thumbnail)}
{g->container type="imageframe.ImageFrame"
frame=$theme.params.$frameType
width=$child.thumbnail.width height=$child.thumbnail.height}
<a href="{$linkUrl}">
{g->image id="%ID%" item=$child image=$child.thumbnail class="%CLASS% giThumbnail"}
</a>
{/g->container}
{elseif isset($child.thumbnail)}
<a href="{$linkUrl}">
{g->image item=$child image=$child.thumbnail class="giThumbnail"}
</a>
{else}
<a href="{$linkUrl}" class="giMissingThumbnail">
{g->text text="no thumbnail"}
</a>
{/if}
</div>
{if !empty($child.title)}
<p class="giAlbumTitle">
{$child.title|markup}
</p>
{g->block type="core.ItemInfo"
item=$child
showDate=false
showOwner=false
showSize=false
showViewCount=false
showSummaries=false
class="giInfo"}
{g->block type="core.ItemLinks" item=$child links=$child.itemLinks}

{/if}
</td>

{/foreach}

{* flush the rest of the row with empty cells *}
{section name="flush" start=$childrenInColumnCount loop=$theme.params.columns}
<td>&nbsp;</td>
{/section}
</tr>
</table>
</div>
{/if}

{if !empty($theme.navigator)}
<div class="gbBlock gcBackground2 gbNavigator">
{g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
</div>
{/if}

{g->block type="core.GuestPreview" class="gbBlock"}

{* Our emergency edit link, if the user removes all blocks containing edit links *}
{g->block type="core.EmergencyEditItemLink" class="gbBlock" checkBlocks="sidebar,album"}

{* Show any other album blocks (comments, etc) *}
{foreach from=$theme.params.albumBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}
</div>
</td>
</tr>
</table>

---------

at current i can only see <p class="giAlbumTitle">{$child.title|markup}</p> being the culprit but this gets rid of my album name too when i remove it. any help would be great!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-12-09 03:19

What have you modified? Perhaps you could bold it?
Also try adding code blocks in [ code ] [ /code ] so it is easier to read. ( remove the spaces in [ code] and [/code ] )

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
diegosanchez

Joined: 2009-12-07
Posts: 54
Posted: Wed, 2009-12-09 04:34
{*
 * $Revision$
 * Read this before changing templates!  http://codex.gallery2.org/Gallery2:Editing_Templates
 *}
<table width="100%" align="left" cellspacing="0" cellpadding="0">
  <tr>
<td  style="background-image:url(img/orangebar.png); background-repeat:repeat-x; height:18px;">
      <div id="gsNavBar" class="gcBorder1">
	<div class="gbBreadCrumb">
	  {g->block type="core.BreadCrumb"}
	</div>
      </div>      </td>
      {if !empty($theme.params.sidebarBlocks)}
      <script type="text/javascript">
        {* hide the sidebar if there's nothing in it *}
        // <![CDATA[
        var el = document.getElementById("gsSidebarCol");
        var text = el.innerText;  // IE
        if (!text) text = el.textContent; // Firefox
        if (!text || !text.match(/\S/)) el.style.display = 'none';
        // ]]>
      </script>
      {/if}
      </tr><tr><td>
        {if !empty($theme.navigator)}
        <div class="gbBlock gcBackground2 gbNavigator">
          {g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
        </div>
        {/if}

        {if !count($theme.children)}
        <div class="gbBlock giDescription gbEmptyAlbum">
          <h3 class="emptyAlbum">
	    {g->text text="This album is empty."}
	    {if isset($theme.permissions.core_addDataItem)}
	    <br/>
              <a href="{g->url arg1="view=core.ItemAdmin" arg2="subView=core.ItemAdd" arg3="itemId=`$theme.item.id`"}"> {g->text text="Add a photo!"} </a>
	    {/if}
          </h3>
        </div>
        {else}

        {assign var="childrenInColumnCount" value=0}
        <div class="gbBlock">
          <table id="gsThumbMatrix" width="100%">
            <tr valign="top">
              {foreach from=$theme.children item=child}

              {* Move to a new row *}
              {if ($childrenInColumnCount == $theme.params.columns)}
            </tr>
            <tr valign="top">
              {assign var="childrenInColumnCount" value=0}
              {/if}

	      {assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"}
	      <td class="{if $child.canContainChildren}giAlbumCell gcBackground1{else}giItemCell{/if}">
		{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
		{assign var=frameType value="albumFrame"}
		{capture assign=linkUrl}{g->url arg1="view=core.ShowItem"
						arg2="itemId=`$child.id`"}{/capture}
		{else}
		{assign var=frameType value="itemFrame"}
		{capture assign=linkUrl}{g->url params=$theme.pageUrl
						arg1="itemId=`$child.id`"}{/capture}
		{/if}
	<div>
  {if isset($theme.params.$frameType) && isset($child.thumbnail)}
    {g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType width=$child.thumbnail.width height=$child.thumbnail.height}
{* alternate link code for Lightbox JS *}
		{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem' || $child.entityType == 'GalleryMovieItem')}
  			<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" >
  			{else}
<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.resizedId`"}"title="{$child.title|markup}" pageLink="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}"rel="lightbox[photos]" >
    {/if}
{*end alternate link code for Lightbox JS *}
   {g->image id="%ID%" item=$child image=$child.thumbnail class="%CLASS% giThumbnail"}
    </a>
    {/g->container}
  {elseif isset($child.thumbnail)}
		{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem' || $child.entityType == 'GalleryMovieItem')}
  			<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" >
  			{else}
 <a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.resizedId`"}" title="{$child.title|markup}" pageLink="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}"rel="lightbox[photos]" >
    {/if}
   {g->image item=$child image=$child.thumbnail class="giThumbnail"}
    </a>
  {else}
    <a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}"
    class="giMissingThumbnail">
    {g->text text="no thumbnail"}
    </a>
  {/if}
</div>

		{if !empty($child.title)}
		<p class="giAlbumTitle">	
		    {$child.title|markup}
		</p>
                {g->block type="core.ItemInfo"
                          item=$child
                          showDate=false
			  showOwner=false
                          showSize=false
       		          showViewCount=false
                          showSummaries=false
                          class="giInfo"}
                {g->block type="core.ItemLinks" item=$child links=$child.itemLinks}

		{/if}
	      </td>


              {/foreach}

              {* flush the rest of the row with empty cells *}
              {section name="flush" start=$childrenInColumnCount loop=$theme.params.columns}
              <td>&nbsp;</td>
              {/section}
            </tr>
          </table>
        </div>
        {/if}

        {if !empty($theme.navigator)}
        <div class="gbBlock gcBackground2 gbNavigator">
          {g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
        </div>
        {/if}


		{g->block type="core.EmergencyEditItemLink" class="gbBlock" checkBlocks="sidebar,album"}
        {g->block type="core.GuestPreview" class="gbBlock"}

	{* Our emergency edit link, if the user removes all blocks containing edit links *}


        {* Show any other album blocks (comments, etc) *}
        {foreach from=$theme.params.albumBlocks item=block}
          {g->block type=$block.0 params=$block.1}
        {/foreach}
      </div>
    </td>
  </tr>
</table>

iv chopped and changed quite abit but i dont wish for image thumbnails to show the text of the image, is there a code to alter it to do this? as i am to understand that the <p class="giAlbumTitle">{$child.title|markup}</p> in my album.tpl script shows up whether its an album name or thumnbnail name.

thanks

ps. i found this bit of code i had chopped out from the original script.

		  {if $child.canContainChildren && (!isset($theme.params.albumFrame)
		   || $theme.params.albumFrame == $theme.params.itemFrame)}
		    {* Add prefix for albums unless imageframe will differentiate *}
		    {g->text text="Album: %s" arg1=$child.title|markup}
		  {else}
		    {$child.title|markup}
		  {/if}
 
diegosanchez

Joined: 2009-12-07
Posts: 54
Posted: Wed, 2009-12-09 21:12

bump

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-12-10 00:51

removing
{$child.title|markup}
Should do the trick.
It is hard to tell what you have changed.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
diegosanchez

Joined: 2009-12-07
Posts: 54
Posted: Thu, 2009-12-10 11:26

removing
{$child.title|markup}

removes my album titles. i think i need an IF statement or something.

 
diegosanchez

Joined: 2009-12-07
Posts: 54
Posted: Thu, 2009-12-10 12:03

Hiya Dave

i figured it out

		<p class="giAlbumTitle">	
		  {if $child.canContainChildren && (!isset($theme.params.albumFrame)
		   || $theme.params.albumFrame == $theme.params.itemFrame)}
		    {* Add prefix for albums unless imageframe will differentiate *}
		    {g->text text="%s" arg1=$child.title|markup}
		  {else}
		    
		  {/if}
		</p>

in the above code between {else} and {/if} i removed {$child.title|markup} and this was to display the images. and between {g->text=" and %s" was the word Albums: which appears on your gallery when viewing albums so i put two and two together got 5 and removed the 2 pieces :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-12-10 14:43

Glad you got it sorted and learned some stuff along the way. Now you can call yourself a theme developer! :-)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
diegosanchez

Joined: 2009-12-07
Posts: 54
Posted: Thu, 2009-12-10 15:05

haha

i just need to rename the theme from classic to my own now :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-12-10 18:42