Portfolio Title for Each Image

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Mon Aug 05, 2013 3:33 pm
I read the documentation located here: https://www.gavick.com/documentation/jo ... w-pro-gk5/

and it says to add some code to line 39, which I did. It appears it only adds the title-alias instead of the formal title so the words under the pictures are lowercase and have hyphens. How do I use the actual title names under the images?

My website is perkypixel.com

Thanks a bunch.
User avatar
Junior Boarder

GK User
Tue Aug 06, 2013 9:29 pm
Hi,
as it says add <span> ....</span>

and you can use <span> with small modification

Code: Select all
<span style="text-transform:uppercase;"> ..... </span>


I don't know why there is aliases then articles, because when I wrote this article (in our Wiki) I saw titles!
User avatar
Platinum Boarder

GK User
Tue Aug 06, 2013 9:33 pm
Pawel F wrote:Hi,
as it says add <span> ....</span>

and you can use <span> with small modification

Code: Select all
<span style="text-transform:uppercase;"> ..... </span>


I don't know why there is aliases then articles, because when I wrote this article (in our Wiki) I saw titles!



Hmm... that's odd then. I'm getting exactly the alias's as they are written for each article. I'd like to remove the hyphens that are showing (which show up automatically after a title name is created for the spaces in the name) I used the code exactly as it was written in the documentation:
Code: Select all
echo ''.$this->parent->content[$i]['title'].'</a>';


I'm using the Creativity template, if it matters.

I can give you access if you have time to check it out.
User avatar
Junior Boarder

GK User
Tue Aug 06, 2013 9:39 pm
I have checked my code gain and it works fine, I suppose that you have added my code in wrong place, check (code from line 33 to 41)

Code: Select all
      // render images      
      for($i = 0; $i < count($this->parent->content); $i++) {         
         if($this->get_image($i)) {
            if($amount < ($this->parent->config['portal_mode_portfolio_cols'] * $this->parent->config['portal_mode_portfolio_rows'])) {
               echo '<a href="'.$this->get_link($i).'" title="'.strip_tags($this->parent->content[$i]['title']).'" class="gkImage animate_queue_element active">';
               echo '<img src="'.strip_tags($this->get_image($i)).'" alt="'.strip_tags($this->parent->content[$i]['title']).'" />';
               echo ''.$this->parent->content[$i]['title'].'</a>';
               // increase the amount
               $amount++;




To get uppercase Titles use
Code: Select all
echo '<span style="text-transform:uppercase;">'.$this->parent->content[$i]['title'].'<span></a>';


Please note that I have tested it with K2 items ONLY!
User avatar
Platinum Boarder

GK User
Tue Aug 06, 2013 9:42 pm
Code: Select all
I'm using the Creativity template, if it matters.

Me too, Joomla 2.5 + K2

I can give you access if you have time to check it out.


Sorry but this is a customization job, which we don't support.
I can show you my demo, where it works. :whistle:
User avatar
Platinum Boarder

GK User
Wed Aug 14, 2013 9:45 pm
The title shows ONLY for the first set.

Set your GK5 portfolio mode to 1 column and 1 row and 12 pages

If you click "load more" or whatever the link says. There are NO titles rendered.

Only the first article will have a title...

Something with the jsondata?
Code: Select all
echo '<a href="'.$this->parent->config['portal_mode_portfolio_link_url'].'" class="gkLoadMore border bigbutton" data-text="'.JText::_('MOD_NEWS_PRO_GK5_PORTAL_MODE_PORTFOLIO_LINK_TEXT2').'" data-toload="'.str_replace('"', '\'', json_encode($jsondata)).'" data-max="'.count($jsondata).'">'.JText::_('MOD_NEWS_PRO_GK5_PORTAL_MODE_PORTFOLIO_LINK_TEXT1').'</a>';

Joomla 3.1.5
GK5 v1.3
User avatar
Fresh Boarder

GK User
Wed Aug 14, 2013 11:03 pm
OK mark this solved.

Maybe update docs

In the same folder:
For jQuery Engine
Line 44 script.query.js
Code: Select all
img.html('<img src="' + jsondata[i].src + '" alt="' + jsondata[i].title + '" />');

Change to:
Code: Select all
img.html('<img src="' + jsondata[i].src + '" alt="' + jsondata[i].title + '" /><span class="gkPortTitle">' + jsondata[i].title + '</span>');


Use with or without the span class, but having it there will allow you to hide the title via page/menu classes and CSS display:none

MOOTOOLS engine
line 43 script mootools.js
Code: Select all
'html': '<img src="' + jsondata[i].src + '" alt="' + jsondata[i].title + '" />'

change to:
Code: Select all
'html': '<img src="' + jsondata[i].src + '" alt="' + jsondata[i].title + '" /><span class="gkPortTitle">' + jsondata[i].title + '</span>'


Keeping the classes the same

line 41 of controller.php BEFORE the closing </a> tag
Code: Select all
echo '<span class="gkPortTitle">'.$this->parent->content[$i]['title'].'<span>';


I am not to hip on the link being behind the gkImgOverlay when the title extends wider then the image... but it works.

ALSO with the Gavick GK5 docs - a more elegant solution to the language/en-GB/en-GB.mod_news_pro_gk5.ini issue is to use the bult in Joomla language file overrides feature. Ever since I learned that little hidden gem, modifing language files and worrying about "update/overwrites" is a thing of the past.

Language Overrides
This guy has a blog tutorial http://www.inmotionhosting.com/support/edu/joomla-25/language/add-new-language-override
And of course for those who despise reading... there is Youtube.
https://www.youtube.com/watch?v=g8j6vyoAvTo
User avatar
Fresh Boarder


cron