Thread Last Post Date and last post message

Discussion in '[bd] API' started by Euler Kernighan, Oct 14, 2015.

  1. Euler Kernighan

    Euler Kernighan New Member

    Hiya Guys,

    Wondering if you guys can help me in two very simple things.

    First one: I would like to show the last post date (latest date when that thread was updated) instead to show the thread creation date.

    I guess the change should be on file widget_threads.php - line below:

    Code:
    <?php echo date_i18n(get_option('date_format'), $thread['thread_create_date']) ?>
    
    Second: Show a "summary" of the last post message on that thread, in the current situation there are just two data: thread title and thread creation date.

    I would like to have the text of the last post message, let's say just 200 characters or less.


    Don't know if this should be classified as a 'feature request', it is so simple to do. If you guys give me any clue I can do it by my self.

    Thanks a lot!
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Regarding the last post date, you can put a widget_threads.php file in your theme directory (e.g. /wp-contents/themes/twentyfifteen/xenforo-api-consumer/widgets_threads.php) and copy the original contents and edit the line you quoted. It should work and you don't have to worry about overwriting your edits when you upgrade the plugin later.

    For the second request, it's not possible right now. I may add it in future versions though.
     
  3. Euler Kernighan

    Euler Kernighan New Member

    Great!!!

    On that line what should I use to replace the 'thread_create_date'? Is there a 'last_post_date' key?

    Thank you!
     
  4. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    You may use `thread_update_date` for last post's date.
     
  5. Euler Kernighan

    Euler Kernighan New Member

    Thank you mate! I really appreciate you support here.

    Cheers!
     
    xfrocks likes this.
Loading...