Any way to suppress INVITE button on posts?


(Tobias Eigen) #1

We don’t like the INVITE functionality and have been encouraging members to use the :link: feature to invite people by grabbing the link and share it via message or email or social media or whatever. It’s not possible to disable the INVITE feature for staff/moderators, unfortunately, and some forget to not use it. Is there a way to suppress it, perhaps using a css customization? Would be grateful for guidance if so.

Another solution would be to disable the button also for staff/moderators if max invites per day is 0.


(cpradio) #2

On the post or topic? As on the post, can’t you alter the post menu in Admin Settings?

As for on the Topic…

#topic-footer-main-buttons button.share { display: none; }

But that still leaves clicking the post timestamp…


(Tobias Eigen) #3

Thanks! However the code you provided is for the :link: which I don’t want to suppress. I want to suppress the INVITE button in the topic menu in the footer.


(cpradio) #4

Oh, that is what I get for looking at the emoji used and aligning that with the button. lol

Well, that button is far harder to hide :frowning: it doesn’t have a specific class. Going to have to submit a PR for that one too.


(cpradio) #5

Once it is merged you can use

#topic-footer-main-buttons button.invite-topic {display: none}

That was quick! Thanks @codinghorror


(Tobias Eigen) #6

Thanks much @cpradio and @codinghorror! Much appreciated. Next time I upgrade I’ll check for this.

One afterthought: I hope this does not affect message invites which remain crucial even if we hide topic invites.


(cpradio) #7

Which button specifically, as the topic-footer-button also shows on Messages (and it has one on the first post of a Message).

The one on the first post is definitely not affected, the latter may require a different CSS rule to be applied to not impact it.


(Tobias Eigen) #8

actually I never noticed that there are two invites on messages, one below the first post and another at bottom. do they even work the same way? if so then hiding the one at bottom is not so tragic.


(cpradio) #9

Yes, they seem to work the same way (based on very quick testing I just did)


(Mark Walkom) #10

I’m no CSS expert but this doesn’t seem to work for newer versions, is anyone able to assist with an update?


(Daniela) #12

Try only:

.topic-footer-main-buttons .invite-topic { display: none; }

(Mark Walkom) #13

Awesome, that worked a treat thanks @cpradio!

For the record, I added this under Admin> Customise > Themes > the theme we use > Edit CSS/HTML and finally in the Custom tab/section.