Disable email or provide Contact URL on About page

Hi, I just set up Discourse yesterday and noticed it displays my email address on the About page. I don’t want this for spam reasons. I would prefer to provide a URL for my existing WordPress contact page I am integrating with. Or at least be able to disable this section containing the email. I think this would it more flexible out of the box.

So for now though, I couldn’t find a way to remove it from the About page via admin. Is this possible via some mechanism like changing a template?

Yes, just edit the contact email address in Admin, Settings, Required to blank.

This will make it impossible for Discourse to send you critical and upgrade notifications via email though. So as long as you are cool upgrading manually with zero notifications when there are security issues, etc.

Okay, I was hoping to keep an admin email for important things like the notifications. I just don’t want it on display.

You can probably remove it via CSS override. None of our non-core pages are really visible to spiders without special support anyway – try viewing that page with JavaScript disabled to see what I mean.

Is there a different subscription mechanism for Discourse update notifications? Like a mailing list?

No, there is not. Sorry.

For anyone else interested… I found http://sibbell.com which claims to notify you of releases of your GitHub starred repositories.

If you are using CloudFlare, there is also an option to obfuscate emails on web pages. See here for more info: What is Email Address Obfuscation? – Cloudflare Support

That very much won’t work. It will do one of three things:

  1. Nothing at all
  2. Replace the email in the JSON and fail to change it back in the rendered /about page
  3. Totally break the JSON and make it unparsable
  4. Make the admin pages’ Show All Emails button unusable

I’m not saying it’s the best way… but a simple way of using a URL on the about page would be to paste something like this into your Admin > Customize >CSS/HTML > </head>

<script type='text/x-handlebars' data-template-name='about'>
<div class='container body-page'>
  <section class='about'>
    <h2>{{i18n 'about.title' title=title}}</h2>
    <p>{{description}}</p>
  </section>

  {{#if admins}}
    <section class='about admins'>
      <h3>{{i18n 'about.our_admins'}}</h3>

      {{#each a in admins}}
        {{user-small user=a}}
      {{/each}}
      <div class='clearfix'></div>

    </section>
  {{/if}}

  {{#if moderators}}
    <section class='about moderators'>
      <h3>{{i18n 'about.our_moderators'}}</h3>

      <div class='users'>
        {{#each m in moderators}}
          {{user-small user=m}}
        {{/each}}
      </div>
      <div class='clearfix'></div>
    </section>
  {{/if}}

  <section class='about stats'>
    <h3>{{i18n 'about.stats'}}</h3>

    <table class='table'>
      <tr>
        <th>&nbsp;</th>
        <th>{{i18n 'about.stat.all_time'}}</th>
        <th>{{i18n 'about.stat.last_7_days'}}</th>
      </tr>
      <tr>
        <td class='title'>{{i18n 'about.topic_count'}}</td>
        <td>{{number stats.topic_count}}</td>
        <td>{{number stats.topics_7_days}}</td>
      </tr>
      <tr>
        <td>{{i18n 'about.post_count'}}</td>
        <td>{{number stats.post_count}}</td>
        <td>{{number stats.posts_7_days}}</td>
      </tr>
      <tr>
        <td>{{i18n 'about.user_count'}}</td>
        <td>{{number stats.user_count}}</td>
        <td>{{number stats.users_7_days}}</td>
      </tr>
      <tr>
        <td>{{i18n 'about.like_count'}}</td>
        <td>{{number stats.like_count}}</td>
        <td>{{number stats.likes_7_days}}</td>
      </tr>
    </table>
  </section>

  <section class='about contact'>
      <h3>{{i18n 'about.contact'}}</h3>
      <p>You can always get in touch with us here: <a href="http://www.example.com/contact_form">Contact Form</a></p>
  </section>


</div>
</script>

EDIT: this content was taken from the template and modified.

Hopefully the Discourse team will confirm this will allow you to leave your contact email in place in the settings.

1 Like

I have removed the contact email for now. Having the system tell you it has potential security issues sounds like a bit of a security hole to me :wink: The hacker could have already compromised the system and disabled this, so I think it shouldn’t be the primary form of security notification, more a convenience.

Being able to disable the meta generator data that displays your Discourse version would be nice too. I’m not sure what benefits it provides, but it does leak information useful for hacking.

The best idea I have come up with adding the contact URL is by inserting HTML with DOM manipulation. That way you can leave the rest of the template as is. I don’t know if I will run into issues with that, because it seems emberjs can sometimes modify the code using a message bus. I am trying to figure out how to get jQuery working as mentioned here: https://meta.discourse.org/t/jquery-in-admin-custom-html/24253

Base it off what @DeanMarkTaylor put above. Place it in the “top of the pages” customization section. Customizations are live-updated over the message bus; upgrades just tell the app to refresh on the next click.

Good news @arlair ! There is now an option to use a contact URL here instead of the email, just enter it in your site settings. Thanks to @techapj for getting that in with some other About page improvements.

5 Likes