We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37946
    • 70 Posts
    I've searched the forums with no luck so I thought I'd start a new thread in hopes it would stir up some conversation.

    I am trying to cut down on the spam I'm getting on my site (using articles).

    I have installed Rampart - and created a ban & activated it. (Banning my current IP)

    I am using this call:
    &preHook=`hook.RampartQuip`
    


    On this file:
    /core/components/articles/model/articles/article.class.php

    ...approximately line #145 is where I placed the above call. (Last call in the list)

    I created a "test" snippet call and just wrote out to the log file. I am getting that response in the log (3 times actually which I think is strange). However I am unable to get the rampart call to fire. Is there something else I need to have configured/enabled?

    Thank you for your time!
      • 42901 ☆ A M B ☆
      • 73 Posts
      I think I have this figured out - just don't hold me to anything if it doesn't work.

      In your blog template, find this code:
      <div class="post-comments" id="comments">
      		[[+comments]]
              	<br />
              <h3>Add a Comment</h3>
              [[+comments_form]]
          	</div>


      What I did was add this above [[+comments]]
      [[!Quip? &preHook=`hook.RampartQuip`]]
            [[+comments]]
      


      It's difficult for me to know for sure if this is right. I can say that it's blocking my entries (as Comcasts on the Spamhaus blocked list).

      However, I cannot whitelist my I.P. in Rampart and successfully post to my blog while using Comcast. [ed. note: adagency last edited this post 13 years, 7 months ago.]
        Woodlands Ad Agency
        Our blog should NOT be read by anyone....EVER http://woodlandsadagency.com/blog/
        ...Don't say we didn't warn you.
        • 37946
        • 70 Posts
        Hi Darren -
        Thank you very much! I will give this a shot and report back. I was able to get Rampart to fire but I was inserting the prehook in the actual core code which I know is not the best situation.

        I was also finding that because my site is load balanced, the IP that each comment was coming from seemed to be coming from my LB server. I (think) I have a solution for that as well. I'll post back what I found out.
          • 42901 ☆ A M B ☆
          • 73 Posts
          Jentree, did this work for you?
            Woodlands Ad Agency
            Our blog should NOT be read by anyone....EVER http://woodlandsadagency.com/blog/
            ...Don't say we didn't warn you.
            • 37946
            • 70 Posts
            It didn't (yet). I got pulled off the project temporarily. My site is behind a load balancer - so what is happening now is that the system thinks that every post is from the same IP. Which it is - my load balancer. Not the IP of the user who is actually submitting the comment.
              • 15558
              • 108 Posts
              how is Rampart supposed to help me when bots comment and spam my entries and post from a huge lot of different IPs ? For now I only block them via the .htaccess file but the damage is already done.

              Can someone tell me even what's obvious ?
                Sorry for that ⇧ , I'm no dev but I wanna try
                • 8168
                • 1,118 Posts
                Quote from: jentree at Apr 05, 2013, 01:57 PM
                It didn't (yet). I got pulled off the project temporarily. My site is behind a load balancer - so what is happening now is that the system thinks that every post is from the same IP. Which it is - my load balancer. Not the IP of the user who is actually submitting the comment.

                Have a look here > https://forums.modx.com/thread/99547/where-is-the-actual-quip-call-when-using-articles#dis-post-538312