1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How To Remove/Disable ‘Contact The Owner’ Option Under Listing

Discussion in 'Templates, HTML, CSS, and Design Help' started by howinfo, Jul 18, 2012.

  1. howinfo Customer

    v4.2.3 Developer

    My site has been under a serious spam attack for the last few days. Spam has been sent out through the Contact The Owner Box below the listing when user is not logged in. ( like you can see on this page here:
    http://www.howtobecome.info/listing/318/First_Aid_at_Work_Course.html
    only I have changed it to - Contact The Training Provider )

    I want to temporarily not display the Contact Owner Box and only leave the option to contact the owner when user is logged in.

    I did not find any option in settings to disable the Contact Owner Box under the listing, can someone advise me how can I temporarily do that till I figure out how to make this contact option more spam proof.

    Thank You
  2. howinfo Customer

    Ok, not to worry found the option under - Edit User Group.
  3. freeze2 Super Moderator

    I'm not sure...but another option may be to do the following:

    In your viewlisting.tpl at the bottom .... find:

    Code:
    {dynamic}
    {if $pmon=="Y" && $smarty.session.uid > 0}
     
    {elseif $allowcontact=="Y" && $display=="Y"}
        {include file=contact/contactowner.tpl}
    {/if}
    {/dynamic}
    Change to:

    Code:
    {if $smarty.session.username<>'' || $smarty.cookies.username<>""}
    {dynamic}
    {if $pmon=="Y" && $smarty.session.uid > 0}
     
    {elseif $allowcontact=="Y" && $display=="Y"}
        {include file=contact/contactowner.tpl}
    {/if}
    {/dynamic}
    {/if}
    I tried this and it seems to do exactly what you want by only showing the contact form when someone is logged in...regardless of the usergroup settings.

    Doing it through the admin is probably easier though...
  4. howinfo Customer

    Thank you for your reply but I did manage to do that through the admin user group settings already.
    I do like the option so that people can easily contact the owner but it needs some additional security measures to prevent spam, like adding some security questions like ‘How much is 5+5+6’ like it can be done on Vbulletin where I came up with 30 questions that is randomly asked. That will eliminate all the automated spam.
  5. freeze2 Super Moderator

    Try the reCaptcha...works great for me :)
  6. howinfo Customer

    Yes, I suppose that reCaptcha is better than the original one but on our site forum section lot of automated registrations still came through as spammers have systems to read the reCaptcha, I do not know how they do it, because I can not read the reCaptcha myself at most times but somehow they manage to get through, some days 200+ spam signups. So I came up with about 30 questions like this below that are randomly displayed and now I get only about 5-10 spam signups a day but I don’t think these questions can be answered by the bot, it must be a human being doing it, but that is manageable for me.
    • What is the sweet substance made by bees?
    • Which is brighter, the Sun or the Moon?
    • Solar power generates electricity from what source?
    I think I came up with quite clever questions, ( very pleased with myself :) ) if you go to our forum sign up page and refresh the page you can see more of these.

Share This Page