A few Requests

Phoca Gallery - image gallery extension
Keldek
Phoca Member
Phoca Member
Posts: 12
Joined: 18 Dec 2007, 07:46

Hello, I've sta

Post by Keldek »

Hello, I've started using your phocagallery today and am very impressed thus far. Very nice work indeed.

I do however have a few requests.

1. When using the category list layout, I've noticed that all categories are displayed vertical only, which leaves a lot of unused space on the page.

--Say I have 16 total categories, is there a way I can have them displayed in a 4x4 (4 across by 4 down) that way I can make use of the empty space on the page?

2. When using the category list layout, each category name is displayed next to the thumbnail image.

--Is it possible to have the category name display below the thumbnail image, again to better utilize my page space?

Additionally, if there's a way I can do this manually, which php files would I need to edit in order to achieve my goal?

Thanks a ton in advance for any help you may be able to provide.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

1. Added into the fe

Post by Jan »

1. Added into the feature request list Categories Columns
2. You must change the CSS or HTML code... because I cannot do it as parameters...Because there will be hundreds of parameters and it will be confused (because somebody want it next to the photo, somebody below the photo, ... I hope, you understand ...)

Additionally, if there's a way I can do this manually, which php files would I need to edit in order to achieve my goal?

CSS: joomla/components/com_phocagallery/assets/phocagallery.css
HTML: joomla/components/com_phocagallery/views/categories/tmpl/default.php

if ($this->displayimagecategories == 1)
{
echo '<table border="0">';
foreach ( $this->categories as $category )
{
echo '<tr>';
echo '<td><a href="'.$category->link.'">'.JHTML::_( 'image.site', $category->linkt
humbnailpath, '', '', '', $category->title, 'style="border:0"' ).'</a></td>';
echo '<td><a href="'.$category->link.'" class="category'.$this->params->get( 'page
class_sfx' ).'">'.$category->title.'</a> ';
echo '<span class="small">('.$category->numlinks.')</span></td>';
echo '</tr>';
}
echo '</table>';
}
If you find Phoca extensions useful, please support the project
Keldek
Phoca Member
Phoca Member
Posts: 12
Joined: 18 Dec 2007, 07:46

I'll give this

Post by Keldek »

I'll give this a whirl later on today. Thanks so much for the info and the quick reply
Keldek
Phoca Member
Phoca Member
Posts: 12
Joined: 18 Dec 2007, 07:46

Well, so far I'

Post by Keldek »

Well, so far I've gotten it to display how I'd like... changing the following code located in joomla/components/com_phocagallery/views/categories/tmpl/default.php

Original:
if ($this->displayimagecategories == 1)
{
echo '<table border="0">';
foreach ( $this->categories as $category )
{
echo '<tr>';
echo '<td><a href="'.$category->link.'">'.JHTML::_( 'image.site', $category->linkt
humbnailpath, '', '', '', $category->title, 'style="border:0"' ).'</a></td>';
echo '<td><a href="'.$category->link.'" class="category'.$this->params->get( 'page
class_sfx' ).'">'.$category->title.'</a> ';
echo '<span class="small">('.$category->numlinks.')</span></td>';
echo '</tr>';
}
echo '</table>';
}


New:
if ($this->displayimagecategories == 1)
{
echo '<table border="0">';
echo '<tr>';
foreach ( $this->categories as $category )
{
echo '<td width="20%" align="center"><a href="'.$category->link.'">'.JHTML::_( 'im
age.site', $category->linkthumbnailpath, '', '', '', $category->title, 'style="border
:0"' ).'</a>';
echo '<br><a href="'.$category->link.'" class="category'.$this->params->get( 'page
class_sfx' ).'">'.$category->title.'</a> ';
echo '<br><span class="small">('.$category->numlinks.')</span></td>';
}
echo '</tr>';
echo '</table>';
}


The only problem I'm having now is getting it to close the <tr> (and open a new <tr>) if <td> == 5... just not sure how to go about it as my php skills are far from being labeled masterful lol.

If you have any insight of how I can accomplish this I'd be very grateful.

Thanks again
Keldek
Phoca Member
Phoca Member
Posts: 12
Joined: 18 Dec 2007, 07:46

Got it working prope

Post by Keldek »

Got it working properly now... below is the code I use to accomplish what I need:

<?php if ($this->displayimagecategories == 1)
{
echo '<table border="0">';
echo '<tr>';
$intCounter = 0;
foreach ( $this->categories as $category )
{
$intCounter++;
echo '<td width="20%" align="center"><a href="'.$category->link.'">'.JHTML::_( 'im
age.site', $category->linkthumbnailpath, '', '', '', $category->title, 'style="border
:0"' ).'</a>';
echo '<br><a href="'.$category->link.'" class="category'.$this->params->get( 'page
class_sfx' ).'">'.$category->title.'</a> ';
echo '<br><span class="small">('.$category->numlinks.')</span></td>';
if (($intCounter%5)==0) {echo "</tr><tr>";}

}
echo '</tr></table>';
}
else
{
?>


One last thing though.. is there a way to disable the slideshow on the popup window when viewing a gallery?

Thanks again
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Post by Jan »

, No there isn't
If you find Phoca extensions useful, please support the project
Keldek
Phoca Member
Phoca Member
Posts: 12
Joined: 18 Dec 2007, 07:46

no worries.. I just

Post by Keldek »

no worries.. I just changed

if ($foto_count > 2)



to

if ($foto_count > 10000)



in helpers/phocagallery.php. Does what I need, and will always so long as my client never makes a gallery with more than 10k images hehe. Only thing I'm wondering is whether or not this'll hamper performance during peak hours... no noticeable difference right now, but then it's on a test server and I'm the only visitor.

Thanks again for the help
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Post by Jan »

Now, your memory doesn't get some javascript strings, so you save some resources in your memory...
If you find Phoca extensions useful, please support the project
Post Reply