Page 1 of 1

how to add gallery decription ?

Posted: 27 Dec 2010, 23:34
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

Re: how to add gallery decription ?

Posted: 28 Dec 2010, 14:22
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

Re: how to add gallery decription ?

Posted: 02 Jan 2011, 22:02
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

Re: how to add gallery decription ?

Posted: 03 Jan 2011, 23:53
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