Editing Read more text and template files HTML in Joomla 1.5

In my latest Joomla 1.5 website i wanted to change “Read more…” text to “Click to continue…”. In fact I did not like the wide new row for each “Read more…” text with intro text and just wanted to put it on the same line. But before i could do it I found an article comparing the popularities of “Read More”, “Click to continue” and “Continue to article” and ranking “Click to continue” higher. I don’t know about the truth behind it but it influenced me to change “Read more” to “Click to continue” in my site articles.

Unfortunately, the path to the file containing the “Read more..” text specified in the article was no more valid for my 1.5 installation but it gave me enough hint to locate the language file on my server.

So the simple outline i followed to change my “Read more..” text to “Click to continue..” is something like this:

  • Navigate to language/en-GB/en-GB.ini
  • Near the middle bottom find READMORE=Read more (line 261 for me) and READ MORE…=Read more… (line 262 for me). Replace “Read more” with “Click to continue” in both lines to make it read like READMORE=Click to continue and READ MORE…=Click to continue… respectively.
  • Save and close the file
  • Refresh site page to view change

Now next thing (and which was my actual objective in the beginning) was to remove the new row (

) for the entire “Click to continue” section i.e. to remove

and

around the “Click to continue” hyperlink. Actually i wanted “Click to continue” to be inline with and right after the “Intro Text” ends. The picture below shows what i wanted in actual:

Editing Read more text and template files HTML in Joomla 1.5
Editing Read more text and template files HTML in Joomla 1.5
I Googled a lot for getting an idea to locate the template files but none came up as a proper guide :( . (Perhaps custom template plug ins provide a “edit template” section for different sections but mine did not have those custom templates for different pages. However I am not sure if that happens ever) Then i searched for in my local directory with the help of html editor and came up with quite a long list. But after all i had templates in hand and then it was not that difficult to locate the correct ones.

Strangely (I am not that old in Joomla) but quite pleasantly the location to the category view file was /components/com_content/views/category/tmpl/blog_item.php. In blog_item.php near line 128 the code block which i had to work on was:

< ?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<tr>
	<td colspan="2">
		
			< ?php if ($this->item->readmore_register) :
				echo JText::_('Register to read more...');
			elseif ($readmore = $this->item->params->get('readmore')) :
				echo $readmore;
			else :
				echo JText::sprintf('Read more...');
			endif; ?>
	</td>
</tr>
< ?php endif; ?>

Rather than removing the entire block i just copied required lines to new location (near line 117) and placed just after < ?php echo $this->item->text; ?> there to make it look like:

< ?php echo $this->item->text; ?>  
< ?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>

	< ?php if ($this->item->readmore_register) :
		echo JText::_('Register to read more...');
	elseif ($readmore = $this->item->params->get('readmore')) :
		echo $readmore;
	else :
		echo JText::sprintf('Read more...');
	endif; ?>
< ?php endif; ?>

and commented out the old code like this:

< ?php //if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<!-- <tr>
	<td colspan="2">
		
			< ?php /*if ($this->item->readmore_register) :
				echo JText::_('Register to read more...');
			elseif ($readmore = $this->item->params->get('readmore')) :
				echo $readmore;
			else :
				echo JText::sprintf('Read more...');
			endif; */ ?>
	</td>
</tr>
< ?php //endif; ?> -->

to keep my self in the safe side.

The templates was edited successfully! To edit other pages like frontpage one may locate the similar code block in components/com_content/views/frontpage/tmpl/default_item.php and so on.

I hope this helps someone.

3 thoughts on “Editing Read more text and template files HTML in Joomla 1.5

  1. I have been looking for this type of editing everwhere. Thank you very much for the detailed post.
    One question. I have the issue that on the frontpage, having an article that has a “Read more” in an article, when clicked, then opens the article across the total bottom section of the page, not in the frontpage frame that it was launched in. What would the code be to have it only open in that frame …..?
    Thanks for your help on this, you can see the issue on our page, www.servingaudio.com
    Thanks again!
    Kirk

Leave a Reply

Your email address will not be published. Required fields are marked *