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!