Quote

We're also available for Custom Joomla Development

Hire us now

Articles has no image by default image display

Hi,

I am facing two issues.

Questions1: - There is no default image show in case an article has no image.

Questions 2:- How can I add parameters like “on click event” in link. For Ex. –

<a href="/java-tutorial.html" onclick="ga('send', 'event', 'Related_articles', ‘articles name', 'articles name');>java</a>

to all links generated via your module so that I can do tracking in google analytics?

Please help me.
       
  • Replied by developerguru99 on Monday, January 23 2017, 12:00 PM · Hide· #1
    Hi

    Any Updates?
  •  
  • Replied by admin on Tuesday, January 24 2017, 01:46 AM · Hide· #2
    Hi, Sorry. I thought I have replied to your question. Could you tell me what extension you're using? Is it related extended module? If yes, here are the answers :
    Questions1: - There is no default image show in case an article has no image.

    I think you have managed to solve this issue as the thumbnails are displayed on your website.
    Questions 2:- How can I add parameters like “on click event” in link. For Ex. –

    You can do template override for that. Copy the file from :
    ../modules/mod_relateditems_xtd/tmpl/default.php
    to
    ../templates/protostar/html/mod_relateditems_xtd/default.php

    and open it using your php editor.
    At line 183 / 234 you will see this code :
    <?php if ($item_title_header) { ?>
    			<a href="/<?php echo $item->route; ?>"><<?php echo $titletag; ?> class="title" property="genre"><?php echo $item->title; ?></<?php echo $titletag; ?>></a>
    			<?php } ?>


    Simply change it to :

    <?php if ($item_title_header) { ?>
    			<a href="/<?php echo $item->route; ?>" onclick="ga('send', 'event', 'Related_articles', ‘<?php echo $item->title; ?>', '<?php echo $item->title; ?>');"><<?php echo $titletag; ?> class="title" property="genre"><?php echo $item->title; ?></<?php echo $titletag; ?>></a>
    			<?php } ?>
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by developerguru99 on Tuesday, January 24 2017, 06:21 AM · Hide· #3
    Hi

    Questions 1:

    I have used “Related Items Extended module”.
    We have close to 1300 articles at in http://www.test2.guru99.com/
    We are NOT manually set articles images.
    What can be done?

    Questions 2:

    Step 1) I have used templates for “rt_acacia”.
    Step 2) I have check /templates/rt_acacia/html/ not display for folder “mod_relateditems_xtd” please check - https://www.screencast.com/t/vOJATmph

    Step 3) I have Changes ../modules/mod_relateditems_xtd/tmpl/default.php At line number 183 / 234 please review it’s correct? - https://www.screencast.com/t/1wpBjbUbIQiP


    Please help me!
  •  
  •  
    Replied by admin on Tuesday, January 24 2017, 07:40 AM · Hide· #4
    I have used “Related Items Extended module”.
    We have close to 1300 articles at in http://www.test2.guru99.com/
    We are NOT manually set articles images.
    What can be done?

    Umm isn't it the thumbnails are already generated? I mean this page :

    https://www.dropbox.com/s/o03p2j0kldn3dvv/3lcda.jpg?raw=1

    And for the default thumbnail, you can easily change this default no-image img to your own image: http://www.test2.guru99.com/modules/mod_relateditems_xtd/assets/noimg.png


    Questions 2:

    Step 1) I have used templates for “rt_acacia”.
    Step 2) I have check /templates/rt_acacia/html/ not display for folder “mod_relateditems_xtd” please check - https://www.screencast.com/t/vOJATmph

    It's indeed not exist, simply create the folder manually there (mod_relateditems_xtd) there to activate the template override function for the module


    Step 3) I have Changes ../modules/mod_relateditems_xtd/tmpl/default.php At line number 183 / 234 please review it’s correct? - https://www.screencast.com/t/1wpBjbUbIQiP

    Do not change the file directly, because it will be overrided when you are aplying an update in the future. That's why we suggested you to do template override as mentioned before
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments