The blog of galaxyAbstractor
Twitter Tweet Ticker

You have a site and a twitter account, and want to show your tweets in a nice way? Here is a script that you can use for free.
Features
- Neat, using jQuery
- Caching. It will cache your tweets on the server, reducing loadtime
Download
Twitter Tweet Ticker (38.3 KiB, 1,117 hits)
If you like the script I kindly ask you to donate a small amount further down the page
How to use
There is a readme file in the archive.
Place this on the page where you want it to appear:
<div id="twitter"> <!-- replace with your own link --> <a href="http://twitter.com/tuthouse" target="_blank"><img src="images/twitter.png" border="0" /></a> <div id="twittertext"> </div> </div>
Replace the link with your own link.
Place this before the </body> tag
<script type="text/javascript">
var newnews = $("<ul>").attr("class", "newsticker");
<?php
// Open the file
$fh = fopen('twitter.txt', 'r') or die('Could not open file!');
// Read it
$data = fread($fh, filesize('twitter.txt'));
// Split it up into an array
$data = explode("|sep|", $data);
// Loop trought the array
for($i = 0; $i < count($data)-1;$i++){
// Replace URLs so they are clickable
$tweet = preg_replace("/(http:\\/(?:\\/[\\w\\.\\-]+)+)/", "<a href=\"$1\">$1</a>", $data[$i]);
?>
newnews.append('<li><?php echo $tweet ?></li>');
<?php
}
?>
newnews.appendTo("#twittertext").newsTicker();
</script>
Place this in your <head> section
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.newsticker.pack.js"></script>
Follow further instructions in the readme.txt file
Example
Example can be found here
Recent Comments