Keyword

Changing text size of Read More Link or replacing

  • Lewis Nelson
  • Lewis Nelson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101316 by Lewis Nelson
How can I change the size Read More link one of the Articles or better yet replace the text with a button?

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

  • Lewis Nelson
  • Lewis Nelson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101317 by Lewis Nelson
For those that are interested. I found the solution to replace the text with an image/icon. There are 5 php files that have to be modified. Reply to this topic and I will provide the files and what i had to change.

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

More
12 years 2 months ago #101318 by Annelies
I'm interested in the files to change the read more....
Do you also know how to translate it, where can I do that? It is still in english instead of dutch, I installed the language.
Thanks

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

  • Lewis Nelson
  • Lewis Nelson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago - 12 years 2 months ago #101319 by Lewis Nelson
The Language files would be in \language\

For example the english version is here \language\en-GB\en-GB.com_k2.ini
The files to modify are in the following directory

\components\com_k2\templates\default

The 5 files you would need to modify are

category_item.php
latest_item.php
tag.php
user.php
generic.php

find the following section in each file

<!-- Item "read more..." link -->
<div class="genericItemReadMore">
<a class="k2ReadMore" href="<?php echo $item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>


I modified it like this

<?php if ($this->item->params->get('catItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<?php /* echo JText::_('K2_READ_MORE'); */ ?>
<img src="/images/readmorebutton.jpg" alt="Read More" />
</a>
</div>
<?php endif; ?>

The text in RED is what I added. the /* and */ was to comment out the old setting and I added an image file as the link.

BTW the JTEXT is what converts it to the proper language I believe

Hope this helps

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

More
12 years 2 months ago #101320 by Jhoe Ramos
It would be best if you play around with a CSS style...

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


Powered by Kunena Forum