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.
8 years 3 months ago #1 by Developer

Please Log in or Create an account to join the conversation.

Hi

Any Updates?
8 years 2 months ago #2 by Developer

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
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 } ?>
8 years 2 months ago #3 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Hi

Questions 1:

I have used “Related Items Extended module”.
We have close to 1300 articles at in 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 - 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? - www.screencast.com/t/1wpBjbUbIQiP


Please help me!
8 years 2 months ago #4 by Developer

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline

I have used “Related Items Extended module”.
We have close to 1300 articles at in 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: www.test2.guru99.com/modules/mod_related...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 - 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? - 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
8 years 2 months ago #5 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum