Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • rick_blaine Friend
    #163621

    Hi there, congratulations for your great work on my first post 😉

    I have a couple of issues with the ja_events custom user.php for K2.

    First one, concerning date format, I’ve done what has been already suggested here to get it in spanish format:

    line 152:


    $createDay = date('M', strtotime( $item->created));

    replace with:


    $createMonth = JHTML::_('date', $this->item->created, JText::_('%b'));

    Despite that, I get all items dated in MAY where there should also be items dated in April. Have a look at the following user page:
    http://acme.2conb.com/blog/ricardo-orts-sanchez
    All items show May as created date despite some of the articles were created in April:
    http://acme.2conb.com/galeria/fantasia/caza-jedi-delta-7-escala-172

    Second issue concerns images. Despite the fact all images are properly assigned to items, they are not being displayed in the user page. Once again, see:
    http://acme.2conb.com/blog/ricardo-orts-sanchez

    Thanks for your help.

    Best regards.

    himangi Friend
    #393744

    Hi,

    I am getting Database Error: Unable to connect to the database:Could not connect to database on the urls you have provided. Can you please fix it and let me know? Also update your site admin access and ftp access at http://support.joomlart.com/index.php?/Tickets/Ticket/View/71926 so that I can check the issue..

    rick_blaine Friend
    #393806

    Hi himangi,

    Here are the new links (the site is now in production):

    User page (wrong dates, no images everywhere):

    http://www.acmalmeria.com/blog/ricardo-orts-sanchez

    Example of item created in april, shown with May date on user page:
    http://www.acmalmeria.com/galeria/fantasia/caza-jedi-delta-7-escala-172

    Thanks for your help.

    P.S. I’ve just updated the ticket 😉

    himangi Friend
    #393844

    Hi,

    I checked http://www.acmalmeria.com/blog/ricardo-orts-sanchez page with your current template as well as original JA Events template installed in your joomla and it seems to me that while creating ACME template, date format / date related code has been changed in the blog related php file overriding the com_content blog files causing this issue..

    I would suggest you to find the blog related file in ACME template, take its backup and replace it with the same blog related file from JA events. that should solve your problem with date. Please keep backup of the file you need to relace so that you wont loose any more changes you may have in that.

    Hope this is clear enough.

    rick_blaine Friend
    #393851

    Hi himangi,

    There’s just one difference between the original JA Events user.php file and my overridden one, located at line 152 (as stated in my original post). It’s needed to get dates in any other language than english. I assume the user.php file is the only com_k2 (and not com_content) related file that may be causing the issue. What else can it be?

    Sorry if I didn’t make myself clear enough or didn’t get your point :-[

    himangi Friend
    #394037

    do you mean that if you use JA Events template then your date were not getting translated and you made some change in ACME template to translate the dates?

    I will check the change you have made in user.php and get back to you.

    rick_blaine Friend
    #394040

    That’s correct, all I did was replacing “$createDay = date(‘M’, strtotime( $item->created));” with “$createMonth = JHTML::_(‘date’, $this->item->created, JText::_(‘%b’));” to get the dates in the right format.

    Looking forward to your findings 🙂

    himangi Friend
    #394051

    yes I saw the change. I am not sure about the syntax though. Will ask some Ja developer to confirm if that can work..

    Ninja Lead Moderator
    #394053

    Hi rick_blaine,

    Try using this:


    $createDay =JText::_(date('M', strtotime( $item->created)) ) ;

    rick_blaine Friend
    #398180

    Hi hungd, thanks for your help. Unfortunately it didn’t make a difference. After reviewing the entire site I’ve found that this problem only affects user page to one (or some,I’ven’t reviewed them all!) particular users. For example:

    http://www.acmalmeria.com/blog/jose-joaquin-ramos-miras (correct dates/month)
    http://www.acmalmeria.com/blog/ricardo-orts-sanchez (wrong dates/month, it shows current one)

    Any hints?

    Best regards.

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 3 voices, and was last updated by  rick_blaine 13 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum