Author Topic: Tweet/Facebook Buttons  (Read 6302 times)

Offline Koroku

  • Golden Sun Universe Staff
  • ***
  • Posts: 62
  • Gender: Male
  • Wikimoner
    • View Profile
Tweet/Facebook Buttons
« on: June 23, 2011, 03:32:30 AM »
So, I added these to Wikimon, and if anyone is interested in my hackjob of a mod, here it is:

For the bottom, underneath the content:

In MonoBook.php, find:
Code: [Select]
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>and add this after:
Code: [Select]
<hr width="100%" align="center" />
<div width="100%" align="center" style="padding-top: 10px;">
<div style="float: left; padding-left: 150px;"><a href="" class="twitter-share-button" data-count="vertical" data-via="digiwikimon">Tweet</a><script type="text/javascript" src=""></script></div>
<div style="float: right; padding-right: 150px;"><script type="text/javascript" src=""></script><g:plusone size="tall"></g:plusone></div>
<?php $url "http" . ((!empty($_SERVER['HTTPS'])) ? "s" "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>
<iframe src="<?php echo urlencode($url); ?>&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=recommend&amp;font=trebuchet+ms& amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:50px"></iframe>
<!-- END SHARE BOX -->

If you want the Tweet/Facebook icons over in the sidebar, right under the logo... in MonoBook.php, find
Code: [Select]
<script type="<?php $this->text('jsmimetype'?>"> if (window.isMSIE55) fixalpha(); </script>
$sidebar $this->data['sidebar'];
and add above:
Code: [Select]
<!-- begin of banner1 -->
        <div class='generated-sidebar portlet'>
        <div style="border: none;" align="center">
<a href="" class="twitter-share-button" data-count="horizontal" data-via="digiwikimon">Tweet</a><script type="text/javascript" src=""></script>
<?php $url "http" . ((!empty($_SERVER['HTTPS'])) ? "s" "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>
<iframe src="<?php echo urlencode($url); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;font=trebuchet+ms& amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:30px"></iframe>
<!-- end of banner1 -->

Hackjobs,  but a bit of social media never hurt anyone :-D

Oh, and for the Twitter ones, make sure to change data-via="digiwikimon" to your own Twitter usernames~

Offline tacopill

  • Lylat Wiki Staff
  • ***
  • Posts: 3128
    • View Profile
    • csanimefan
Re: Tweet/Facebook Buttons
« Reply #1 on: July 09, 2011, 07:23:49 PM »
grabs for Lylat Wiki, WikiBound and Fire Emblem Wiki.

Thanks Koroku!

Offline KidIcarus

  • Hero Member
  • *****
  • Posts: 905
    • View Profile
Re: Tweet/Facebook Buttons
« Reply #2 on: July 07, 2015, 11:27:05 PM »
How long did it take to make these? Would it be easy to make a Pinterest button as well?