Friday, July 8, 2011

Include Social Network buttons in your Blogger posts

Social networks are actually the most important traffic source in the web. Including buttons is a good way to socialize your blog. Here we'll show some tips to include buttons in your website, particularly in Blogger.



AddThis


The first tool you must know is AddThis. It integrates a lot of social network buttons (349 at the moment) in several languages in one widget with a few code lines. It also provides analytics services and trend statistics. To include AddThis in your website, you only need to follow the instructions of the following link: Get AddThis (select the blogger option to see blogger's instructions).

For example, here's the code used in this blog:

<!-- AddThis Button BEGIN -->
 <div class='addthis_toolbox addthis_default_style' expr:addthis:title='data:post.title' expr:addthis:url='data:post.url'>
  <a class='addthis_button_compact' href='http://www.addthis.com/bookmark.php?v=250&amp;username=yourusername'>Share</a>
  <a class='addthis_counter addthis_bubble_style'/>
  <span class='addthis_separator'>|</span>
  <a class='addthis_button_preferred_1'/>
  <a class='addthis_button_preferred_2'/>
  <a class='addthis_button_preferred_3'/>
  <a class='addthis_button_preferred_4'/>
  <a class='addthis_button_stumbleupon'/>
  <a class='addthis_button_delicious'/>
  <a class='addthis_button_digg'/>
  <a class='addthis_button_google_plusone' g:plusone:size='small'/>
 </div>
 <div class='addthis_toolbox addthis_default_style' expr:addthis:title='data:post.title' expr:addthis:url='data:post.url'>
  <a class='addthis_button_facebook_like'/>
  <a class='addthis_button_tweet' tw:via='themunsonsapps'/>
  <!-- Reddit button start -->
  <script>reddit_url=&#39;<data:post.url/>&#39;</script><script>reddit_title=&#39;<data:post.title/>&#39;</script><script language='javascript' src='http://reddit.com/button.js?t=1'/>
  <!-- Reddit button end -->
 </div>
 <script type='text/javascript'>var addthis_config = {&quot;data_track_clickback&quot;:true};</script>
 <script src='http://s7.addthis.com/js/250/addthis_widget.js#username=yourusername' type='text/javascript'/>
 <!-- AddThis Button END -->

That looks like this:





Remember to include it before the <div class='post-footer'> tag if you're using Blogger.

Although it allows full customization using its API, it has some display limitations. Maybe you want the button to have a different layout or to display counters that AddThis not implements. This is the case of social networks buttons with counters like reddit, digg, stumbleupon and much more.

Facebook



There's a form to include facebook buttons in your website, you only need to insert the URL to like, facebook account and layout params like font, color or width.
You can choose the kind of button:

And much more. Once again, to include them in in Blooger, insert the code just after <div class='post-footer'> tag in your template.

Twitter


Twitter API is available here. There are several kinds of button, languages and customization.

For example:

<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://themunsonsapps.blogspot.com" data-count="vertical" data-via="themunsonsapps">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Try this button:



You can also set the predefined text, account to suggest, url to tweet and more. Visit the full dev API for Tweet Button. See also how to add Twitter button to Blogger.

Google +1


Google plus one is the new Google's social network. To include a button in your website, you only need to fill some form fields from the official +1 button site and paste the code where you want. To include it in blogger you can follow these tips.

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="tall" href="http://themunsonsapps.blogspot.com"></g:plusone>

Check the generated button:



Reddit


Check the different reddit buttons and them customizations here: Reddit Buttons.

<script type="text/javascript">
  reddit_url = "http://themunsonsapps.blogspot.com";
  reddit_title = "Reddit Buttons!";
</script>
<script type="text/javascript" src="http://www.reddit.com/static/button/button3.js"></script>

Reddit this sample:




To include it in every Blogger post, search once again for the <div class='post-footer'> tag and insert the code after it, but in this case, set the url parameter to: <data:post.url/> (see how to add reddit button to every Blogger post).

For example:

<script type="text/javascript">
  reddit_url = "<data:post.url/>";
  reddit_title = "Reddit Buttons 2!";
</script>
<script type="text/javascript" src="http://www.reddit.com/static/button/button3.js"></script>

Delicious

The official website for inserting delicious buttons can be found here. Here there is a sample of what will you get:

Bookmark this sample button in delicious:
Delicious Bookmark this awesome website on Delicious

<img src="http://l.yimg.com/hr/img/delicious.small.gif" height="10" width="10" alt="Delicious" /><a href="http://www.delicious.com/save" onclick="window.open('http://www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;"> Bookmark this awesome website on Delicious</a>

To include it in every Blogger post, you will need to make other changes, check them at add delicious button to Blogger post.

Digg 


Just like delicious, you can insert a digg button with counter in your website following the official guidelines.

Digg this sample button:
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<!-- Wide Button -->
<a class="DiggThisButton DiggWide" href="http://digg.com/submit?url=http%3A//themunsonsapps.blogspot.com"></a>





Check the blogging tips about how to add digg button to Blogger post.

StumbleUpon 


SumbleUpon buttons are named badges. You can consult the official badge setup here. It also includes guidelines for blogger, feedburner, wordpress and more. You can choose the button layout and style, including a default url or getting it from the actual website, for example this:

<script src="http://www.stumbleupon.com/hostedbadge.php?s=5&r=http://themunsonsapps.blogspot.com"></script>



I hope this can be useful for you! Enjoy it!

Continue reading »

Wednesday, July 6, 2011

MTG Finder 1.3.0 Chrome Extension



MTG Finder brings you a new type of search: TCG Player.com. This search allows you to see card prices among several online stores, based in the card condition. There also be displayed a "People who bought this card also purchased..." section, a graphic price/time and more. If card is not found (usually because card name is wrong or another language), tcgplayer homepage will be displayed.


TCG Player search

TCG Player Store price comparison and graphic


MTG Finder also fixes a bug that came with 1.2.0 version: starting and ending spaces in selected words are now ignored.

We hope that this can be useful to you, all suggestions in order to improve MTG Finder are welcome. Firefox version is coming soon, is there any Mac user who want to test it?

Don't forget to leave your feedback in the Chrome Webstore and like us on facebook!

Download MTG Finder here!

Continue reading »

Thursday, June 16, 2011

MTG Finder 1.2.0

In MTG Finder 1.2, we've introduced two new searches:
  • Blackborder.com. The famous online store has collaborated with us providing a lookup service that shows card image, card price, card price average through some other stores and other card attributes. Just like displays the image below. Blackborder search it's light, so you can have quick access to Blackborder database. It also has a search toolbar to type your wanted cards.
    Depending on screen resolution, sometimes clicking the MTG Finder popup you can get a vertical hidden scrollbar that you can normal scroll down with mouse wheel.
    Blackborder.com search
  • Gatherer. Official wizards magic the gathering database. Here you should be able to find everything about magic cards in every printed language (but the search with MTG Finder can be done only in english words). Card legality, artist info, official oracle text and much more!
Gatherer search


Keyboard shortcuts have been inserted, so you can search in a new tab or window (choose it on the options page) by pressing a custom key combination (default ctrl+shift+z). See your custom keys in the options page like shown below. Be careful with the chosen key combinations, because it can also trigger other Chrome features.
Thanks to Mohamed Mansour for his work done to catch keyboard events.
 
New options page
I would like to thank again Blackborder.com's collaboration.

Don't forget to "like us" on facebook and leave your feedback in the Chrome Webstore!

Continue reading »

Wednesday, June 8, 2011

MTG Wishlist 2.1.0


After a few days of using the brand new MTG Wishlist 2.0.0, arrives the 2.1.0. I want to thank all the people that have collaborated reporting a bug or making suggestions.

The new version fixes the following bugs:

  • Working offline with the Blackborder price checked blocked the app
  • Cards with "-" in the name like leonin relic-warder displayed a N/A in the BB Price column

The improvements that MTG Wishlist 2.1.0 brings are:
  • Auto fill card expansion sets when inserting a card with the expansion set field blank. The expansion field will be set to the cheapest one according to Blackborder database (internet connection must be up!).
  • You can have multiple cards with same name but different expansion set. You must to choose an expansion set from the list when inserting the new card. If you choose an existing expansion set, the quantity of the actual card will be increased.

Don't forget to click in the "I like" button on facebook and leave your feedback at the Chrome Webstore.

Continue reading »

Wednesday, June 1, 2011

MTG Wishlist 2.0.0


MTG Wishlist Chrome Extension comes with several improvements to make your life easier. The first and most important is the collaboration with Blackborder to take live prices of your wished cards. The other is the possibility to import/export your wishlist.
The layout has been lightly changed to include new columns, increasing a little the popup width.


Take a few minutes to read the details of these new features described below:

  • The Blackborder price column contains the actual price of the card in US Dollars. Card prices are refreshed when Chrome starts, clicking the MTG Wishlist popup after 12 hours since last refresh or pressing the refresh button. The 12 hours wait time has been introduced to avoid some kind of delay if you have a lot of cards stored, so maybe you feel some delay once every 12 hours, so don't scare.

    The Blackborder price depends on the expansion set selected. Try to see the different prices of the same card in different expansion sets, like an Alpha (LEA) Black Lotus and an Unlimited (2ED) one. To see the differences, save the card with the changed expansion set and click the refresh button (or wait 12 hours). If your card doesn't have an expansion set associated or the expansion set is wrong, the cheapest price will be displayed. If the card doesn't exist (to use this feature, card names must be in english), N/A will be displayed.

    You can check cards directly in the Blackborder website by clicking the card price field.

  • Import/Export feature. To allow you to backup your lists and share it with others, a group of buttons have been inserted into the options menu. Note that generated files are named in some way like this "317417c0-dfa4-46bf-b449-5bfb1d6f4253". At the moment it seems that it's the only way to generate serverless downloads. Generated files are normal text files that can be opened with any text reader, so it's recommended to manually rename them (for example mywishlist.txt).

    Import/Export options

    The Export data button generates a file with your saved card data. This file is only as a backup or migration and shouldn't be opened or modified. This is the only file type to use in the import function.

    To Import data generated by the Export data button, you only need to click the "choose file" (see image) button and browse the file. A dialog window will ask you if you want to import the file. Cards will be merged with your already saved cards, so you wouldn't lose any data. If you don't want to merge cards, you can clear data before the import action. A confirmation popup will appear when the import is done. Think that if you import a big number of cards, loading time can be high.

    The Save data into file button generates a readable list of your cards with all the fields like shown below. It's useful to print your wishlist or share it with people that don't have MTG Wishlist. Remember to rename the file downloaded to fileName.txt .

    Name            Edition     Value Qty Rarity BBPrice (Stock) 
    ------------------------------------------------------------
    mox diamond     Stronghold   30    3   R      34.99(0)        
    mox jet         Alpha              1   R      1249.99(0)      
    scrubland       Unlimited          1   R      79.99(0)        
    mental misstep  New Phyrexia       3   U      5.49(57)        

    Export to MWS button generates a file that can be imported by Magic Workstation, rename it to fileName.mwDeck (replacing fileName) and use it.

    // Deck file for Magic Workstation (http://www.magicworkstation.com) generated by MTG Wishlist (http://goo.gl/EEbZh).
    // http://themunsonsapps.blogspot.com
    // 
    // rename this file to .mwDeck to use it with Magic Workstation
     3 [V10] mox diamond
     1 [A] mox jet
     1 [U] scrubland
     3 [NPH] mental misstep

  • Expansion set field has been added to allow you to select the differentiate card prices and make it exportable to MWS format.

    In the insert card form you will find right to the quantity field a list of all available editions full names sorted by edition date starting by the newest. At the end are included special sets like Chronicles, From the vaults or Duel decks. You can leave this field in blank choosing the first option, but it's discouraged.

    In the card list, the expansion set is displayed using the official set codes (check the full list of set codes here) in the same order of the full list mentioned before.

  • New view of MTG Wishlist
    Cards can be sorted by expansion (alphabetically) clicking on the set header.
  • The refresh button in the main page of the application at the moment only updates the Blackborder price of all stored cards. Since it depends on the connection  and number of cards stored, it's possible to see some delay, be patient.

  • Clear button has been moved from the application to the options menu.

  • Help messages have been included when mouse pass over some button or links.
That's all, I hope that this can be useful for you. Don't forget to leave your suggestions and the 5 stars in the Chrome Webstore if you like it!

Continue reading »

Thursday, May 5, 2011

Blogging tips: Including source code in your website

If you're a blogger that want to write source code, maybe you have some problems to include it into your blog due to the tags, escape chars, the highlighting and more problems.

Two common and great solutions are SyntaxHighlighter and Code Prettifier. Both give your source code the syntax highlighting (depending on the selected language), line numbers, a well done layout and a lot of colors.
The only "problem" that I can find with those utils is that both are javascript and css files that you must download and load in the body of your webpage and host in your server (although SyntaxHighligther offers a hosting service). The problem of adding external CSS files to your website is that if you don't have access to the server, such as in Blogger, you maybe will need to do some dirty workarounds like pasting the full CSS into the template (see how to include SyntaxHighlighter to Blogger).


  1.   // Source code SyntaxHighlighter like
  2. private static long convertMilliSecondsToDaysViaMoreExplanatoryMagicNumbers(final long numberMilliseconds)  
  3. {  
  4.    // 60 seconds in minute, 60 minutes in hour, 24 hours in day, and  
  5.    // one thousand milliseconds in a second  
  6.    return numberMilliseconds / (60 * 60 * 24 * 1000);  
  7. }  

This is wonderful if you write a lot of lines of code, but what if you need to write only a few number of code lines? What if you don't want an overloaded layout? Does it worth the effort to download the files, host them (there are several files) and copy the entire CSS into your blogger's layout?

HTML gives you the <pre/> and <code/> tags, but them really only escape and change the font. The solution that I've found in devcha is to change the <pre/> style to have a backgrounded piece of code. It doesn't have colored keywords, but it's more readable.

<pre style="background-color:#eeeeee; border-color:rgb(153, 153, 153); border-style:dashed; border-width:1px; margin:0px; overflow:auto; padding:5px; width:95%;">

YOUR CODE GOES HERE

</pre>

Of course, set the <pre/> attributes as you like. Remember, that if you're inserting this in Blogger, you should write it in the HTML edition mode.

Continue reading »