"X" Days to Date?

How do I change the "x days ago" to an actual date posted?

<body class="bx-def-font" onload="if(!document.body) { document.body = document.getElementById('body'); }; h = new BxHistory(); document.h = h; return h.init('h');">

If this is the correct place to make that change, how is that accomplished?

7.3.5 with responsive UNI
Quote · 31 Jul 2013

No, you have to go into the code for the particular section of the site that generates the code for the date.  Then you change it according to the php date function to display a date instead of the ageing.  Ageing is OK for short time periods but as you can see here on the forums, having 28763 days ago gets to meaning nothing LOL.

Geeks, making the world a better place
Quote · 31 Jul 2013

Since what firebug revealed isn't what I should alter, then what string should I be searching for?

This is what I would like to use: $dateFormat = "F j, Y, g:i a";

The only place I found that was in membership_levels.inc.php

7.3.5 with responsive UNI
Quote · 31 Jul 2013

I was told the place to make the changes that would affect the entire site and now the desired format of Aug 17, 2013 - 9:48 pm is there. Unfortunately, All the dates/times are stuck on the same Jan 1, 1970 - 1:00 am. Not only that, but Orca is *still* showing the "xx" amount of days ago to reference postings.

Here's the code changed in inc/utilities.inc.php:

function getLocaleDate($sTimestamp = '', $iCode = BX_DOL_LOCALE_DATE_SHORT)

{

    $sFormat = (int)$iCode == 6 ? 'r' : getLocaleFormat($iCode);

 

    return date('M j,Y - g:i a', $iTime);

}

 

Would someone kindly tell me what I'm doing wrong and how to correct it?

Thank you!

7.3.5 with responsive UNI
Quote · 18 Aug 2013

I changed it in the modules.  For example, changing the blog from ageing to date.

Sounds like you are pulling out the original UNIX timestamp instead of the current.

Geeks, making the world a better place
Quote · 18 Aug 2013

As in this post of mine:

http://www.boonex.com/forums/topic/Post-Date-instead-of-Post-Ageing-.htm

Geeks, making the world a better place
Quote · 18 Aug 2013

Don't forget that ORCA is actually a separate application that is integrated into Dolphin.  Go into ORCA to fix it; I did that as well but a lot of this stuff was done and then I forget.

Geeks, making the world a better place
Quote · 18 Aug 2013

 

I changed it in the modules.  For example, changing the blog from ageing to date.

Sounds like you are pulling out the original UNIX timestamp instead of the current.

 That's where I was told to change to affect the entire site.

Although I agree with your statement in the post you link to (http://www.boonex.com/forums/topic/Post-Date-instead-of-Post-Ageing-.htm) that it would make much more sense to have this in a central place, I'm willing to go through and change mod by mod. From what you wrote, I gather there isn't a set directory or string to search for - No common denominator of where to go to make the change?

This is going to be fun...

I'm not going to mess with Orca, as I've made arrangements to replace it with another forum. It would be nice to have the date/time displayed in a uniform manner with the rest of the site though.

7.3.5 with responsive UNI
Quote · 18 Aug 2013

 

I was told the place to make the changes that would affect the entire site and now the desired format of Aug 17, 2013 - 9:48 pm is there. Unfortunately, All the dates/times are stuck on the same Jan 1, 1970 - 1:00 am. Not only that, but Orca is *still* showing the "xx" amount of days ago to reference postings.

Here's the code changed in inc/utilities.inc.php:

function getLocaleDate($sTimestamp = '', $iCode = BX_DOL_LOCALE_DATE_SHORT)

{

    $sFormat = (int)$iCode == 6 ? 'r' : getLocaleFormat($iCode);

 

    return date('M j,Y - g:i a', $iTime);

}

 

Would someone kindly tell me what I'm doing wrong and how to correct it?

Thank you!

 It's returning a incorrect date because you used the wrong variable when changing it.

return date('M j,Y - g:i a', $iTime);

Should be this.

return date('M j,Y - g:i a', $sTimestamp);

Not sure where you came up with using the variable $iTime when that is not the name of the variable containing the time passed to the function.


Because your only changing the format the proper edit would be to do this.

Change this.

function getLocaleDate($sTimestamp = '', $iCode = BX_DOL_LOCALE_DATE_SHORT)
{
    $sFormat = (int)$iCode == 6 ? 'r' : getLocaleFormat($iCode);

    return date($sFormat, $sTimestamp);
}


To this.

function getLocaleDate($sTimestamp = '', $iCode = BX_DOL_LOCALE_DATE_SHORT)
{
    //$sFormat = (int)$iCode == 6 ? 'r' : getLocaleFormat($iCode);
      $sFormat = 'M j,Y - g:i a';

    return date($sFormat, $sTimestamp);
}


https://www.deanbassett.com
Quote · 18 Aug 2013

 


Not sure where you came up with using the variable $iTime when that is not the name of the variable containing the time passed to the function.


Because your only changing the format the proper edit would be to do this.

 Thank you, Dean!

I got that variable from the site that promotes stuff you can get for $5.00. Obviously, their php help isn't worth a plug nickel...

7.3.5 with responsive UNI
Quote · 18 Aug 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.