Page 1 of 1
Put category name under thumbnail
Posted: 23 Mar 2011, 18:59
by plasmax
Hi tere!
Anyone know if there is a way yo put the category name below thumbnail?
I dont understand what php file I have to edit..
I don't like the name on the right
http://www.tukano.net/matterello/index. ... &Itemid=11
Re: Put category name under thumbnail
Posted: 25 Mar 2011, 15:24
by Jan
Hi, you need to customize the categories view template:
components/com_phocagallery/views/categories/tmpl/default.php
Jan
Re: Put category name under thumbnail
Posted: 25 Mar 2011, 15:33
by plasmax
Hi rock, thanks for the reply
I cant find the line to edit in default.php

Re: Put category name under thumbnail
Posted: 28 Mar 2011, 12:41
by plasmax
anyone?
Re: Put category name under thumbnail
Posted: 30 Mar 2011, 19:01
by Jan
Hi, I didn't do such customization yet, so cannot say exactly, but I think, there somewhere in the forum, there are some guides.
Jan
Re: Put category name under thumbnail
Posted: 23 May 2011, 16:52
by numero7
Hello, edit line 78 to 98 by adding a table and some rows...
after that you can stylise the title with inline css...
old
Code: Select all
echo '<tr>';
echo '<td align="center" valign="middle" style="'.$this->tmpl['imagebg'].';text-align:center;"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->tmpl['picasa_correct_width'], $this->tmpl['picasa_correct_height']);
echo JHTML::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('»', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']), '', '', 'style="border:0"');
} else {
echo JHTML::_( 'image.site', $this->categories[$i]->linkthumbnailpath, '', '', '', str_replace('»', '-',$this->categories[$i]->title), 'style="border:0"' );
}
echo '</a></td>';
echo '<td><a href="'.$this->categories[$i]->link.'" class="category'.$this->params->get( 'pageclass_sfx' ).'">'.$this->categories[$i]->title.'</a> ';
if ($this->categories[$i]->numlinks > 0) {echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';}
echo '</td>';
echo '</tr>';
new
Code: Select all
echo'<table>';
echo '<tr>';
echo '<td align="center" valign="top" style="'.$this->tmpl['imagebg'].';text-align:center;"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->tmpl['picasa_correct_width'], $this->tmpl['picasa_correct_height']);
echo JHTML::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('»', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']), '', '', 'style="border:0"');
} else {
echo JHTML::_( 'image.site', $this->categories[$i]->linkthumbnailpath, '', '', '', str_replace('»', '-',$this->categories[$i]->title), 'style="border:0;"' );
}
echo '</a></td></tr>';
echo '<tr><td align="center" valign="top"><a href="'.$this->categories[$i]->link.'" class="category'.$this->params->get( 'pageclass_sfx' ).'">'.$this->categories[$i]->title.'</a> ';
if ($this->categories[$i]->numlinks > 0) {echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';}
echo '</td>';
echo '</tr>';
echo '</table>';
hope it helps...
Re: Put category name under thumbnail
Posted: 26 May 2011, 23:00
by Jan
Hi, thank you for this guide.
Jan