Does someone mind telling me where I can modify the code for postings to show the post date and time instead of the ageing of the post? In other words, show "May 12 2012" (and perhaps the time) instead of "65 days ago"? I understand the date is stored in the unix timestamp and I know how to use date() to extract the date out of the timestamp. I want this to be across the whole site for all postings, blogs, videos, comments, etc. If necessary, just change the storage from the unix timestamp to a date string in the database. Users don't want to have to do maths to know a post was made on June 3 2010 when they should just be able to read it. It is these little things where I don't understand the thinking of the developers.. Geeks, making the world a better place |
I still want to do this. If it is not a setting, then I don't mind hacking the bloody heck out of the code to get this done. What about 7.1, will it have the post date instead of ageing?. I don't want to see 261 days ago, I want to see the post date like every other social networking application on the planet. Geeks, making the world a better place |
I have managed to learn how to do this. It seems that it is spread out among the modules. For example, in the spy I have it showing the date. I would have thought this would be a single function shared by all the modules but I have now learned it is not. Seems a strange way of doing things to me, why not have the date thing global for the site? Then it could be changed in one place and it would change it across all the modules. Instead, I will need to change this for each module.. Geeks, making the world a better place |
The REAL work in changing ageing to post date was of course finding where to make the changes. I found out that it is not a set function used throughout but in the modules.
For changing in the Blog module to show Post Date, instead of ageing, locate BxBlogSearchUnit.php in /modules/boonex/blogs/classes.
Change:
$sDateTime = defineTimeInterval($aResSQL['date']);
to:
$sDateTime = date("j-F-Y, g:i a",$aResSQL['date']);
Note: the format of the date can be changed by changing the parameters of date(). Just search for PHP date() to learn the different ways of formatting the date string. Of course my way does not take into account languages.
Change:
$aUnitReplace['post_date'] = strtolower($sDateTime);
to:
$aUnitReplace['post_date'] = $sDateTime; //Note, this is to have the Month starting with an upper case letter
Geeks, making the world a better place |
For Dolphin 7.1:
$aUnitReplace['post_date'] = strtolower($sDateTime);
is not included so that part can be skipped.
Geeks, making the world a better place |
Thanks very much for sharing this, this will very useful. Ultra Newb reporting for duty. |
For Dolphin 7.1:
$aUnitReplace['post_date'] = strtolower($sDateTime);
is not included so that part can be skipped.
This change occurred at Changeset 17183; prior to 17183 they decided they should have the ageing in lower case. [insert shrugging shoulders emoticon here]
Geeks, making the world a better place |
Hey GG,
Sorry to put this old post back up. But any chance you could help me find the location to change ageing to post date for the Ocra Forum module? I have looked high and low. The only place I found that has $iTimestamp is under forum/classes/Forum.php
Line 1952 and 1969.
I have played around a little but could not change it to date. Please help me out. Thank you
|
I never changed it for the forum. I guess I could take a look even if I am a bit anti-Dolphin at the moment. Geeks, making the world a better place |
Thanks GG. What other options you think we should try or you have tried that is similar to Dolphin? |
I should have a solution for you in a bit. No one else seems interested in changing this or if there are those that changed it they are not here or not interested in sharing the solution. Geeks, making the world a better place |
Sorry it took me so long, I chased the wrong rabbit down the wrong hole.
The fix is very simple:
Go to /modules/boonex/forum/inc/util.php
Find the function around line 268:
function orca_format_date ($iTimestamp)
Change the function to:
function orca_format_date ($iTimestamp) { $sForumDate = date("j-F-Y, g:i a",$iTimestamp); return $sForumDate; }
To format the date go to http://php.net/manual/en/function.date.php; that will explain the different code to use in the date() function above.
Geeks, making the world a better place |
Thank you so much Geek Girl. Works like a charm!!! Sorry to hear you are current unhappy with Dolphin. Have you search or try other script? |
Little offtopic just for professional curiosity: geek_girl, why are you anti-Dolphin at the moment? http://boonexpert.com |
Little offtopic just for professional curiosity: geek_girl, why are you anti-Dolphin at the moment?
I predict her response will concern one Andrew Boon.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
No, it concerns being chastised over an incident in which I did nothing wrong but had to apologise and say I won't do it again, admitting I was a bad little girl. It also concerns how vendors can jerk around their customers with Boonex doing nothing about it. One should not have to wait three or four weeks to get activated from a vendor; that vendor's arse should be history from the market since they repetitively ignore customers; yet they will be here long after I am gone. The whole trusted vendor crap. Boonex claiming they have no control over the market; that if you get burned in the market it is nothing to do with them. Yet, go to the market page and they promote vendors and products.
Then there is the whole home page of Boonex where they continue to list hosts that they know one can not host a Dolphin site on; none of the $4.99 hosts will let you use the resources that Dolphin requires. Yet, Boonex touts the hosts as recommended hosts. Put the real requirements up on the front page and take down the recommended hosts; Boonex must be getting a kick-back from them. Plus the home page is full of misleading information.
Also, at every level there should be bold clear letters that "There is NO support" even if you buy a Prime license. I don't know how often someone has come into the forums saying they brought a license now where is my support. Be upfront with Dolphin and quit misleading people; be upfront across the board.
Geeks, making the world a better place |