Community Central

November has come to an end and the rituals must be observed. Check out This Month at Fandom!


Community Central
Forums: Index Community Central Forum Twitter follow button...
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

Hi, looking to get this functional for Common.js

<a href="" class="twitter-follow-button" data-show-count="false">Follow @redwallwiki</a> <script src="" type="text/javascript"></script> --LordTBT Talk! 00:59, June 7, 2011 (UTC)

Are you just adding a twitter button? Because Twitter buttons aren't placed in common.js, they go on the main page.--GodPray  01:18,6/7/2011 
Nope, this is not the Twitter feed, this is a Twitter Follow button, and it's designed to place wherever you want. You can actually place a Twitter feed wherever you want too. I know about social media, thanks. -- LordTBT Talk! 04:48, June 7, 2011 (UTC)
The easiest method to get this to work is putting the HTML above into a MediaWiki message (e.g. w:c:redwall:MediaWiki:Twitter-button) and then adding it to pages with <verbatim></verbatim> (e.g. <verbatim>Twitter-button</verbatim>). No JS required. -- Porter21 (talk) 09:46, June 7, 2011 (UTC)
When I try this: "The page you wanted to save was blocked by the spam filter.

This is probably caused by a blacklisted link or pagename. The following link, text or pagename is what triggered our spam filter: <a href" -- LordTBT Talk! 12:27, June 7, 2011 (UTC)

Eh, why MediaWiki pages are affected by the spam blacklist is beyond me... Oh well, you can still do it similar to your Facebook fanbox embedding.
What wiki were you on when got that to trigger? --Uberfuzzy 04:21, June 8, 2011 (UTC)
Found it, the filter is blocking pages that the first chars of the page are exactly "<a href=", its being triggered a few hundred times a day, probably preventing comment spam. Just change up the code a little, like move the class before the href and it will be fine --Uberfuzzy 04:25, June 8, 2011 (UTC)
Add to MediaWiki:Common.js:
function addTwitterButton() {
   $('#twitter-button').append('<a href="" class="twitter-follow-button" data-show-count="false">Follow @redwallwiki</a><script src="" type="text/javascript"></script>');
Then simply add <span id="twitter-button"></span> where you want the button to appear. -- Porter21 (talk) 13:29, June 7, 2011 (UTC)
Renamed this post and tagging {{FAQ}}. -- Fandyllic (talk · contr) 7 Jun 2011 2:18 PM Pacific