News modul: news_return as parameter

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

News modul: news_return as parameter

Post by nils73 »

I just stumbled upon this because I wanted to replace the "Return" link with something more descriptive. But then I found out that it's hardcoded in the language-file. Since I can define almost everything in news, this would be very helpful either. If it's a feature and not a but, please move it to feature requests.

Regards,
Nils
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News modul: news_return as parameter

Post by calguy1000 »

It is possible to override any lang string in any module, by creating a directory structure similar to the modules directory and overriding only the strings you want to customize.

For example, to override the "Return" string in the news lang file
you can:

Code: Select all

mkdir <install_dir>/module_custom/News/lang
cd <install_dir>/module_custom/News/lang
and add only the strings you want to customize into the language specific file
i.e add:

Code: Select all

$lang['news_return'] = 'BlahBlahBlah';  

into a new en_US.php file

Hope this helps.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: News modul: news_return as parameter

Post by nils73 »

Yes, I know I can do that. But it seems a bit "far out" and not very user-friendly. That is because everything else can be managed and customized via backend (i.e. parameters). I guess this applies to the return-parameter as well.

I helped myself and modified the language-file directly. But a content-editor couldn't do that.

However I am glad you pointed out a different solution than mine.

Regards,
Nils
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News modul: news_return as parameter

Post by calguy1000 »

I implemented this solution as a reasonable (though not nice) way to over-ride and change the wordings of any string in a module without having to modify the lang file itself.  This is because the next time you upgrade, if you modified the lang file directly, your change would probably be lost.

I've been thinking about how to do that in a nice convenient way, but it would probably involve putting all of the lang entries into the database.

And, well, there aren't enough hours in the day/week/month/year to do all of the things on my list as it is :)
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: News modul: news_return as parameter

Post by nils73 »

calguy,

first I didn't exactly realize how much power your post unleashed! It is simply as great as ... [fill in whatever you think is greatest] and I can only say "Chapeau!" ...

I wonder why I have been using other CMS before. Wow.

Regards,
Nils
Locked

Return to “[locked] Quality Assurance”