Login  Register

Re: Limit number of posts

Posted by Harvey on Oct 19, 2014; 11:02pm
URL: https://support.nabble.com/Limit-number-of-posts-tp7591916p7592057.html

Lets remove the post limit from regular users and add it to Spam. 

Thanks.

On Sun, Oct 19, 2014 at 6:41 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Here is the code to make the reply link disappear when someone from the Spam group posts more then 2 replies in a day:
<macro name="user_request">
    <script type="text/javascript">
        var posts_today;
        var path = '/template/NamlServlet.jtp?macro=user_response&user=';
        var url = Nabble.userId;
        $.getScript(path+url+Nabble.getClientID() ,function(data){
        posts_today = data;
        if(posts_today > 2){
        $('.reply_link').css('display','none');
        }
        });   
        
    </script>
</macro>
<macro name="user_response">
    <n.if.user_from_get.is_in_group group="Spam" >
        <then>
            <n.user_from_get.node_count filter = "date_part('day',now() - when_created) = 0 "/>
        </then>            
    </n.if.user_from_get.is_in_group>       
</macro>
 
What should I do?
My test forum.



If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/Limit-number-of-posts-tp7591916p7592055.html
To unsubscribe from Limit number of posts, click here.
NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
The Blog: NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com
NY Ski Directory: directory.NYSkiBlog.com
HTTPS Please!