Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Time Since?

edited February 2007 in Vanilla 1.0 Help
I'm using the Panel Categories extension to display the categories on the panel. I was wondering if there was a way to fetch the time since the last post in each category. I would like to display this right next to the category name in Panel Categories ext. So a new extension to achieve this is not ideal, unless the extension can do this. Also, is it possible to stop the last active, last comment and date created from going to an actual date after so long? So it stays X days ago?

Comments

  • Bump'd cause I'd really like to know how to do this. It would help learning more about vanilla, and I really need it.
  • My guess is you would have to add some kind of a join to the query that retrieves that info, then spit it out with the rest.

    I would say more, but can't unzip a rar at work.
  • Alright cool, any help you can give me or push me into the right direction would be great.
  • Quote: WallPhone
    picI would say more, but can't unzip a rar at work.pic
    I was led to believe such a function was built-in?

    Posted: Saturday, 3 February 2007 at 1:27PM (AEDT)

  • It's built in for the DateCreated and LastPost as far as I know. I couldn't find anything on retrieving the time since last post in a specific category.
  • edited February 2007
    Oddly, there aren't any delegates in the CategoryManager, so we can't just modify the query. This will take slightly more work.

    Wanderer: .zip, and propritary .cab archives are built in, but .rar, .gz, .tgz, and, yes, even .sit and .pkg files are not. I guess the PC Microsoft mentality strikes again.

    Heck, enen Ubuntu 6.10 doesn't have support for .rar in the default install.
  • There is a field called DateLastActive in the discussion table. I have made a mod to the Panel Categories to use this to calculate the number of days since there was last activity, assuming this is what you want. Can anyone confirm this?
  • Well, what I was going for was this: it displays the time since last post or thread in each category. So category one had a post 20minutes ago it would display 20 minutes ago next to the category name on the panel.
  • I double-checked that field. It does contain the last time a post was made to the category. I tested it on my local install and it works fine. If anyone wants to test it, please email me and I'll send it to you. I don't want to upload it because it is really a modified version of the PanelCategories extension.
  • Really nice work jimw, 1 question. What would be the easiest way to add seconds to the make time function? When a new topic is posted in a category it say's 0 minutes ago.
  • I'll send you an updated default.php file.
  • Thanks again for the help the extension worked great.
  • jimw, i do all my development work on my own comp then I upload to my server. the extension worked fine when it was on my comp, but when I upload it to my server it reudces vanilla to a white page. nothing show's up at all. Any ideas?
This discussion has been closed.