Configure the categories in the frontend view.

Phoca Gallery - image gallery extension
ostseefoto
Phoca Member
Phoca Member
Posts: 15
Joined: 07 Feb 2008, 21:52
Contact:

Hello,first ov

Post by ostseefoto »

Hello,
first ov all many thanks for this great component. This gallery is the best gallery I found for Joomla.
But I have 2 problems with the configuration.
On my side www.creativ-foto-rostock.de I like to show few categories. Until now it shows in column. I like the view in a row. How to do that?

Second problem: when it shows the category there is no "back"-button or link. How to implement this?

It would be very nice if somebody can help me to solve this probs.

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

Hi there is no row v

Post by Jan »

Hi there is no row view yet, but you can change the html code in:
components\com_phocagallery\views\categories\tmpl\default.php
row 23 +
If you find Phoca extensions useful, please support the project
ostseefoto
Phoca Member
Phoca Member
Posts: 15
Joined: 07 Feb 2008, 21:52
Contact:

Hello Jan,

Post by ostseefoto »

Hello Jan,

well I have checked the file but I'm not so perfect in php. So I don't now, where I have to change the things.
It would be nice if you help me.

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

The back button is m

Post by Jan »

The back button is missed if it is the first level (becuse we don't know from where user is comming - categories or category), you can use the breadcrumbs...

Column <--> Row:
FROM:

echo '<table border="0">';
foreach ( $this->categories as $category )
{
echo '<tr>';
echo '<td align="center" valign="middle" style="'.$this->imagebackground.'"><a hr
e
f="'.$category->link.'">'.JHTML::_( 'image.site', $category->linkthumbnailpath, '',
'
', '', $category->link, 'style="border:0"' ).'</a></td>';
echo '<td><a href="'.$category->link.'" class="category'.$this->params->get( 'pag
e
class_sfx' ).'">'.$category->title.'</a> ';

if ($category->numlinks > 0) {echo '<span class="small">('.$category->numlinks.')
<
/span>';}

echo '</td>';
echo '</tr>';
}
echo '</table>';



e.g. TO:

foreach ( $this->categories as $category )
{
echo '<span style="'.$this->imagebackground.'"><a href="'.$category->link.'">'.JH
T
ML::_( 'image.site', $category->linkthumbnailpath, '', '', '', $category->link, 'sty
l
e="border:0"' ).'</a></span>';
echo '<span><a href="'.$category->link.'" class="category'.$this->params->get( 'p
a
geclass_sfx' ).'">'.$category->title.'</a> ';
if ($category->numlinks > 0) {echo '<small class="small">('.$category->numlinks.'
)
</small>';}
echo '</span> ';

}
If you find Phoca extensions useful, please support the project
ostseefoto
Phoca Member
Phoca Member
Posts: 15
Joined: 07 Feb 2008, 21:52
Contact:

I'm sorry, I ha

Post by ostseefoto »

I'm sorry, I havn't found this part. Here is my complete code from the default.php as you describe. On which place I have to change the code? I have no idea, sorry.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

You have paste the C

Post by Jan »

You have paste the CATEGORY default.php but you must edit the CATEGORIES default.php

com_phocagallery/views/categories/tmpl/default.php

Jan
If you find Phoca extensions useful, please support the project
ostseefoto
Phoca Member
Phoca Member
Posts: 15
Joined: 07 Feb 2008, 21:52
Contact:

Hi Jan,y

Post by ostseefoto »

Hi Jan,

yes, your'e right. I found the right default.php. But If I change the code acc. your instruction, the categories and the rest of the website will not be shown. Then I have a blank browser window. What for hell I make wrong?

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

maybe there is an er

Post by Jan »

maybe there is an error. Do you have enabled error reporting?
If you find Phoca extensions useful, please support the project
ostseefoto
Phoca Member
Phoca Member
Posts: 15
Joined: 07 Feb 2008, 21:52
Contact:

Hi Jan,h

Post by ostseefoto »

Hi Jan,

here I have the changed default.php from the correct folders:
But it is not working.

<?php
// no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php if ( $this->params->def( 'show_page_title', 1 ) ) : ?>
<div class="componentheading<?php
echo
$this->params->get( 'pageclass_sfx' ); ?>">
<?php echo
$this->params->get('page_title'); ?>
</div>
<?php endif; ?>



<div class="contentpane<?php
echo $this->params->get( 'pageclass_sfx' ); ?>">
<?php if ( ($this->params->def('image', -1) != -1) ||
$this->params->def('show_comp_
description', 1) ) : ?>
<div class="contentdescription<?php
echo $this->params->get( 'pageclass_sfx' ); ?>"
>
<?php
if ( isset($this->image) ) :
echo $this->image .
'<div style="clear:both"></div>'
; endif;
echo
$this->params->get('comp_description');
?>
</div>
<?php endif; ?>
</div>

<?php if ($this->displayimagecategories == 1)
{
foreach ( $this->categories as $category )
{
echo '<span
style="'.$this->imagebackground.'"><a href="'.$category->link.'">'.JH
TML::_( 'image.site',
$category->linkthumbnailpath, '', '', '',
$category->link, 'st
y
le="border:0"' ).'</a></span>';
echo '<span>
<a href="'.
$category->link.'" class="category'.
$this->params->get( 'p
ageclass_sfx' ).'">'.$category->title.'</a> ';
if ($category->numlinks > 0) {
echo '<small class="small">('.
$category->numlinks.'
)
</small>';}
echo '</span> ';

}
else
{
?>
<ul>
<?php foreach ( $this->categories as $category ) : ?>
<li>
<a href="<?php echo
$category->link; ?>"
class="category<?php echo
$this->params-
>get( 'pageclass_sfx' ); ?>">
<?php echo
$category->title;?>
</a>

<span class="small">
<?php if ($category->numlinks > 0) {
echo '(' . $category->numlinks . ')';} ?>
</span>
</li>
<?php endforeach; ?>
</ul>
<?php
}
?>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Because }

Post by Jan »

Because } is missed in your foreach. Please enable error reporting and your php displays the errors which you have in your code
If you find Phoca extensions useful, please support the project
Post Reply