Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

1 discussion for 1 month

venzqueravenzquera New
edited September 2012 in Vanilla 2.0 - 2.8

haii.. how to limit number of discussion for user? i want set 1 discussion for 1 month every category..
so user need to wait 1 month before make a new topic/discussion..

Comments

  • Options
    peregrineperegrine MVP
    edited September 2012

    for all users or just one user? use the ban if you want to block a particular user for a month.

    if you want to do it for all users - write a plugin

    that does some variation of SQL below

    you will need to set a conditional to match the current date -30 days against the date inserted. if it doesn't validate block the post in the post event.

    
    SELECT `InsertUserID` , `DateInserted` , `CategoryID` , DATEDIFF( CURDATE( ) , `DateInserted` )
    FROM `GDN_Discussion`
    WHERE `InsertUserID` = '6'
    AND `CategoryID` = '1'
    AND DATEDIFF( CURDATE( ) , `DateInserted` ) > '30'
    ORDER BY 'DESC'
    LIMIT 1
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Wow. Those are some serious restrictions if it is for all users.

  • Options

    That's kinda what I was thinking kinda just seeing the name of the topic

  • Options
    AoleeAolee Hobbyist & Coder ✭✭

    Checkout the post approval plugin. Check how it works you can pull out something from there.

  • Options

    no.. i'm looking addon that can limit new discussion for selected category, basic user just allowed to open 1 discussion for a month.. and premium member can open many discussion for a month.

  • Options
    peregrineperegrine MVP
    edited September 2012

    there is no current addon or plugin that does that, you would have to write one yourself and get free help on this forum if you run into snags. or .... Since it seems that this type of plugin would be of interest to so few people, you would probably have to decide how much it is worth to you and offer to pay a certain amount for someone to write if for you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.