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.

Discussion Expiration

13»

Comments

  • Look at Roles and permissions for admin
    their should be a new permission "Discussion expiration not restricted to categories"
    check that and admins will be able to expire any discussion regardless of category
  • Thanks again.. okay, I have checked that permission.. but how do I (admin) go about expiring a discussion category-wide? I mean, as it is, an admin could edit any discussion and apply an expiration date... but is there a way to apply the expiration to an entire category with one click?
  • Ahh no there is no way to expire an entire category with one click. although it can be easily done via a simple database query
  • Okay, thanks. Can I modify the script to delete instead of close?
  • you can delete the discussion manually using Comment removal extension
    Auto delete is a really bad idea. it can wipe out out lot of posts from the database because you have to delete the discussion and all associated comments as well. and if their is a mistake you can say goodbye to your entire database. Really bad and high risk.
  • I can add expiring entire categories feature, if you can tell me how are you going to use it. Why do you need this feature?

    One useful feature would be to add a default expiring of categories.
    For eg. By default expire all new discussions after 30 days of creation if they belong to a specific category
    However, what use will that be? an example scenario will be usefull
  • I cannot get this to work. The IE 6 bug is fixed but now it gives me

    A fatal, non-recoverable error has occurred
    Technical information (for support personel):

    Error Message
    An error occurred while creating a new discussion.
    Affected Elements
    DiscussionManager.NewDiscussion();

    The error occurred on or near: Field 'DateExpire' doesn't have a default value

    I have tried on a new install of Vanilla 1.2 and 1.3.

    Did I miss a step?

    Update: this happens when a exp date is included or excluded.
  • Did the latest update cause this problem or you never got it working anyway
    you can try line 24 in default.php to this
    $query = "ALTER TABLE `".$Configuration['DATABASE_TABLE_PREFIX']."Discussion` ADD `DateExpire` date NOT NULL default '0000-00-00';";

    I doubt that will fix it cause you already have altered the table, can you check your database and check what default values are being entered for DateField
    Btw when does the error actually occur
  • my site is behind a vpn right now. I will set it up on my public server this week....

    I will follow up with more details later this week since I am swamped with work right now.
  • Installing within Vanilla 1.1.2, I had an issue on my configuration that lead me to changing the following lines to get the vanilla post.php page to fully render correctly and to alleviate an error that was preventing the vanilla settings.php page from displaying after enabling this extension and refreshing the page. It was displaying the following error: "A fatal, non-recoverable error has occurred
    Technical information (for support personel):
    Error Message
    The "DiscussionExpirationForm" class referenced by "DiscussionExpirationForm" does not appear to exist.
    Affected Elements
    ObjectFactory.NewObject(); "

    --------------------
    Default.php
    --------------------

    -------------------------To get the post.php page to display correctly-------
    Changed Line #78 -
    (From) include( $Configuration["DISCUSSIONEXPIRATION_PATH"] . 'library/Function.DiscussionExpiration.php');

    (TO) include($this->Configuration["DISCUSSIONEXPIRATION_PATH"] . 'library/Function.DiscussionExpiration.php');
    (OR TO) include('library/Function.DiscussionExpiration.php');

    --------To get the settings page to load after enabling this extension-----

    Changed Line #130 -
    (From) include( $Configuration["DISCUSSIONEXPIRATION_PATH"] . 'library/PostBackControl.DiscussionExpiration.php');

    (TO) include($this->Configuration["DISCUSSIONEXPIRATION_PATH"] . 'library/PostBackControl.DiscussionExpiration.php');
    (OR TO) include('library/PostBackControl.DiscussionExpiration.php');

    Cool extension idea. With a little elbow grease it seems like a good starter script to enabling several different date oriented possibilities other than just closing discussions.
  • Uploaded version 1.0.6 of Discussion Expiration.
  • this one gave me a problem
    i dunno what the deal was

    r u sure everything is ok in it?

    maybe I did something wrong
  • Hi, I got this error when I go to the extension page to enable/disable extensions. its even there when I have disabled the extension // Discussions Table Structure $DatabaseColumns['Discussion']['DateExpire'] = 'DateExpire';
  • Is there a way to modify this to expire based on size of discussion -- i.e. when the comment count hits 500, lock the topic.
  • hi , i got also the same problem as Mandrak "// Discussions Table Structure $DatabaseColumns['Discussion']['DateExpire'] = 'DateExpire';" this failure msg shows itself only at the login and at the automatic upadate of the extensions site after adding or dis selecting a extension and stops the automatic site update. This way manuel refresh keeps this problem small but still it shows up at the top while logging in or signing out etz and blocks the vanilla self updater which would be a problem for vanilla 1.5 ^^ anyways hope to support it this way GL ^^ is there any advise, update or patch which to apply would solve my problem??
This discussion has been closed.