Im trying to change the text that says "Read More" within the teaser area of my nodes to display "Read Full Article". What file do I need to look into to find this text?

Thanks,
-=Vince

Comments

venkat-rk’s picture

Basically in your theme and usually in node.tpl.php or page.tpl.php

Correct me if I am wrong.

oziumjinx’s picture

I cant seem to find the reference to "Read More" in page.tpl.php, node.tpl.php, or style.tpl.php (other than the styling for it).

I should be searching for the $links area, but cant seem to find it.

All help is appreciated.

venkat-rk’s picture

Oh, yes, you are right. It was in the $links area.

Which theme are you using? In the phptemplate version of bluemarine, it is in node.tpl.php, I think.

oziumjinx’s picture

Im using the Box Grey theme within 4.7. Still cant seem to find that $links area. All help is appreciated.

-=Thanks

PakWaan’s picture

I'm new, so correct me if I'm wrong, but wouldn't you use the localizations (languages/translations) to change this text, like any other system-generated text?

http://drupal.org/node/24593

sillygwailo’s picture

I've changed this text using the Locale module.

  1. enable the module under administer » modules
  2. give yourself permission to edit localization under administer » access (you will already have it if you're the first user).
  3. click administer » localization
  4. click add language
  5. under "Custom language" give it a language code and name of your choice
  6. select the "Enabled" and "Default" options for that new language
  7. browse around your site to populate strings, including the "read more" string
  8. click administer » localization
  9. click manage strings
  10. search for "read more"
  11. click "edit" next to the one you want to change
  12. type in the new text then click "Save translations"

Quite a few steps to change one thing, but that's how I've done it on a few sites.

(Username formerly my full name, Richard Eriksson.)

oziumjinx’s picture

Thanks very much for this. I've only translated my "Read More" link. Will i run into problems if I dont translate other strings, or can I leave this as is?

Thanks again...much appreciated

mfredrickson’s picture

Don't worry, locale.module only uses the strings you have replaced, so you can selectively replace strings to your heart's content.

VinceDee’s picture

Thanks for the great tip. Just one thing:

I'm extremely new to Drupal, so I kind of got stuck when you said "browse around your site to populate strings..."

I was browsing around wondering "what the hell do I have to do to populate a string?" lol. I finally just went back to the "localizations" setting and clicked on the "manage strings" tab, searched for the "read more" string, found it, and changed it. It worked.

Did I miss something that I was supposed to do though regarding this "populating" of strings?

solutiondrop’s picture

VinceDee,

"browse around your site to populate strings..." means that the text on each page you go to will then become editable using the method described on this page.

For instance, if I "browse around" and open the "access control" page, This string...

<p>Permissions let you control what users can do on your site. Each user role (defined on the <a href="/%role">user roles page</a>) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.</p>

...would become searchable when I returned to locaization -> manage strings.

I could then add a paragraph in bold red warning the admins of the site to be very careful when changing anything on that page.

Localization is very handy for changing a lot of stuff.

DS

VinceDee’s picture

So you literally have to browse around your site to "enable" the words/terms that you want to be able to edit? Thanks for the explanation.

I actually did browse to a few pages in my site when I did that, so I guess that means that those pages are in the set string database? But what about the pages I didn't visit? Can I reopen the localization page and repopulate the strings by visiting those pages?

Vince

---------
The hottest Linux distribution? Ubuntu
Talk about Ubuntu Web Servers at:
http://www.ubuntuwebservers.com

solutiondrop’s picture

But what about the pages I didn't visit? Can I reopen the localization page and repopulate the strings by visiting those pages?

Vince,
Yes! For instance if I install a new module and want to change the text that appears to users of the site I simply visit the page with the text in question and then return to the localization page and search a portion of the string I want to change.

DS