HL Twitter lets you display your tweets as a widget in your sidebar or even browse your entire Twitter history right on your blog. But it also does a whole lot more. You can track multiple Twitter accounts and store all of the tweets on your blog indefinitely (currently Twitter only keep your 3,200 most recent tweets) as well as pulling in any tweets that you reply to for future reference. You can then tweet from your Dashboard or have HL Twitter automatically tweet your new posts with a customisable message.
Twitter 1.1 Compatible
- Upload hl_twitter directory to your /wp-content/plugins directory
- Activate plugin in WordPress admin
- In WordPress admin, go to Twitter. You will be asked to link the plugin to your Twitter account.
- Add the user(s) you wish to store tweets for. You can also import their most recent tweets.
- To tweet from within WordPress visit the WordPress Admin Dashboard or look at the bottom of a Post page
To modify the widget theme:
- Copy the hl_twitter_widget.php file from /wp-content/plugins/hl-twitter to /wp-content/themes/your-current-theme/
- Edit the new hl_twitter_widget.php file in your theme directory
- You can now update the plugin as normal and your changes will not be overwritten
To modify the archive theme:
- Copy the hl_twitter_archive.php file from /wp-content/plugins/hl-twitter to /wp-content/themes/your-current-theme/
- Edit the new hl_twitter_archive.php file in your theme directory
- You can now update the plugin as normal and your changes will not be overwritten
To modify the shortcode theme:
- In your current theme directory (e.g. /wp-content/themes/twentyten/) make a file called functions.php if it does not already exist.
- In functions.php create a function called hl_twitter_shortcode()
- This function will be passed two variables: $tweets and $num_tweets
- Generate the necessary HTML and return it, DO NOT ECHO.
- How do I display a tweet in my post with Shortcodes?
HL Twitter supports supports displaying tweets within a post or page using Shortcodes. To do so, use the following tag:
By default, this will show the most recent tweet as found by HL Twitter. To change this you can use the following options:
- num: the number of tweets to display (optional, default 1)
- tweet: the ID of a specific tweet e.g. for http://twitter.com/Username/status/123456 use 123456 (optional)
- user: the Twitter ID of a specific user, this can be found in the URL on the edit user page in HL Twitter (optional, not needed if using tweet_id)
- search: will show all tweets that match the specified search term (optional)
- year: show only tweets made in this year e.g. 2011
- month: show only tweets made in this month e.g. 3
- day: show only tweets made on this day e.g. 27
- [hl-twitter search=“football“ num=5] Show the first 5 tweets mentioning football
- [hl-twitter user=12345 year=2011 month=3] Show a single tweet from this user in March 2011
- How do I change the Widget/Archive Page/Shortcode?
Please look look at the Installation tab which shows how to override the default styling in HL Twitter without losing your changes on each update.
- The link to Twitter button is stuck on loading / never loads?
You must make sure that your server supports cURL, and more explicitly multi_curl, in PHP. Due to the unique nature of each server I can’t give more specific advice, so Google is your best bet to get more information.
- Why can I only import 3,200 tweets?
Twitter currently limit access to only the 3,200 most recent tweets for an account. If they increase this limit, HL Twitter will also increase.
- Why aren’t all my tweets being pulled in?
Twitter limits applications to a set number of requests per hour. If you are tracking a lot of people you may hit this limit before HL Twitter has finished importing all new tweets.
- How do I enable auto-tweeting?
Auto-tweeting, having HL Twitter tweet a new message whenever you publish a post or page, is disabled by default. To enable it go to HL Twitter -> Settings in your WordPress admin. You can also change the default text that is shown in the tweet. When publishing a new post or page, you will not be able to choose whether or not to tweet for this post.
- The Tweet Archive page doesn’t load
WordPress sometimes fails to load the link to the Twitter archive page, most commonly after installing or updating. To fix it, go to HL Twitter -> Settings and change the Archive Pages slug to something different e.g. my-tweets, then press Save. Finally go to Settings -> Permalinks and click Save there. This will force WordPress to check for new links, including HL Twitter.
- New tweets are not automatically imported after the initial import
HL Twitter uses the internal Events system to periodically check for new tweets, unfortunately this does not work on some blogs. A manual solution is to set up a cron job (or equivalent) on your server. Please note that modifications made to hl_twitter.php may be overwritten by future plugin updates.
- Open /wp-content/plugins/hl-twitter/hl_twitter.php
- Find the line define(‚HL_TWITTER_CRON_KEY‘, “);
- Change to define(‚HL_TWITTER_CRON_KEY‘, ‚my-secret-key‘); changing my-secret-key to be a phrase only you know
- Open http://yourwebsite.com/?hl_twitter_cron=my-secret-key in your browser. This will trigger an automatic update. If the page says that tweets were imported, continue, otherwise get in touch with the plugin author via the contact form. (Do not worry if a line says errors were encountered, as long as tweets were saved to the database).
- Add a cron job to your server to load this URL however often you require.
- Some of my tweets have the wrong links!
For example: http://twitter.com/Username/status/123456789 displays as http://twitter.com/Username/status/123456000.
This was an issue caused by certain versions of PHP truncating the IDs when it loaded them from Twitter. This was fixed in Version 2011.3.11, apologies to anyone who was affected by this issue.
HL Twitter je otevřený software. Následující lidé přispěli k vývoji tohoto pluginu.Spolupracovníci
Přeložte “HL Twitter” do svého jazyka.
Zajímá vás vývoj?
Prohledejte kód, podívejte se do SVN repozitáře, nebo se přihlaste k odběru protokolu vývoje pomocí RSS.
- New logo for WordPress 3.8 users
- Added initial support translations! Please contact me via @Dachande663 if you wish to submit a translation
- Added suppot for the latest Twitter API changes
- Updated to Twitter 1.1 API
- Fixed notice caused by importing no tweets
- Fixed issue when creating fulltext indexes in non-MyISAM tables
- Fixed general API handling to prevent errors from appearing
- Removed caching of images locally
- Updated to support WordPress 3.2
- Removed all dependancies on the source website
- Updated the Twitter library so HL Twitter should work on more blogs now
- Changed the menu and widget names to HL Twitter to reduce confusion
- Tweets archive page now shows the tweets that were replied to (where saved)
- Added a donations button, thank you to everyone who has donated so far!
- Added support for using Widgets without dynamic sidebars
- Added support for shortcodes
- Fixed more Twitter ID issues, thanks for all the reports.
- Added a brand new archive page system which lets you browse all the tweets stored by HL Twitter on your blog.
- General code maintenance
- FIXED: A critical bug caused by some versions of PHP json_encode where IDs were truncated e.g. 123456789 became 123456000. Very sorry to anyone who was affected by this.
- Fixed deleting tweets
- Auto-tweet now checks to make sure tweet isn’t empty
- Added multi_curl support info
- Initial development
- Importer now loads all tweets for user
- Importer now pulls multiple twitter accounts
- Switch to OAuth
- Import now works asynchronously across users
- Major bug fixes, admin design tweaks
- First public release
- Added widget + controls
- Added WordPress event scheduling handlers
- Added auto-tweet ability
- Added Feedback panel
- Avatars are now resized and cached locally (thanks to Scotts for the heads up)
- Emergency fix; a regression bug was present in 2010.9.13 that affected all plugin users.
- Updated the auto-tweet feature to support more fields and improve performance
- Widget now has more options including setting a title and hiding avatars
- Added support for WordPress 2.9.2