Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: change time/date format on the profile/member panel viewing

  1. #1
    chenji
    Guest

    Default change time/date format on the profile/member panel viewing

    How to change time/date format on the profile/member panel viewing page?
    Change following code in the profile.php file from:

    $p_arr = db_arr( "SELECT * FROM Profiles WHERE ID = $ID AND Status='Active'" );



    to:

    $p_arr = db_arr( "SELECT Profiles.*, DATE_FORMAT(LastLoggedIn,'%W %M %Y') AS LastLoggedIn FROM Profiles WHERE ID = $ID AND Status='Active'" );





    Then edit following string at the begining of the member.php file:

    $p_arr = db_arr( "SELECT ID, Sex, DateOfBirth, NickName, City, Country, Occupation, Children, Email, Picture, Pic_0_addon, Status, LastLoggedIn, LastModified, ExtraAddons FROM Profiles WHERE ID = $member[ID]" );



    change to:

    $p_arr = db_arr( "SELECT ID, Sex, DateOfBirth, NickName, City, Country, Occupation, Children, Email, Picture, Pic_0_addon, Status, LastLoggedIn, DATE_FORMAT(LastModified,'%W %M %Y'), ExtraAddons FROM Profiles WHERE ID = $member[ID]" );




    Please refer to MySQL documentation for detailed description of DATE_FORMAT function.

  2. #2

    Join Date
    Nov 2005
    Posts
    9

    Default Last logon

    Does any one know how to change this in 4.1 0004?

  3. #3
    Prometheus
    Guest

    Default

    I am interested in this mod also.
    Peace.
    Todd

  4. #4
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Yes - this should be a admin panel GLparam option - so the admin can choose between different date formats on the site.

    Needed by many people - perhaps not too difficult - beyond the need to support multiple aeDating versions in addition to v4.1.4 - but something we could do if someone would like to sponsor this work.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  5. #5

    Join Date
    Nov 2005
    Posts
    9

    Default

    well here it is for 4.1 004,

    edit your member.php file and replace the following string:

    echo $p_arr['LastLoggedIn'];

    with this one:

    echo date("m-d-Y",strtotime($p_arr['LastLoggedIn']));


    Then in profie.php

    find

    $last_login .= $p_arr['LastLoggedIn'];

    replace with

    $last_login .= date("m-d-Y",strtotime($p_arr['LastLoggedIn']));

  6. #6
    Prometheus
    Guest

    Default Time of last login not displayed

    Discodog62,
    Great mod thanks...works for 4.1.2. but this mod illiminates the "time" they last logged in.
    So have to back this one out for now.
    Peace.
    Todd

  7. #7

    Join Date
    Nov 2005
    Posts
    9

    Default

    Change "m-d-Y" to "m-d-Y \a\t h:ia"

    this will return 04-24-2006 at 12:44am

    For date codes please see. http://us3.php.net/date


    Ps I made an admin panel box so you can change when ever if any one is interested.

  8. #8
    Prometheus
    Guest

    Default Great Mod Discodog62

    I finally got around to doing this again. Works like a charm.
    Thanks again. Discodog62. I am also interested in the admin panel box you have.
    I used this code to change the "Last changes" too. Code below
    Much, much easier to read now. Scratch another one off the never ending list. ...lol....
    Thanks a lot.
    Todd

    To change the "Last changes" also.


    edit your member.php file and replace the following string:


    echo $p_arr[LastModified];



    with this one:


    echo date("m-d-Y -- h:ia",strtotime($p_arr['LastModified']));
    Last edited by Prometheus; 05-02-2006 at 02:11 PM.

  9. #9

    Join Date
    Nov 2005
    Posts
    9

    Default

    There is also the gallery.php You have objects, albums, last modified, and i think there is one more. I just have objects left to go. And profile in the admin dir. I think I need to check the blog page as well. I have been lazy these days. I will post my mod in a few days....

  10. #10
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Yea - it is sad these date time functions are not all handled in one location (function) - that would be the "correct" way to code it.... but as it is - needs to be done in multiple places.

    Same with the email sending functions - no need to have 10 spread throughout the script - should be one function that handles them all - so mods/fixes are easy.

    Ahh... one can dream. Either aeWebworks or we (modmysite) will get around to this at some point.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change Time Date in Inbox and Outbox
    By Prometheus in forum Free Mod Exchange
    Replies: 2
    Last Post: 12-24-2006, 10:31 AM
  2. Replies: 5
    Last Post: 11-15-2006, 04:20 AM
  3. change date format
    By raeyo in forum FAQ & HOWTO
    Replies: 0
    Last Post: 03-13-2006, 04:45 AM
  4. Date and time format on admin and profile pages
    By iscaweb in forum General Issues, Comments, Questions
    Replies: 3
    Last Post: 08-20-2005, 04:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •