Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • mbautsch Friend
    #144603

    I am trying to figure out what ja-updatetime is supposed to do. The “Last Update:” time at the top of the template always stays the same even if I make updates to the site and it shows only GMT even thought I have changed my site to Eastern. Can anyone tell me what this does and how I can make it work for me in my time zone?

    Thanks.

    Anonymous Moderator
    #318645

    Hi mbautsch

    In templatesja_teline_iiilibsja.template.helper.php file, we use this function:


    function getLastUpdate(){
    $db = &JFactory::getDBO();
    $query = 'SELECT created FROM #__content a ORDER BY created DESC LIMIT 1';
    $db->setQuery($query);
    $data = $db->loadObject();
    if( $data->created ){ //return gmdate( 'h:i:s A', strtotime($data->created) ) .' GMT ';
    $date =& JFactory::getDate(strtotime($data->created));
    $user =& JFactory::getUser();
    $tz = $user->getParam('timezone');
    $sec =$date->toUNIX(); //set the date time to second
    return gmdate("h:i:s A", $sec+$tz).' GMT';
    }
    return ;
    }

    to display this notification.

    You can open that file to modify to your idea.

    ergohost Friend
    #318684

    <em>@JA Developer 146358 wrote:</em><blockquote>Hi mbautsch

    In templatesja_teline_iiilibsja.template.helper.php file, we use this function:


    function getLastUpdate(){
    $db = &JFactory::getDBO();
    $query = 'SELECT created FROM #__content a ORDER BY created DESC LIMIT 1';
    $db->setQuery($query);
    $data = $db->loadObject();
    if( $data->created ){ //return gmdate( 'h:i:s A', strtotime($data->created) ) .' GMT ';
    $date =& JFactory::getDate(strtotime($data->created));
    $user =& JFactory::getUser();
    $tz = $user->getParam('timezone');
    $sec =$date->toUNIX(); //set the date time to second
    return gmdate("h:i:s A", $sec+$tz).' GMT';
    }
    return ;
    }

    to display this notification.

    You can open that file to modify to your idea.</blockquote>

    I was wondering the same thing mbautsch, and now I’m still none the wiser.

    hariorama Friend
    #318689

    me too, hopefully oneday we will get something usefull and applicable from this support member……

    he marks quick everything with “answered”.

    like today he send my off to some site in goa for sightseeing….:cool:

    <blockquote>Hi

    Please check this link: http://www.infosolutionsgoa.com/cms/…anagement.html</blockquote>

    in this thread

    so much fun…..

    scotty Friend
    #318704

    Sightseeing in Goa? Did you actually follow the link and read what the page is about? It has absolutely NOTHING to do with sightseeing or Goa!

    mbautsch asked a question and it has been answered. The updatetime plugin shows the last time a new article was created (not modified). JA Dev has shown you were you can modify the code to suit your needs. This is not enough? You want him to do it for you?

    Please do not expect JA to answer every little customisation request from every single member. It’s not going to happen.

    You can find more details on setting the time here… http://ie.php.net/datetime

    hariorama Friend
    #318710

    i’m sorry, but for mbautsch, ergohost and me this was far away from answered, because we are not php code genius.

    the main question was: <blockquote>how I can make it work for me in my time zone?</blockquote>

    if i look at this code i get dizzy. it’s like hieroglyphs for me

    where and how do we have to modify this code exactly for the different timezones? i tried this morning to shift from gmt to cet without succes and i also do not know how to undo the “am” and “pm” thing,

    here in switzerland (the land of the watches) we just do not need it. in most european country’s we are used to 24 hours watches.

    now i will follow your link to another external site to find help.

    i just find, that if you guys sell here templates you should also offer a much better guide on how to bring the templates with its extensions, features etc. running and ajusting at the clients homes, which are all over the world.

    if i would’t have known, that this telin iii is such a headache, i would not have upgraded from teline II!

    there are still so many things which do not work with this stable release, lack of helpfull explanations, documentations etc and poor ticket support.

    i think, most of the users here do not install templates every day, maybe once a year or so and for these people who are not programmers, code freaks etc. a better docu is needed on how to apply the different features to its full extend of the programming.

    otherwise for what use is this great work, if you guys cannot explain the clients in a docu on how to modify things properly.

    you also do not buy a tv-set, vcr, camera or so without a proper manuel to get things working the way you have seen it in the promotion.

    why do we always have to change codes? why is this not already included in the extensions so that the clients only have to click the right buttons?

    do you have to open up your receiver in order to switch to another satellite?

    this are not special wishes. it’s only about the extensions and template which go with teline iii.

    scotty Friend
    #318717

    OK OK…

    In line 472 of ja.template.help.php find…

    [php] $date =& JFactory::getDate(strtotime($data->created));[/php]and change to…
    [php] $date =& JFactory::getDate(strtotime($data->created),+3);[/php]Change the +3 to suit your time. negative values (eg. -3) can also be used.

    On line 476…
    [php] return gmdate(“h:i:s A”, $sec+$tz).’ GMT’;[/php]If you change the h to H then it will give the hour in 24hr format. Remove the :s to remove seconds from the output. Delete the A to remove the AM and PM from the output, and adjust the GMT to whatever you want, CET, PDT, EDT, GMT+3, whatever you wish.

    ergohost Friend
    #318738

    I understand a bit of php but I’m no programmer 🙂

    My curiosity was about what exactly triggers it to show the update.

    Scotty thanks, youre probably fed up with the growing disquiet about poor support from JA 😀

    cgc0202 Friend
    #318746

    Unless the script used is time-zone sensitive — as it was done in the weather module — the use of GMT is more appropriate here to show “update time”, especially if you have a global audience. The use of “local time” for update time may be useful only if you have a “local website” where most of your target visitors are also in the local area,

    It would be ideal if Joomlart would indeed take the time to use time-zone sensitive update time as it was done in the weather module. Then, it would be irrelevant whether you have a global or local target audience. And the average internet user need not have to understand what GMT.

    Cornelio

    scotty Friend
    #318748

    cgc0202;146477 It would be ideal if Joomlart would indeed take the time to use time-zone sensitive update time as it was done in the weather module. Then, it would be irrelevant whether you have a global or local target audience. And the average internet user need not have to understand what GMT.

    The reason that JA decided to do it the way they did is because that is the way Joomla does it. When an article is saved in Joomla it’s ‘created date’ is taken from the server and it is this date/time that is displayed (if set to). The Last Updated module simple calls the most recent ‘created date’ and posts it at the top of the page.

    If JA were to set the Last Updated: module to be user timezone sensitive then wouldn’t they have to do the same for Show Date: in the article parameters also? This would require a lot of core overrides and simply not worth the time.

    A better option might be to show how long since last update. Then timezones become irrelevant.

    ergohost Friend
    #318760

    Messing with Joomla dosent sound good, it can be twitchy enough as it is, time since last update would be a good option to have, perhaps both options would be a great Idea.

    mx5gr Friend
    #319295

    We are experiencing an issue whereas content is modified after it is created. That is if the latest article is created at 12:00 and another is modified at 13:00, the date/time displayed by the getLastUpdate function is 12:00 not 13:00.

    How can the function be modified to show the latest article date/time that has either been updated or created, whichever is newer?

    ergohost Friend
    #319329

    That sounds interesting, I have a site that will be updating hourly 🙂

    didima Friend
    #319690

    perfect, works very well

    santoshalom Friend
    #319692

    Good one thanks for the details

Viewing 15 posts - 1 through 15 (of 17 total)

This topic contains 17 replies, has 10 voices, and was last updated by Anonymous 15 years ago.

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