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.

Latest Discussions Prime

2

Comments

  • Ah, ok. Maybe I'll add that in the next version.
  • Thank you, maybe you can whisper me some hack for now.
  • It depends on how you want to format it. If you know PHP, you can go to line 60 and change TimeDiff($Context, $Discussion->DateLastActive, mktime()) to anything using $Discussion->DateLastActive. That variable is just a Unix timestamp, so you can format it with any of the various PHP date functions.
  • Iam bad with PHP, I am trying to make dates look like this: November 4, 2006 . How hard would this be?
  • Ah. In that case, find: TimeDiff($Context, $Discussion->DateLastActive, mktime())
    And replace it with: date('F j, Y', $Discussion->DateLastActive)
    That should do the trick.
  • I've posted a minor update, version 1.1.2. Now, to an unauthenticated user, it will no longer try to show the number of new comments in a discussion. (Trying to fetch that when a user is not logged in just provides the total number of comments in the discussion, so it's not very useful to show that as the number of "new" comments.)
  • 3stripe3stripe ✭✭
    edited November 2006
    Can this be turned into a Wordpress plugin? Pretty please?
  • I'm not too familiar with the WordPress API. What would it do, exactly? Show the blog posts with the latest comments?
  • Hi, Could you tell me please how to modify your plugin to show the time every post was wrote besides the title of the post ? Actually I get a list of 20 item: item1 time was wrote item1 item2 time was wrote item2 item3 time was wrote item3 and so on... And I like to get something like this: item1 (time was wrote item1) item3 (time was wrote item2) item2 (time was wrote item3) Thank you !
  • I found my own solution to my post before it: # $Panel->AddListItem($ListName, $Discussion->Name, $UnreadUrl, ''); $NewString = (($Discussion->NewComments > 0) && ($Context->Session->UserID > 0)) ? ' — <span class="LatestDiscussionsNew">' . $Discussion->NewComments . ' ' . $Context->GetDefinition('New') . '</span>' : ''; $Panel->AddListItem($ListName, $Discussion->Name, $UnreadUrl, '<span class="LatestDiscussionsTime">(' . TimeDiff($Context, $Discussion->DateLastActive, mktime()) . $NewString . ')</span>', $LastUrl, ''); It's working fine. Regards.
  • edited December 2006
    Doesn't work for me, I got this message: Fatal error: Cannot redeclare latestdiscussions_addfilters() (previously declared in /home/.inkus/holidayp/holidaypad.net/community/extensions/DiscussionFilters/default.php:40) in /home/.inkus/holidayp/holidaypad.net/community/extensions/LatestDiscusssionsPrime/default.php on line 40 Can't see what the problem could be and now I can't access my forum at all! http://www.holidaypad.net/community/ Not good!
  • It seems as you have a conflict between extensions LatestDiscusssionsPrime and DiscussionFilters. Both of them use the same function. So, you have to disabled one of them.
  • Disabled them, deleted them, and cleared my cache but still problem exists! Dammit!
  • B*ll*kcs! Looks like I'm going to have to reinstal unless the add-on author can shed some light on this for me?
  • PolPol
    edited December 2006
    That's very odd. My forum uses Latest Discussions Prime alongside Discussion Filters with no problems, and I checked the Discussion Filters code, and it definitely does not declare a function of that name. The fact that they both say Line 40 suggests that your copy of Discussion Filters might have accidentally gotten replaced with a duplicate of Latest Discussions Prime. Have you checked on that?
  • Just for the record, to 'delete' the extensions you also need to remove their references from conf/settings.php which will stop vanilla using them. It's very rare to have to reinstall your whole forum.

    Pol's comment seems pretty realistic, though.
  • edited December 2006
    Cheers mini, you'll be pleased to know I figured that out (about the reference in the conf, although it's the extensions.php file rather than settings) Anyway, now I know how to remedy the situation I'll have another bang at it ;-)
  • Hah, I always mix those 2 up. :)
  • Shame there isn't a simple version of this that just outputs the 5 last modified discussions :(
  • fmimosofmimoso
    edited September 2008
    Any idea on how to remove the stickies from the list? Thanks. :)
Sign In or Register to comment.