Daniel M. Hendricks

Plugin – Twig (Twitter Integrator)

Updated: 6/25/2009

Twig allows you to display your Tweets intermingled among your WordPress posts, sorted chronologically. Other plugins are available to display your tweets in a widget or separate list, however, this plugin displays your tweets on your front page as a part of your blog. It also caches your Twitter feed and updates at an interval specific my you.

Please note that this plugin is in the beta stage. If you encounter bugs, please feel free to let me know.

Download

This plugin is licensed under the GPL.  See below for details.

Installation

Installation requires 4 simple steps:

  1. Unzip the contents of the ZIP file and upload the ‘twig’ folder in your WordPress plugins folder.
  2. Enable Twig in your WordPress plugins page.
  3. Click the Settings link for Twig in the plugins page to configure Twig for the first time. At minimum, you’ll need to enter your Twitter username and password (don’t forget to click Save Changes!).
  4. Add the following like to “the loop” in your theme’s index.php file, near the top of the loop (ie, just under “while (have_posts())”):
    <?php if(is_home()) twig_display_tweets(); ?>

Configuration

To access the settings page, navigate to the WordPress Plugins page and click Settings next to the Twig (plugin must be activated for this to appear).

Configuration Fields

  • Twitter Username – The username (not e-mail) that is associated with your Twitter account.
  • Twitter Password – The password that is associated with your Twitter account.
  • Refresh Interval – The time between updating the cache from Twitter (do not set this number too low, else you risk being banned by Twitter). Recommended: 30 minutes.
  • Tweet limit between posts – If you tweet more oftan than you post to your blog, this option allows you to limit the number of tweets show between each post to avoid congestion.
  • Date Format – Pattern to format the Tweet date on your blog. For a reference, please see this page. Example: M j, Y @ h:i A
  • Only include Tweets that contain text – Will only display Tweets that contain a specific string, useful for “hashtags” or “bangtags”.
  • Hide @replies? – Would you like your @replies to other Twitter users displayed?
  • Prepend username to tweets? – Add your Twitter username to the beginning of Tweets?
  • Trim hyphens from tweet? – If you prepend your Tweets with a hyphen, this can optionally remove it (for example, if you tweet says, “- I’m taking a nap.” it would display as “I’m taking a nap.”)
  • Delete Template (optional) – The template for the Delete button/link, displayed to those with Administrator privileges to quickly delete a tweet from the cache.
  • Tweet Template – The template used to format and display each tweet.
  • Show/Hide Template (optional) – The template for the Delete button/link, displayed to those with Administrator privileges to quickly delete a tweet from the cache.
  • Clear Cache – Clear the most recent entries in the cache and refresh them from Twitter. This may be useful if you are experience data issues.

Bugs & Feature Requests

Since this plugin is still in the beta stage, please report any bugs or feature requests you may have below.  Please help me make this plugin better!

Also, if anyone has successfully used this plugin in a version of WordPress lower than 2.7, please let me know (as well as any caveats you encounter).

License

This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

22 Responses to “Plugin – Twig (Twitter Integrator)”

  1. Vish says:

    Mate! What a great plugin. I havn’t seen anything like it and I love it! Keep up the great work and I look forward to many great updates. Just one quick note for your users that caused me a little trouble at first – the twig folder that goes into the plugin folder must be named “twig” for it to work. Mine was called “twig-ingrator..etc etc” and it didn’t like it. Otherwise – Brilliant!

  2. Robert says:

    Hi,

    I really like your plugin. Installed it yesterday and configured it for my blog. Almost wanted to code something like this myself but then I found this.
    Keep up the good work !!!

  3. Gary says:

    when trying to activate plugin:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘{’ in /homepages/2/d253654631/htdocs/hashtagpics/wp-content/plugins/twig-the-twitter-integrator/twig.php on line 183

  4. Marcus says:

    I get an error: it can´t load twig/twig-settings.php after i click the save changes in settings page…

  5. This really is a great plugin. After a little customization, then it worked like a charm. Thankyou

  6. Hi again.

    I had to paste the like this:

    <div class="postmeta" id="post-”>

    to get it to work. Hope this can help anybody.

    I also had the bug, where the tweets not show up correctly on page 2>. Therefore I just made an upgrade to v. 0.17. But for some reason, it won’t show my newest tweets. How come?

    And why can I delete a tweet on twitter, and it wont be deleted in the twig-output. Is there a cache, that I have to delete?

    I downgraded again to v. 0.16.

    Btw. It’s not an angry comment. :D I think this is a great plugin.

  7. I installed this plugin, and when I try to go to the settings page to enter my info, I get this error:

    “You do not have sufficient permissions to access this page.”

    I tried uninstalling and reinstalling the plugin, still doesn’t work. I checked the folder permissions, and the folder has 755 and the files 644, just like other plugins.

  8. Scott W says:

    Same here. :(

  9. Max says:

    Hi!
    You know I’d just installed your plugin to my site works under WordPress 2.8.4 and it says when I click settings of plugin (http://magon.net.ru/wp-admin/o.....ttings.php) “You’ve no rights to access this page”. Why? I’m login as admin
    Please help.
    Regards,
    Max

  10. Magyar says:

    I’m having the same problem as above. I try to access the settings and get ‘You do not have sufficient permissions to access this page.” I checked the CHMOD and everything seems okay. Please help!

Post a Comment

Tip: Sign up for a free Gravatar to have a photo next to your comment! Your gravatar will follow you around when you post to blogs that support it, based on the e-mail address you use to post.