-
AuthorPosts
-
September 25, 2009 at 8:39 pm #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 ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
September 26, 2009 at 7:51 am #318645Hi 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 Friendergohost
- Join date:
- October 2008
- Posts:
- 88
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 17
- Thanked:
- 10 times in 1 posts
September 26, 2009 at 11:37 am #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 Friendhariorama
- Join date:
- April 2009
- Posts:
- 174
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 50
- Thanked:
- 15 times in 1 posts
September 26, 2009 at 11:51 am #318689me 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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
September 26, 2009 at 1:18 pm #318704Sightseeing 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
2 users say Thank You to scotty for this useful post
hariorama Friendhariorama
- Join date:
- April 2009
- Posts:
- 174
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 50
- Thanked:
- 15 times in 1 posts
September 26, 2009 at 1:57 pm #318710i’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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
September 26, 2009 at 3:43 pm #318717OK 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.6 users say Thank You to scotty for this useful post
ergohost Friendergohost
- Join date:
- October 2008
- Posts:
- 88
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 17
- Thanked:
- 10 times in 1 posts
September 26, 2009 at 9:08 pm #318738I 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 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
September 26, 2009 at 11:16 pm #318746Unless 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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
September 27, 2009 at 12:13 am #318748cgc0202;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 Friendergohost
- Join date:
- October 2008
- Posts:
- 88
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 17
- Thanked:
- 10 times in 1 posts
September 27, 2009 at 8:18 am #318760Messing 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 Friendmx5gr
- Join date:
- September 2009
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
October 1, 2009 at 3:55 pm #319295We 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 Friendergohost
- Join date:
- October 2008
- Posts:
- 88
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 17
- Thanked:
- 10 times in 1 posts
October 1, 2009 at 6:57 pm #319329That sounds interesting, I have a site that will be updating hourly 🙂
didima Frienddidima
- Join date:
- September 2007
- Posts:
- 394
- Downloads:
- 2
- Uploads:
- 6
- Thanks:
- 12
- Thanked:
- 31 times in 3 posts
October 7, 2009 at 12:07 am #319690perfect, works very well
santoshalom Friendsantoshalom
- Join date:
- February 2009
- Posts:
- 119
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 67
- Thanked:
- 14 times in 1 posts
October 7, 2009 at 1:00 am #319692Good one thanks for the details
-
AuthorPosts
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