Facebook banner code integration
63,403pages on
this wiki
this wiki
Forum page
Forums: Index → Support Requests → Facebook banner code integration
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 705 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.
Hi,
I made a Facebook page for my starting french project, Guild Wars 2 Wiki. Now i want to be able to put a Facebook banner on the wiki main page. I'm using the official Facebook code for this :
<!-- Facebook Badge START --><a href="http://www.facebook.com/pages/Guild-Wars-2-Wiki/131140380244850" target="_TOP" style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Guild Wars 2 Wiki">Guild Wars 2 Wiki</a><span style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; line-height: 16px; font-variant: normal; font-style: normal; font-weight: normal; color: #555555; text-decoration: none;"> | </span><a href="http://www.facebook.com/business/dashboard/" target="_TOP" style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Créez votre propre bannière!">Faites également la promotion de votre page</a><br/><a href="http://www.facebook.com/pages/Guild-Wars-2-Wiki/131140380244850" target="_TOP" title="Guild Wars 2 Wiki"><img src="http://badge.facebook.com/badge/131140380244850.2104.522681316.png" width="360" height="140" style="border: 0px;" /></a><!-- Facebook Badge END -->
I've pasted it on this template page. It's misbehaving because the wiki software dont want people to use some of the HTML attributes (target maybe).
So, i think it might be better to use JavaScript to insert it in the page. But, i dont know how to convert that HTML bulk into a JS string or something. So i need help from people who are better than me with JavaScript.
Thanks to all. — TulipVorlax 13:14, June 10, 2010 (UTC)
- With my change to that template, use the following JS:
$(".facebook-banner").html('<a href="http://www.facebook.com/pages/Guild-Wars-2-Wiki/131140380244850" target="_TOP" style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Guild Wars 2 Wiki">Guild Wars 2 Wiki</a><span style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; line-height: 16px; font-variant: normal; font-style: normal; font-weight: normal; color: #555555; text-decoration: none;"> | </span><a href="http://www.facebook.com/business/dashboard/" target="_TOP" style="font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Créez votre propre bannière!">Faites également la promotion de votre page</a><br/><a href="http://www.facebook.com/pages/Guild-Wars-2-Wiki/131140380244850" target="_TOP" title="Guild Wars 2 Wiki"><img src="http://badge.facebook.com/badge/131140380244850.2104.522681316.png" width="360" height="140" style="border: 0px;" /></a>');--Pcj (T•C) 14:16, June 10, 2010 (UTC)
- OKAY! It was just to put it in single quotes; i always forget about this.
- The same way i could add a Piwik tracking code into the page to get visits statistics but i wont do it because it could overload my host server. — TulipVorlax 14:55, June 10, 2010 (UTC)