Turn off links on News Show?

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 Dec 12, 2013 4:49 pm
Reply with quote
Report this post
Hello,

Is there a way to turn off the links part to a news show? Or is there a way to use the news show without linking to an item, i.e. just use the images?

Cheers,
Eoin
User avatar
Senior Boarder

GK User
Thu Dec 12, 2013 4:55 pm
Reply with quote
Report this post
Generally would you like to only disable links, or also hover effect etc?
User avatar
Moderator

GK User
Thu Dec 12, 2013 5:03 pm
Reply with quote
Report this post
Both would be the best
User avatar
Senior Boarder

GK User
Thu Dec 12, 2013 7:55 pm
Reply with quote
Report this post
First thing you need to know is those are changes to module core files, so if you will decide to upgrade it's version, you will have to merge the changes again.

1. Disabling overlays in js.
Please edit file:
/modules/mod_news_pro_gk5/portal_modes/portfolio/script.jquery.js
and remove this code from it (delete it or comment out):
Code: Select all
                     // add overlays
                     module.find('.gkImage').each(function(i, img) {
                        img = jQuery(img);
                        if(img.find('.gkImgOverlay').length == 0) {
                           // create overlays
                           var overlay = new jQuery('<div class="gkImgOverlay"></div>');
                           overlay.html('<span></span>');
                           img.append(overlay);
                           // add overlay events
                           img.mouseenter( function() {
                              var overlay = img.find('.gkImgOverlay');
                              var realImg = img.find('img');
                              overlay.css({
                                 'margin-left': (-1.0 * (realImg.width() / 2.0)) + "px",
                                 'width': realImg.width() + "px"
                              });
                              overlay.attr('class', 'gkImgOverlay active');
                           });
                           
                           img.mouseleave( function() {
                              var overlay = img.find('.gkImgOverlay');
                              overlay.attr('class', 'gkImgOverlay');
                           });
                        }
                     });



It is added there twice, so please remove both.
User avatar
Moderator

GK User
Thu Dec 12, 2013 7:59 pm
Reply with quote
Report this post
2. Removing link atribute:
Edit this file: /modules/mod_news_pro_gk5/portal_modes/portfolio/controller.php

Find this part of code:
Code: Select all
      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">';

And replace the line:
Code: Select all
echo '<a href="'.$this->get_link($i).'" title="'.strip_tags($this->parent->content[$i]['title']).'" class="gkImage animate_queue_element active">';

with:
Code: Select all
echo '<a title="'.strip_tags($this->parent->content[$i]['title']).'" class="gkImage animate_queue_element active">';


And that should be all.
User avatar
Moderator

GK User
Fri Dec 13, 2013 5:09 pm
Reply with quote
Report this post
Great! Thanks a million!

Out of interest, is there any benefit in using the images alone in a custom HTML module instead? I just need to know what classes to give it in the jS (I think), in order to get the motion where the images "fly" onto the screen. Do you think the implementation for this would be easier/safer?

Cheers,
Eoin
User avatar
Senior Boarder

GK User
Sat Dec 14, 2013 12:16 pm
Reply with quote
Report this post
It would take much more time, as you would need to recreate the html structure. And with NSP if you are not using it to anything else - it can be changed this way.
User avatar
Moderator

GK User
Wed Dec 18, 2013 3:37 pm
Reply with quote
Report this post
Cool, nice one :)
User avatar
Senior Boarder

GK User
Wed Dec 18, 2013 3:57 pm
Reply with quote
Report this post
Is there anything else I can help you with on this topic?
User avatar
Moderator


cron