Keyword

moduleItemDateCreated doesn't work

More
10 years 8 months ago - 10 years 8 months ago #124227 by Jose
Hi all,

I've changed the template folder's name of my Joomla 2.5 site. For doing that, I've changed the folder's name and then I have replace every /templates/old_name/ into /template/new_name in the templatedetails.xml.

Doing that, everything worked great except one thing. Some news module doesn't show the date of the K2 articles correctly, it shows:

Written on K2_SunPMUTCE_2012+00001330890895ESun0UTC0+00007

instead of:

Written on Sunday 4 March 2012

Anyone knows how can I solve that?

Thanks

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #124228 by Yiota
Replied by Yiota on topic Re: moduleItemDateCreated doesn't work
Make sure the date language definitions are in the module's language file in languages/xx-XX/xx-XX.mod_k2_content.ini

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

More
10 years 8 months ago - 10 years 8 months ago #124229 by Jose
Replied by Jose on topic Re: moduleItemDateCreated doesn't work
I have copied /var/www/nba/language/en-GB/en-GB.mod_k2_content.ini to /var/www/nba/templates/nbattack/language/en-GB/

but it didn't make any change

The module is a Module K2 content, and in the module's folder ( /var/www/nba/modules/mod_k2_content/ ), I've found a folder called tmpl, and inside this folder there is another folder named with the older's template name, what should I do here ?

Do you have any other idea?

Thank you very much.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #124230 by Yiota
Replied by Yiota on topic Re: moduleItemDateCreated doesn't work
No, you shouldn't copy it under the template's folder, just make sure that the K2_DATE.... your module seeks is present in that file.

Maybe this is a sub-template of the module which is used in your site. However, this shouldn't be there. Check the same path between your old site and your new site. If that folder is not suppose to be there search to locate from where you got it from. It's right place is under the template/your_template/html/mod_k2_content/ folder path.

Now another case is for that language definition to be placed in the template's language file or overriden from the backend.

If the definition was in the language file of the template you will have to make sure that you have copied the new template's language folders under the language/en-GB/ folder as well.

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

More
10 years 8 months ago #124231 by Jose
Replied by Jose on topic Re: moduleItemDateCreated doesn't work
I've solved that changing:

echo JHTML::_('date', $item->created, JText::_('K2_DATE_Template_Name'));

into

echo JHTML::_('date', $item->created, JText::_('l, M d Y'));

Thanks.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #124232 by Yiota
Replied by Yiota on topic Re: moduleItemDateCreated doesn't work
You are welcome.
Glad you sorted it out.

Since the language definition was in fact changed "K2_DATE_Template_Name", it most likely was located in the template's language file.

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


Powered by Kunena Forum