horizontal catagories

Phoca Gallery - image gallery extension
pvdw007
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 14 Nov 2007, 12:53

Hi,How c

Post by pvdw007 »

Hi,

How can i get the gatagories to vieuw in a horizontal vasion instead of a vertical one ?

i have so many, my website is becoming very, very long.

Thanks,

Patrick
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

You must change the

Post by Jan »

You must change the source code now. It is not possible yet. But in the next version, I hope, there will be this feature. Now we are working on subcategories but there are still problems with SEF in Joomla, so it takes time...

Jan
If you find Phoca extensions useful, please support the project
Keldek
Phoca Member
Phoca Member
Posts: 12
Joined: 18 Dec 2007, 07:46

I accomplished this

Post by Keldek »

I accomplished this by editing the following:

file > joomla/components/com_phocagallery/views/categories/tmpl/default.php

Default Code

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 Code

<?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="borde
r
: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>';
}




Original Topic
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Post by Jan »

If you find Phoca extensions useful, please support the project
TheEdge
Phoca Member
Phoca Member
Posts: 28
Joined: 07 Jan 2008, 22:28

It is not possib

Post by TheEdge »

It is not possible yet. But in the next version, I hope
Looking forward to that. BTW is there a forum or mailing list I could subscribe to so that I could get an email notification when a new version is released?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Not yet...

Post by Jan »

Not yet...
If you find Phoca extensions useful, please support the project
jakobe75
Phoca Member
Phoca Member
Posts: 40
Joined: 25 Mar 2008, 00:50

the defualt code doe

Post by jakobe75 »

the defualt code doesnt exist in my copy
neither does the option for horizontal categories


I thought this would be available in the new release?
Tiko
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 28 Apr 2008, 12:48
Location: France

Hi,In th

Post by Tiko »

Hi,

In the defaut.php code, I have this :
if ($this->displayimagecategories == 1)
{
for ($i = 0; $i < $countCategories; $i++)
{
if ( $columns == 1 ) {
echo '<table>';
} else {
$float = 0;
foreach ($begin as $k => $v)
{
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '<div style="position:relative;float:left;margin:10px;"><table>';
}
}

echo '<tr>';
echo '<td align="center" valign="middle" style="'.$this->imagebackground.'"><a href="'.$this->categories[$i]->link.'">'.JHTML::_( 'image.site', $this->categories[$i]->linkthumbnailpath, '', '', '', $this->categories[$i]->title, 'style="border:0"' ).'</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>';

if ( $columns == 1 ) {
echo '</table>';
} else {
if ($i == $endFloat) {
echo '</table></div><div style="clear:both"></div>';
} else {
$float = 0;
foreach ($end as $k => $v)
{
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '</table></div>';
}
}
}
}
}
I suppose a different version (I use 1.7.1).

Any idea for horizontal categories ?

Thanks in advance,
Tiko
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

- you can do subcate

Post by Jan »

- you can do subcategories of an category as categories (will be horizontal because of float boxes) or
- you will change the html (add for every category a float box)
If you find Phoca extensions useful, please support the project
jakobe75
Phoca Member
Phoca Member
Posts: 40
Joined: 25 Mar 2008, 00:50

- you can do sub

Post by jakobe75 »

- you can do subcategories of an category do as categories (will be horizontal because of float boxes) or
- you will change the html (add for every category a float box)

will this put the text UNDER the category image?

why is it to the right of the image anyways
I have never seen a gallery like that before
Post Reply