News Show Pro GK5 setup Help

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Jul 03, 2014 7:14 am
Reply with quote
Report this post
Hi there,

I'm trying to setup the overlay popup on the Works section, I've look at K2 and GK5 News pro setup/config but I can't any way to remove author and date and tweak the information on the right of the overlay popup.

I have included a screen shot of what I'm trying to achieve for your reference. Please if there anyway to resolve this.

Thank you
User avatar
Fresh Boarder

teitbite
Thu Jul 03, 2014 1:34 pm
Reply with quote
Report this post
Hi

I'm afraid this is not so simple. This is a designed style for this module. Which means that options are pretty much locked to what You can see right now. I'm afraid this is the kind of modification we do not support, sorry.
User avatar
Moderator

GK User
Fri Jul 04, 2014 1:24 am
Reply with quote
Report this post
Many thanks for your reply, I'll what I can work around with the limitation.

Cheers
User avatar
Fresh Boarder

GK User
Wed Jul 09, 2014 5:05 am
Reply with quote
Report this post
Hi Teoh,
Contrary to the support desk reply, it's not all that hard to modify NSP portfolio2 to do what you want. It does however require changing the core module files, at least as far as I can tell there's no way to use overrides for it without a 3rd party plugin. Have a look at what I've done, which is similar to your request:
http://the9dotbox.com/

The files you need to modify are as follows:
/modules/mod_news_pro_gk5/portal_modes/portfolio2/controller.php
/modules/mod_news_pro_gk5/portal_modes/portfolio2/script.jquery.js (assuming you're not using mootools)
On controller.php file, you need to replace line 74 with this:
Code: Select all
data-img="'.strip_tags($this->get_image($i)).'"
data-text="'.strip_tags($this->parent->content[$i]['text']).'"';

Editing script.jquery.js is a little trickier and it helps to at least have a basic understanding of javascript. On line 36, you need to add either a <span></span> or <div></div> tag set just before the last closing </div> tag, but you need to give it a class for reference in the next set of code. I used <div class="gkPortfolioText"></div>. Then, immediately below 46, I added the following:
Code: Select all
var popup_text = popup.find('.gkPortfolioText');

Then you need to add this code in three places – directly below lines 58, 76 and 103:
Code: Select all
popup_text.removeClass('active');

Almost there... now, add this code after line 128:
Code: Select all
popup_text.html(img.attr('data-text'));

Last thing, put the following after line 143:
Code: Select all
setTimeout(function() { popup_text.addClass('active'); }, 600);

One last thing – if you want to get rid of the article date and replace it with "Read More" link as I did, in the same script.jquery.js file, replace line 127 with this:
Code: Select all
popup_date.html('<a href="' + img.attr('href') + '">See More</a>');

If you want the Read More link to be before the text, you'll need to switch the arrangement around a little back up on line 36. After that, all you have to do is tweak your CSS to make everything look the way you want. Oh, and if you only want some intro text to show and not the full text, make sure you add the Joomla "Read More" horixontal rule/place holder in your article.

Hope this is easy enough to follow. Let me know if you have any success! :)
User avatar
Fresh Boarder

teitbite
Sat Jul 12, 2014 10:38 am
Reply with quote
Report this post
Hi

That's a pretty good explenation @mmooney, thank You for that. Many of users will benefit from this instruction :)
User avatar
Moderator


cron