---------- Forwarded message ---------- From: Christian Quiñones christian.p.quinones@gmail.com Date: Mon, Apr 11, 2011 at 6:02 PM Subject: "Read more" edit To: support-request@drupal.org
hello all,
I would like to edit the "read more" link that appears at the bottom of the teaser. I would like to change the text to read something totally different. Please assist.
check out http://drupal.org/project/ed_readmore *
Ryan LeTulle*
bayousoft http://twitter.com/bayousoft -twitter
On Mon, Apr 11, 2011 at 12:04 PM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
---------- Forwarded message ---------- From: Christian Quiñones christian.p.quinones@gmail.com Date: Mon, Apr 11, 2011 at 6:02 PM Subject: "Read more" edit To: support-request@drupal.org
hello all,
I would like to edit the "read more" link that appears at the bottom of the teaser. I would like to change the text to read something totally different. Please assist.
-- [ Drupal support list | http://lists.drupal.org/ ]
I have checked the read-more project but it seems that this will only style the existing text. And with the string override module I don't know what the context would be in this case.
Drupal version is 7.x
On Mon, Apr 11, 2011 at 6:06 PM, Ryan LeTulle bayousoft@gmail.com wrote:
check out http://drupal.org/project/ed_readmore
Ryan LeTulle*
bayousoft http://twitter.com/bayousoft -twitter
On Mon, Apr 11, 2011 at 12:04 PM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
---------- Forwarded message ---------- From: Christian Quiñones christian.p.quinones@gmail.com Date: Mon, Apr 11, 2011 at 6:02 PM Subject: "Read more" edit To: support-request@drupal.org
hello all,
I would like to edit the "read more" link that appears at the bottom of the teaser. I would like to change the text to read something totally different. Please assist.
-- [ Drupal support list | http://lists.drupal.org/ ]
My apologies, I misread the options. *
Ryan LeTulle*
bayousoft http://twitter.com/bayousoft -twitter
On Mon, Apr 11, 2011 at 12:53 PM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
I have checked the read-more project but it seems that this will only style the existing text. And with the string override module I don't know what the context would be in this case.
Drupal version is 7.x
On Mon, Apr 11, 2011 at 6:06 PM, Ryan LeTulle bayousoft@gmail.com wrote:
check out http://drupal.org/project/ed_readmore
Ryan LeTulle*
bayousoft http://twitter.com/bayousoft -twitter
On Mon, Apr 11, 2011 at 12:04 PM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
---------- Forwarded message ---------- From: Christian Quiñones christian.p.quinones@gmail.com Date: Mon, Apr 11, 2011 at 6:02 PM Subject: "Read more" edit To: support-request@drupal.org
hello all,
I would like to edit the "read more" link that appears at the bottom of the teaser. I would like to change the text to read something totally different. Please assist.
-- [ Drupal support list | http://lists.drupal.org/ ]
I'm not sure what you mean, "I don't know what the context would be". Do you only want to change it for certain node types? If not, the string overrides module will alter all complete strings of "Read More" (not fragments in sentences) for whatever you want.
the other alternative (what I do) is to roll your own links section in tpl template files for each node type.
Neil
On 11/04/2011 14:53, Christian Quiñones wrote:
I have checked the read-more project but it seems that this will only style the existing text. And with the string override module I don't know what the context would be in this case.
Drupal version is 7.x
On Mon, Apr 11, 2011 at 6:06 PM, Ryan LeTulle <bayousoft@gmail.com mailto:bayousoft@gmail.com> wrote:
check out http://drupal.org/project/ed_readmore * * * Ryan LeTulle* > bayousoft <http://twitter.com/bayousoft> -twitter On Mon, Apr 11, 2011 at 12:04 PM, Christian Quiñones <christian.p.quinones@gmail.com <mailto:christian.p.quinones@gmail.com>> wrote: ---------- Forwarded message ---------- From: *Christian Quiñones* <christian.p.quinones@gmail.com <mailto:christian.p.quinones@gmail.com>> Date: Mon, Apr 11, 2011 at 6:02 PM Subject: "Read more" edit To: support-request@drupal.org <mailto:support-request@drupal.org> hello all, I would like to edit the "read more" link that appears at the bottom of the teaser. I would like to change the text to read something totally different. Please assist. -- [ Drupal support list | http://lists.drupal.org/ ]
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1] http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2] http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd earnie@users.sourceforge.netwrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2]
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
if you want to replace all instances of "Read More", then string overrides is the easiest way to do it.
On 11/04/2011 16:31, Christian Quiñones wrote:
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd <earnie@users.sourceforge.net mailto:earnie@users.sourceforge.net> wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7. [1] http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_link_alter/6 [2] http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_node_view_alter/7 -- Earnie -- http://progw.com -- http://www.for-my-kids.com -- [ Drupal support list | http://lists.drupal.org/ ]
Ok, so if I use string overrides, would I just use the word "Read More"?, when trying this, no changes take place.
On Mon, Apr 11, 2011 at 8:45 PM, Neil Coghlan neil@esl-lounge.com wrote:
if you want to replace all instances of "Read More", then string overrides is the easiest way to do it.
On 11/04/2011 16:31, Christian Quiñones wrote:
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd <earnie@users.sourceforge.net
wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2]
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
if you install the module, you have a text box on the right and one on the left.
In the left, you put the string exactly as it appears in the module. "Read more" is not the same as "Read more?" I believe the exact string in the node.module is "Read more". Only first word capitalised, no punctuation.
then on the right, put what you want to appear. Refresh page. Celebrate.
On 11/04/2011 16:55, Christian Quiñones wrote:
Ok, so if I use string overrides, would I just use the word "Read More"?, when trying this, no changes take place.
On Mon, Apr 11, 2011 at 8:45 PM, Neil Coghlan <neil@esl-lounge.com mailto:neil@esl-lounge.com> wrote:
if you want to replace all instances of "Read More", then string overrides is the easiest way to do it. On 11/04/2011 16:31, Christian Quiñones wrote:@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords. @Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution. Either way, thank you for your input. On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd <earnie@users.sourceforge.net <mailto:earnie@users.sourceforge.net>> wrote: Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7. [1] http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_link_alter/6 [2] http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_node_view_alter/7 -- Earnie -- http://progw.com -- http://www.for-my-kids.com -- [ Drupal support list | http://lists.drupal.org/ ]-- [ Drupal support list | http://lists.drupal.org/ ]
I must be doing something wrong as I have done as you instructed with no punctuations just the first letter capitalized. However I did go into the node.module file and found the string that defines "Read more" and replaced it, and now my new text appears. I guess there is always a work around.
On Mon, Apr 11, 2011 at 10:03 PM, Neil Coghlan neil@esl-lounge.com wrote:
if you install the module, you have a text box on the right and one on the left.
In the left, you put the string exactly as it appears in the module. "Read more" is not the same as "Read more?" I believe the exact string in the node.module is "Read more". Only first word capitalised, no punctuation.
then on the right, put what you want to appear. Refresh page. Celebrate.
On 11/04/2011 16:55, Christian Quiñones wrote:
Ok, so if I use string overrides, would I just use the word "Read More"?, when trying this, no changes take place.
On Mon, Apr 11, 2011 at 8:45 PM, Neil Coghlan neil@esl-lounge.com wrote:
if you want to replace all instances of "Read More", then string overrides is the easiest way to do it.
On 11/04/2011 16:31, Christian Quiñones wrote:
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd < earnie@users.sourceforge.net> wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2]
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
hmm, that's not really a workaround...you shouldn't touch core modules. I've been using String Overrides module for two years and it works like a charm. Could be a cache issue, always clear cache when working with those types of modules.
On 11/04/2011 21:04, Christian Quiñones wrote:
I must be doing something wrong as I have done as you instructed with no punctuations just the first letter capitalized. However I did go into the node.module file and found the string that defines "Read more" and replaced it, and now my new text appears. I guess there is always a work around.
On Mon, Apr 11, 2011 at 10:03 PM, Neil Coghlan <neil@esl-lounge.com mailto:neil@esl-lounge.com> wrote:
if you install the module, you have a text box on the right and one on the left. In the left, you put the string exactly as it appears in the module. "Read more" is not the same as "Read more?" I believe the exact string in the node.module is "Read more". Only first word capitalised, no punctuation. then on the right, put what you want to appear. Refresh page. Celebrate. On 11/04/2011 16:55, Christian Quiñones wrote:Ok, so if I use string overrides, would I just use the word "Read More"?, when trying this, no changes take place. On Mon, Apr 11, 2011 at 8:45 PM, Neil Coghlan <neil@esl-lounge.com <mailto:neil@esl-lounge.com>> wrote: if you want to replace all instances of "Read More", then string overrides is the easiest way to do it. On 11/04/2011 16:31, Christian Quiñones wrote:@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords. @Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution. Either way, thank you for your input. On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd <earnie@users.sourceforge.net <mailto:earnie@users.sourceforge.net>> wrote: Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7. [1] http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_link_alter/6 [2] http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_node_view_alter/7 -- Earnie -- http://progw.com -- http://www.for-my-kids.com -- [ Drupal support list | http://lists.drupal.org/ ]-- [ Drupal support list | http://lists.drupal.org/ ]-- [ Drupal support list | http://lists.drupal.org/ ]
Christian,
What you are trying to do is really easy to do, once you know how to do it! [?]
And you *don't* have to hack core.
The problem that you are having is that you have to override everything in the particular t() function, not just part of it.
So finding the relavent line in core was extremely important... so that work you did was not for naught. The line you found from core is as follows:
'title' => t('Read more<span class="element-invisible"> about @title</span>', array('@title' => $node_title_stripped)),
The mistake you were making with the string overrides module is that the part you have to override has to be all the text in the first argument of the t() function. So in this case, you need specify the following as the text you want to replace:
Read more<span class="element-invisible"> about @title</span>
Because most of the time I have to find the exact string inside Drupal core or a contrib module in order to get the String Overrides module to work, I instead never use that module but instead use Drupal core's built in way to do this via editing the settings.php file (that is NOT hacking core).
Look for this part of the settings.php file around line 418:
# $conf['locale_custom_strings_en'][''] = array( # 'forum' => 'Discussion board', # '@count min' => '@count minutes', # );
Change it to this, uncommenting the $conf variable and then adding your own line, following the examples given to you there:
$conf['locale_custom_strings_en'][''] = array( # 'forum' => 'Discussion board', # '@count min' => '@count minutes', 'Read more<span class="element-invisible"> about @title</span>' => 'See full article', );
p.s. I don't have a clue what that <span class="element-invisible"> about @title</span> is all about. That is new with D7. But it's not just this case that more than just the visible string is added to a t() function. You almost always have to find the original t() function and see what's there before you can successfully override it.
best,
Shai
<:avglsdata id=avglsdata> Gosh, all these great, complicated solutions. You can put a simple string translation in the bottom of your settings.php file. I don't have the format here handy, but I have used that to change the "Add new comment" string. Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________ From: Christian Quiñones christian.p.quinones@gmail.com To: support@drupal.org Sent: Mon, April 11, 2011 3:31:27 PM Subject: Re: [support] Fwd: "Read more" edit
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or
hook_node_view_alter[2] for D7.
[1] http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li...
[2] http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
@Shai,
I realize I should not hack the core module, as you can see I am still in the process of learning. I have not tried your answer yet but it looks promising. Thank you very much.
On Tue, Apr 12, 2011 at 3:41 AM, nan wich nan_wich@bellsouth.net wrote:
Gosh, all these great, complicated solutions. You can put a simple string translation in the bottom of your settings.php file. I don't have the format here handy, but I have used that to change the "Add new comment" string.
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Christian Quiñones christian.p.quinones@gmail.com *To:* support@drupal.org *Sent:* Mon, April 11, 2011 3:31:27 PM *Subject:* Re: [support] Fwd: "Read more" edit
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd <earnie@users.sourceforge.net
wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2]
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
@Shai, I have tried both solutions, but neither one gives me a successful replacement, string doesnt change at all after flushing all caches.
On Tue, Apr 12, 2011 at 10:37 AM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
@Shai,
I realize I should not hack the core module, as you can see I am still in the process of learning. I have not tried your answer yet but it looks promising. Thank you very much.
On Tue, Apr 12, 2011 at 3:41 AM, nan wich nan_wich@bellsouth.net wrote:
Gosh, all these great, complicated solutions. You can put a simple string translation in the bottom of your settings.php file. I don't have the format here handy, but I have used that to change the "Add new comment" string.
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Christian Quiñones christian.p.quinones@gmail.com *To:* support@drupal.org *Sent:* Mon, April 11, 2011 3:31:27 PM *Subject:* Re: [support] Fwd: "Read more" edit
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd < earnie@users.sourceforge.net> wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2]
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Christian,
You have to restore node.module back to its pristine condition before this will work. I would actually delete node.module completely and replace the whole file with a fresh copy.
Shai
On Tue, Apr 12, 2011 at 7:44 AM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
@Shai, I have tried both solutions, but neither one gives me a successful replacement, string doesnt change at all after flushing all caches.
On Tue, Apr 12, 2011 at 10:37 AM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
@Shai,
I realize I should not hack the core module, as you can see I am still in the process of learning. I have not tried your answer yet but it looks promising. Thank you very much.
On Tue, Apr 12, 2011 at 3:41 AM, nan wich nan_wich@bellsouth.net wrote:
Gosh, all these great, complicated solutions. You can put a simple string translation in the bottom of your settings.php file. I don't have the format here handy, but I have used that to change the "Add new comment" string.
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Christian Quiñones christian.p.quinones@gmail.com *To:* support@drupal.org *Sent:* Mon, April 11, 2011 3:31:27 PM *Subject:* Re: [support] Fwd: "Read more" edit
@Neil. I am afraid I have to do some more research to learn how to roll my own links. I was hoping it was as simple as just "replacing" keywords.
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
Either way, thank you for your input.
On Mon, Apr 11, 2011 at 7:40 PM, Earnie Boyd < earnie@users.sourceforge.net> wrote:
Simply roll a custom module that implements hook_link_alter[1] for D6 or hook_node_view_alter[2] for D7.
[1]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_li... [2]
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n...
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Christian Quiñones wrote:
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use.
[1] http://drupal.org/documentation
I figured out why, the string override and editing the settings.php file was not changing the "read more" link, it was the locale module. A lot of lessons learned.
All your feedback was much appreciated.
On Tue, Apr 12, 2011 at 2:59 PM, Earnie Boyd earnie@users.sourceforge.netwrote:
Christian Quiñones wrote:
@Earnie, I looked at the api and I dont' understand if I have to just
copy
and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep
searching
for a better solution.
I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use.
[1] http://drupal.org/documentation
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
@Christian,
Thanks for your persistence and for reporting back.
I'm thinking of writing a docs page on this. I don't use the Locale module.
Can you just be a little more specific about what happened, how it all works. I'm guessing that if Locale module is turned on then all string overrides get handled by it and other mechanisms are ignored? Is that right?
Please share your insights.
best,
Shai
On Wed, Apr 13, 2011 at 4:38 AM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
I figured out why, the string override and editing the settings.php file was not changing the "read more" link, it was the locale module. A lot of lessons learned.
All your feedback was much appreciated.
On Tue, Apr 12, 2011 at 2:59 PM, Earnie Boyd <earnie@users.sourceforge.net
wrote:
Christian Quiñones wrote:
@Earnie, I looked at the api and I dont' understand if I have to just
copy
and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep
searching
for a better solution.
I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use.
[1] http://drupal.org/documentation
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
@Shai,
I haven't tested all possibilities having the Locale module enabled, however my current setting at the time of string override failure was:
- Locale module enabled - Added an additional language (Spanish) - Set my language defaut for Locale module to be Spanish, and second language English - Enabled multilingual support for all content types
When disabling locale module, the content of all nodes had dissapeared leaving only the title. I was able to get content back by disabling multilingual support in each content type. However two of my content types would still display Spanish as default language when creating content for those content types.
Luckily I had done a backup using Backup and migrate, which it took all my content and content types to its last good configuration.
I hope this helps,
Christian
On Wed, Apr 13, 2011 at 2:36 PM, Shai Gluskin shai@content2zero.com wrote:
@Christian,
Thanks for your persistence and for reporting back.
I'm thinking of writing a docs page on this. I don't use the Locale module.
Can you just be a little more specific about what happened, how it all works. I'm guessing that if Locale module is turned on then all string overrides get handled by it and other mechanisms are ignored? Is that right?
Please share your insights.
best,
Shai
On Wed, Apr 13, 2011 at 4:38 AM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
I figured out why, the string override and editing the settings.php file was not changing the "read more" link, it was the locale module. A lot of lessons learned.
All your feedback was much appreciated.
On Tue, Apr 12, 2011 at 2:59 PM, Earnie Boyd < earnie@users.sourceforge.net> wrote:
Christian Quiñones wrote:
@Earnie, I looked at the api and I dont' understand if I have to just
copy
and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep
searching
for a better solution.
I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use.
[1] http://drupal.org/documentation
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
If you are using Locale, then you can just create a custom english language and change the strings in there. I hadn't realised you were using Locale as using it just for a few string changes is overkill, but if you're using it on a multi-language site anyway, you might as well do the "read more" thing in there.
On 13/04/2011 13:35, Christian Quiñones wrote:
@Shai,
I haven't tested all possibilities having the Locale module enabled, however my current setting at the time of string override failure was:
- Locale module enabled
- Added an additional language (Spanish)
- Set my language defaut for Locale module to be Spanish, and second
language English
- Enabled multilingual support for all content types
When disabling locale module, the content of all nodes had dissapeared leaving only the title. I was able to get content back by disabling multilingual support in each content type. However two of my content types would still display Spanish as default language when creating content for those content types.
Luckily I had done a backup using Backup and migrate, which it took all my content and content types to its last good configuration.
I hope this helps,
Christian
On Wed, Apr 13, 2011 at 2:36 PM, Shai Gluskin <shai@content2zero.com mailto:shai@content2zero.com> wrote:
@Christian, Thanks for your persistence and for reporting back. I'm thinking of writing a docs page on this. I don't use the Locale module. Can you just be a little more specific about what happened, how it all works. I'm guessing that if Locale module is turned on then all string overrides get handled by it and other mechanisms are ignored? Is that right? Please share your insights. best, Shai On Wed, Apr 13, 2011 at 4:38 AM, Christian Quiñones <christian.p.quinones@gmail.com <mailto:christian.p.quinones@gmail.com>> wrote: I figured out why, the string override and editing the settings.php file was not changing the "read more" link, it was the locale module. A lot of lessons learned. All your feedback was much appreciated. On Tue, Apr 12, 2011 at 2:59 PM, Earnie Boyd <earnie@users.sourceforge.net <mailto:earnie@users.sourceforge.net>> wrote: Christian Quiñones wrote: > @Earnie, I looked at the api and I dont' understand if I have to just copy > and paste into the node.api.php file or if I have to actually create a > module invoking this api. If its tha latter, I will need to keep searching > for a better solution. > I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use. [1] http://drupal.org/documentation -- Earnie -- http://progw.com -- http://www.for-my-kids.com -- [ Drupal support list | http://lists.drupal.org/ ] -- [ Drupal support list | http://lists.drupal.org/ ] -- [ Drupal support list | http://lists.drupal.org/ ]
It might not be exactly "Read more" everywhere.
I have this at the top of my site module, that is, in the open code part: // Change the "Reads" label for Statistics. global $conf; $strings = array( '@countreads' => '@countviews', '1 read' => '1 view', ); if (isset($conf['locale_custom_strings_en'])) { $conf['locale_custom_strings_en'] = array_merge($conf['locale_custom_strings_en'], $strings); } else { $conf['locale_custom_strings_en'] = $strings; } And this changes the "reads" label from the Statistics module. It can also be done at the bottom of the settings.php. Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________ From: Christian Quiñones christian.p.quinones@gmail.com To: support@drupal.org Sent: Wed, April 13, 2011 12:35:49 PM Subject: Re: [support] Fwd: "Read more" edit
@Shai,
I haven't tested all possibilities having the Locale module enabled, however my current setting at the time of string override failure was:
- Locale module enabled - Added an additional language (Spanish) - Set my language defaut for Locale module to be Spanish, and second language English - Enabled multilingual support for all content types
When disabling locale module, the content of all nodes had dissapeared leaving only the title. I was able to get content back by disabling multilingual support in each content type. However two of my content types would still display Spanish as default language when creating content for those content types.
Luckily I had done a backup using Backup and migrate, which it took all my content and content types to its last good configuration.
I hope this helps,
Christian
On Wed, Apr 13, 2011 at 2:36 PM, Shai Gluskin shai@content2zero.com wrote:
@Christian,
Thanks for your persistence and for reporting back.
I'm thinking of writing a docs page on this. I don't use the Locale module.
Can you just be a little more specific about what happened, how it all works. I'm guessing that if Locale module is turned on then all string overrides get handled by it and other mechanisms are ignored? Is that right?
Please share your insights.
best,
Shai
On Wed, Apr 13, 2011 at 4:38 AM, Christian Quiñones christian.p.quinones@gmail.com wrote:
I figured out why, the string override and editing the settings.php file was not changing the "read more" link, it was the locale module. A lot of lessons learned.
All your feedback was much appreciated.
On Tue, Apr 12, 2011 at 2:59 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Christian Quiñones wrote:
@Earnie, I looked at the api and I dont' understand if I have to just copy and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep searching for a better solution.
I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use.
[1] http://drupal.org/documentation
--
Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Nan,
See my full response at:
http://lists.drupal.org/pipermail/support/2011-April/017477.html
With string overrides, the problem is that there may be markup, or even replacement tokens inside the t() function. For the replacement to work, you need get the whole contents of the existing text in the t(), which often means finding it in the code.
In this case, what is in the t() function is:
Read more<span class="element-invisible"
Shai
On Wed, Apr 13, 2011 at 4:05 PM, nan wich nan_wich@bellsouth.net wrote:
It might not be exactly "Read more" everywhere.
I have this at the top of my site module, that is, in the open code part: // Change the "Reads" label for Statistics. global $conf; $strings = array( '@count reads' => '@count views', '1 read' => '1 view', ); if (isset($conf['locale_custom_strings_en'])) { $conf['locale_custom_strings_en'] = array_merge($conf['locale_custom_strings_en'], $strings); } else { $conf['locale_custom_strings_en'] = $strings; } And this changes the "reads" label from the Statistics module. It can also be done at the bottom of the settings.php.
*Nancy*
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Christian Quiñones christian.p.quinones@gmail.com *To:* support@drupal.org *Sent:* Wed, April 13, 2011 12:35:49 PM
*Subject:* Re: [support] Fwd: "Read more" edit
@Shai,
I haven't tested all possibilities having the Locale module enabled, however my current setting at the time of string override failure was:
- Locale module enabled
- Added an additional language (Spanish)
- Set my language defaut for Locale module to be Spanish, and second
language English
- Enabled multilingual support for all content types
When disabling locale module, the content of all nodes had dissapeared leaving only the title. I was able to get content back by disabling multilingual support in each content type. However two of my content types would still display Spanish as default language when creating content for those content types.
Luckily I had done a backup using Backup and migrate, which it took all my content and content types to its last good configuration.
I hope this helps,
Christian
On Wed, Apr 13, 2011 at 2:36 PM, Shai Gluskin shai@content2zero.comwrote:
@Christian,
Thanks for your persistence and for reporting back.
I'm thinking of writing a docs page on this. I don't use the Locale module.
Can you just be a little more specific about what happened, how it all works. I'm guessing that if Locale module is turned on then all string overrides get handled by it and other mechanisms are ignored? Is that right?
Please share your insights.
best,
Shai
On Wed, Apr 13, 2011 at 4:38 AM, Christian Quiñones < christian.p.quinones@gmail.com> wrote:
I figured out why, the string override and editing the settings.php file was not changing the "read more" link, it was the locale module. A lot of lessons learned.
All your feedback was much appreciated.
On Tue, Apr 12, 2011 at 2:59 PM, Earnie Boyd < earnie@users.sourceforge.net> wrote:
Christian Quiñones wrote:
@Earnie, I looked at the api and I dont' understand if I have to just
copy
and paste into the node.api.php file or if I have to actually create a module invoking this api. If its tha latter, I will need to keep
searching
for a better solution.
I meant the latter. Creating modules is something you're going to want to learn how to do if you plan to use Drupal for its strength. Check out the documentation[1] page, it'll get you started. Besides, this knowledge will help you determine quality of a module you plan to use.
[1] http://drupal.org/documentation
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
<:avglsdata id=avglsdata> You're about 2 hours too late. I discovered that myself, as you can see in my code. I had to do that today, so thought I would post it to give him an idea. Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________
From: Shai Gluskin
See my full response at:
http://lists.drupal.org/pipermail/support/2011-April/017477.html
With string overrides, the problem is that there may be markup, or even replacement tokens inside the t() function. For the replacement to work, you need get the whole contents of the existing text in the t(), which often means finding it in the code.
In this case, what is in the t() function is:
Read more<span class="element-invisible"
Look at the string overrides module: http://drupal.org/project/stringoverrides
On 11/04/2011 14:04, Christian Quiñones wrote:
---------- Forwarded message ---------- From: *Christian Quiñones* <christian.p.quinones@gmail.com mailto:christian.p.quinones@gmail.com> Date: Mon, Apr 11, 2011 at 6:02 PM Subject: "Read more" edit To: support-request@drupal.org mailto:support-request@drupal.org
hello all,
I would like to edit the "read more" link that appears at the bottom of the teaser. I would like to change the text to read something totally different. Please assist.