Disable link mouse hover animatin on News pro module

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 Mar 20, 2014 11:49 pm
Reply with quote
Report this post
Hi,

i am using News Pro module in order to show the firms that attend my site.
I would like to use this module only to show image and not to link to an article.
It is possible to disable the link on mouse over?
How can i do that?
Thanks
User avatar
Gold Boarder

GK User
Sat Mar 22, 2014 8:38 pm
Reply with quote
Report this post
Hello,

Are you using the default mode or some portal mode?
User avatar
Administrator

GK User
Sun Mar 23, 2014 10:50 am
Reply with quote
Report this post
Hi, i am using standard module "News gallery"
User avatar
Gold Boarder

GK User
Sun Mar 23, 2014 11:52 am
Reply with quote
Report this post
In this case you have to open file modules/mod_news_pro_gk5/portal_modes/news_gallery/controller.php:

and replace fragment:

Code: Select all
echo '<a href="'.$this->get_link($i).'" title="'.strip_tags($this->parent->content[$i]['title']).'" class="gkImage show '.(($i+1 <= $this->parent->config['portal_mode_news_gallery_cols']) ? ' active' : ''). '">';
   echo '<img src="'.strip_tags($this->get_image($i)).'" alt="'.strip_tags($this->parent->content[$i]['title']).'" />';
echo '</a>';


to:

Code: Select all
echo '<img src="'.strip_tags($this->get_image($i)).'" alt="'.strip_tags($this->parent->content[$i]['title']).'" />';
User avatar
Administrator

GK User
Sun Mar 23, 2014 12:00 pm
Reply with quote
Report this post
Hi,

i did but, yes the link are disable but the layout is still not like news gallery but something like product gallery: www.upyourface.com/testenviroment/gavick
User avatar
Gold Boarder

GK User
Sun Mar 23, 2014 12:06 pm
Reply with quote
Report this post
In this case please try to use the following code:

Code: Select all
echo '<a href="#" onclick="javascript: return false;" title="'.strip_tags($this->parent->content[$i]['title']).'" class="gkImage show '.(($i+1 <= $this->parent->config['portal_mode_news_gallery_cols']) ? ' active' : ''). '">';
   echo '<img src="'.strip_tags($this->get_image($i)).'" alt="'.strip_tags($this->parent->content[$i]['title']).'" />';
echo '</a>';


instead of the image.
User avatar
Administrator

GK User
Sun Mar 23, 2014 12:10 pm
Reply with quote
Report this post
Hi,

ok, now the link is disabled.
But the mouse-hover effect is still therE?
thanks
User avatar
Gold Boarder

GK User
Sun Mar 23, 2014 1:20 pm
Reply with quote
Report this post
Please remove from the portal mode script.mootool.js file the following fragment:

Code: Select all
// add stop event
   module.getElements('.gkImage').each(function(img) {
      img.addEvent('mouseenter', function() {
         module.setProperty('data-stop', 1);
         var overlay = img.getElement('.gkImgOverlay');
         var realImg = img.getElement('img');
         overlay.setStyles({
            'margin-left': (-1.0 * (realImg.getSize().x / 2.0)) + "px",
            'width': realImg.getSize().x + "px"
         });
         overlay.setProperty('class', 'gkImgOverlay active');
      });

      img.addEvent('mouseleave', function() {
         module.setProperty('data-stop', 0);
         var overlay = img.getElement('.gkImgOverlay');
         overlay.setProperty('class', 'gkImgOverlay');
      });
   });
User avatar
Administrator

GK User
Sun Mar 23, 2014 9:23 pm
Reply with quote
Report this post
Thanks dziudek!!

It works!
Great!
User avatar
Gold Boarder


cron