how to add gallery decription ?

Phoca Gallery - image gallery extension
dotcom22
Phoca Enthusiast
Phoca Enthusiast
Posts: 54
Joined: 10 Nov 2008, 18:19

how to add gallery decription ?

Post by dotcom22 »

hello

I would like add a description "welcome message" for the whole gallery but I don't see how to do..

My goal is to create a menu link redirecting to Category List (using the link type option=com_phocagallery&view=categories) where users will see all category available. In that page I would like display a "welcome message" like for example:

Welcome to our Photo Gallery. Here you can find thousand photos related to cars. Feel free to download any photo you like by browsing in all categories available.

For what I see we can add a description/message for each categories but nothing related to the whole gallery itself (gallery homepage)...

Any suggestions please ?

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

Re: how to add gallery decription ?

Post by Jan »

Hi, this feature will be available in Phoca Gallery 3

For now you can solve it with some module (over phoca gallery, assigned to only phoca gallery link)

or you need to customize it in the code - in categories view.

Jan
If you find Phoca extensions useful, please support the project
dotcom22
Phoca Enthusiast
Phoca Enthusiast
Posts: 54
Joined: 10 Nov 2008, 18:19

Re: how to add gallery decription ?

Post by dotcom22 »

Thank for reply Jan...

So using module is not a solution for me because the style of my module don't fit my need and also because the Welcome Message will be always displayed even if the user is not at Homepage of Gallery...

So it seem the best is to modify the code.. I'm not an php expert anyway I try and I get the result I want anyway I'm not sure is like that I must customize the code.... Here my modification:

1) I opened the file /public_html/components/com_phocagallery/views/categories/tmpl/default.php and at line 82 I add the follow code:

Code: Select all

echo JText::_( 'mygallerydescription' );
2) Inside my 2 INI language file (I use Joomfish) I added the follow new language string:

Code: Select all

MYGALLERYDESCRIPTION= Hello this is a welcome message

Here is how the code look inside the file:
// -------------------
// TABLE LAYOUT
// -------------------
if ($this->tmpl['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;'.$fixedWidhtStyle1.'"><table>';
}
}

echo JText::_( 'mygallerydescription' );;
echo '<tr>';
echo '<td align="center" valign="middle" style="'.$this->tmpl['imagebg'].';text-align:center;"><a href="'.$this->categories[$i]->link.'">';
Could you confirm please if this is correct ??

Many thank

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

Re: how to add gallery decription ?

Post by Jan »

Hi, I cannot confirm it as I didn't test it :-( but the principle is right - you can write the text directly into the code or write it with help of JText method which is more systematic.

Jan
If you find Phoca extensions useful, please support the project
Post Reply