SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: phpBB Variables

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Canada
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    phpBB Variables

    Hi - sorry in advance if this is in the wrong forum.

    In phpBB, could someone tell me which files sets the variable:

    topicrow.LAST_POST_TIME

    I want to modify the format by which the date is displayed and for the life of me I can't find where the variable is set.

    Thanks

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,181
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)

    last post time

    There are several files that assign template block variables. modcp.php, viewforum.php, index.php etc. like this
    PHP Code:
    $last_post_time create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);

                
    $template->assign_block_vars('topicrow', array(
                    
    'U_VIEW_TOPIC' => $u_view_topic,
                    
    'TOPIC_FOLDER_IMG' => $folder_img
                    
    'TOPIC_TYPE' => $topic_type
                    
    'TOPIC_TITLE' => $topic_title,
                    
    'REPLIES' => $topic_replies,
                    
    'LAST_POST_TIME' => $last_post_time,
                    
    'TOPIC_ID' => $topic_id
    Then when the template files (eg. viewforum_body.tpl) are parsed, that value replaces the "{topicrow.LAST_POST_TIME}"
    HTML Code:
    <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
    If you want to make changes like have
    Feb, 19, 2007 to be 2/19/07 instead you should be able to change the format in the config panel of the ACP, which will change the $board_config['default_dateformat'] value.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Canada
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks - I've tried using the Admin panel but my changes won't take - not sure if I have a buggy install of phpBB.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,181
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)

    date format

    The date format is also set in the individual user's profile CP (unless you over-ride it).
    Check to see what your's is there too.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Canada
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eureka! That's the ticket.

    Thanks Mittineague!

  6. #6
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    The date format is also set in the individual user's profile CP (unless you over-ride it).
    Check to see what your's is there too.
    Apologies for coming in on old thread, but the comment above is the exact part of interest - how do you, in phpbb3, over-ride the date format to another date format, and taking away the option in their ucp please ?


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
  •