PtwiX: A Customizable Twitter Box for Self Hosted Websites | Orangeinks

PtwiX: A Customizable Twitter Box for Self Hosted Websites

ptwixPtwiX is a web component made from PHP/AJAX that allows you to display tweets on your website/webpages. The component will however require you to have a bit of knowledge and familiarization with PHP in order to install. If you are running a self hosted site all by yourself, then you probably are familiar with the codes and there should be no problem for you in installing PtwiX.

Requirements:

Ptwix, for working with full options, requires curl installed on your server and the curl module for PHP, working whith the PHP5 version or latest. If you have a domain in hosting probably the curl is already installed.

Installation is quite easy. Just download the component from the PtwiX website and extract it to a folder in your host. Just make sure that the cache folder has the writing permissions. This will enable PitwiX to write the xml file for cache requests. The next step is to do some configuration on the PtwiX_reader.php file. Just replace the necessary fields such as username, twitter password, url path and cache folder. (See example below).

$username=”yourtwitterusername”;

$password=”yourtwitterpassword”;

$url_path=”http://www.mysite.com/ptwix/”;

$cache_folder=”/var/www/examplesite/ptwix/cache/”;


Lastly, you need to call PtwiX on you webpage in order for it to appear. (Example Below)

<? include “core/PtwiX.php”;

$PtwiX=new PtwiX(‘second’,’user’,’pass’,’http://www.mysite.com/ptwix/’,’/var/www/ptwix/cache/’,PtwiX::$FRIENDS_TIMELINE,’silver-red’);

$PtwiX->setDimension(400,300);

?>

<html>

<head>

<?link href=”ptwix/themes/silver-blue/PtwiX.css” rel=”stylesheet” type=”text/css” />

</head>

<body>

<? $PtwiX->printBox(); ?>

</body>

</html>

Why is PtwiX worth the fuzz?

There are lots of widgets that you can use to display your Twitter updates on your website. Twitter even has its own widget that you can easily embed. The only problem is that when you embed a widget from a third party service and it goes down; your widget goes down with it and usually causes problems for your website. What makes PtwiX unique from the others aside from giving you the freedom to customize the CSS thus customizing the look and feel of your PtwiX box is that it allows you to display the tweets of your friends on your website. It also has a quick follow button that your users can use to follow on twitter directly on your website. There’s nothing special about this, for it only serves a link to your Twitter profile but it’s pretty handy and there’s no need for you to place a button on your website. Another feature that you’ll surely find useful is the update button. By simply pressing update on your PtwiX box, you and your users will immediately see the updates made on your Twitter page whether it is set to display your own tweets or your friends’. Normally you have to refresh the page to check for updates. This will eliminate the need to reload just to check out new tweets.

If you are looking for a free solution in displaying your tweets or your friend’s tweets on your website, better check out PtwiX and give it a shot.

PtwiX box demo

Tagged with: , , , , , ,
Posted in Blog Tips, Tips N Tricks
One comment on “PtwiX: A Customizable Twitter Box for Self Hosted Websites
  1. After reading this usefull article how to use twitter. I even see some sens in twittering. Thx a lot.

Leave a Reply