GithubHelp home page GithubHelp logo

necolas / custom-tweet-button-for-wordpress Goto Github PK

View Code? Open in Web Editor NEW
36.0 4.0 2.0 25 KB

A fully customisable HTML and CSS Tweet Button for Wordpress. Built using PHP; no JavaScript requirement. Uses the bit.ly and Twitter APIs.

Home Page: http://nicolasgallagher.com/custom-tweet-button-for-wordpress/

PHP 67.03% HTML 9.86% CSS 23.11%

custom-tweet-button-for-wordpress's Introduction

Custom tweet button for WordPress

unmaintained

Verified working with WordPress 3.0.1+.

Requirements

  • Bit.ly account and API key
  • WordPress 3.0.1+

For more info: http://nicolasgallagher.com/custom-tweet-button-for-wordpress

Installation

Step 1: Download the Custom Tweet Button for WordPress files from Github.

Step 2: Login to your bit.ly account and get your API key from the "settings" page. Replace the bit.ly username and API key placeholders in the tweet_button function with your own.

Step 3: Include the custom-tweet-button.php file in your theme's functions.php file.

Step 4: Add the custom Tweet Button CSS to your theme's style.css file and the include the tweet.png image in your theme's image folder. Customise the CSS as you desire and make sure the image is correctly referenced.

Step 5: Call the function tweet_button in your template files (e.g. single.php) at the position(s) in the HTML you'd like the Tweet Button to appear:

<?php
if (function_exists('tweet_button')) {
  tweet_button(get_permalink());
}
?>

Changelog

0.3 [2011/04/07]

  • Update sprite to use new Twitter bird
  • Count is now a link to a Twitter Search for the URL
  • Display counts between 1000 and 9999 with comma separating the thousands
  • Display counts 10000 and over in 10.0K format
  • More generic Twitter button title and text

0.2 [2010/10/24]

  • Periodic cache refresh.
  • Checks that the Twitter API count data is for the URL that was requested.
  • Control over when the count is displayed with the tweet button

0.1 [2010/09/18]

  • First version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.