How to create LINKS to other websites in my blogs?

What is the best way to create an API of buttons (simple links) to be used on other websites?

  • The buttons will be created using an interactive JavaScript-based "button builder". These buttons are simply links to certain custom URLs. I need the buttons to have fixed design, a fixed link, a fixed image within the button and fixed text within the button as well. I am specifically asking to see what is the best way to keep the design intact? Should I inherit a CSS file or should it be in-lined? I want the button code to be as simple as possible (possibly only in HTML tag or a JavaScript tag - whichever is better). I want my users to be able to use this button on their own websites and blogs etc. I just want it to be a simple copy paste of a short code. Any suggestions are welcome. I want it to be extremely simple on the user end and possibly fast in terms of loading.

  • Answer:

    Facebook use iframe for its Like button they save button configurations as parameters in url to generate the button. They also use in-lined CSS for button width... <iframe src="http//www.facebook.com/plugins/like.php?href=URL&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=80&amp;appId=506192749407991" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe> You may use https://github.com/premasagar/cleanslate it's like reset.css, but works on a container.

Aniss Bouraba at Quora Visit the source

Was this solution helpful to you?

Other answers

This solution is certainly not your simple answer, but the approach could be pretty useful if it was modernized. This was a 'Share This' type of button API internally referred to as "Yahoo! This".  The page of docs is gone now, but it has been archived here: http://web.archive.org/web/20090306051048/http://publisher.yahoo.com/social_media_tools/ here is the JS: http://web.archive.org/web/20061205200715js_/http://sm.feeds.yahoo.com/Buttons/V2.0/yactions.js and http://web.archive.org/web/20110210053643/http://sm.feeds.yahoo.com/Buttons/V2.0/yactions_core1.3.3.js By adding the JS to your page you could then display any number of button types inline on the page with different but joined up designs and styles.  It included buttons for emailing, bookmarking, rating, Adding to Calendar, and even Recording to TiVo.

Matt McAlister

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.