Tag: open source

A tiny, open source Flickr Portfolio application

I have created a Flickr Portfolio application which can be linked to your Flickr account, display all your latest Flickr photos and incorporate Facebook like and comments with it.

This application is small, simple and code is well formatted so that you can edit it. All the instructions are provided in the readme.txt file and you can edit the settings in config.php file and instantly get a portfolio live 🙂

homepage screenshot
Flickr Portfolio Application - Homepage

Inner page screenshot
Flickr Potfolio Application - Inner Page

To download the source code, please go to http://photography.ofhas.in and find the download link in the footer.

This application is completely free, open source and you don’t even have to give any attribution to me at all 🙂

Download: http://photography.ofhas.in and find the download link in the footer

Enjoy!

Installing Storytlr in your own domain

When lifestreaming services come under the spotlight, Storytlr is definitely a promising one. They started their journey not more than a year ago, was loved by many other people out there, and decided to shutdown! Ok, that makes sense when the economy was so scary lately, but the good thing is that – they didn’t just announced “We are shutdown, and we don’t care what the fuck had you built with us”. Those brilliant people behind Storytlr did something very much appreciable, they made their brain child open source. I really loved that. The source code is available to download from their google code project page.

Other than Storytlr, there is another open source life streaming service available at this moment which is “pubwich” and is available to download from http://pubwich.org

My post is about how you can grab the source code of Storytlr and set it up in your own webserver. I’ve seen many people were asking on the mailing list an their news blog about how to install this one successfully. So I decided to give it a shot and install it. Follow these steps and you are good to go 🙂

#1 Add a wildcard A record pointing to your server’s IP
#2 If you are hosted in VPS, and you have multiple domains hosted, you may want to create a Virtual Host with the following entries. I just assumed that your document root for Storytlr will be at “/var/www/storytlr”
[sourcecode lang=”php”]
<VirtualHost *:80>
ServerName domain.tld
ServerAlias domain.tld
ServerAdmin [email protected]
DocumentRoot /var/www/storytlr
<Directory /var/www/storytlr>
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
[/sourcecode]

Dont forget to restart/reload your web server after this.

#3 change your current workign directory to /var/www/storytlr and download the latest available storytlr from google code, and then extract it 🙂
[sourcecode lang=”bash”]
wget http://storytlr.googlecode.com/files/storytlr-0.9.2.tgz
tar -zxvf storytlr-0.9.2.tgz
[/sourcecode]

Now you will see some directories in the same path.

#4 Create a mysql database named “storytlr” (You can name it whatever, just dont forget to change the DB settings accordingly in the config. I will be discussing this later) – also create a user for this db and grant it all permission for this db.
[sourcecode lang=”sql”]
mysql> create database storytlr;
mysql> grant all on storytlr.* to ‘storytlr’@’localhost’ identified by ‘password’;
mysql> flush privileges;
[/sourcecode]

#5 Now you need to import storytlr’s schema into it. change your working directory to /var/www/storytlr/protected/install and import the database.sql into the recently created “storytlr” db
[sourcecode lang=”bash”]
mysql -u storytlr -p storytlr < database.sql
[/sourcecode]

#6 You need to install a PECL extension “tidy” to make Storytlr work properly. So if you dont have that installed on your server, you can do this using the following command
[sourcecode lang=”bash”]
apt-get install php5-tidy
or
pecl install tidy
[/sourcecode]

if you install it via “pecl” then dont forget to add this line “extension=tidy.so” in your php.ini. Also in this case, make sure that put tidy.so inside the directory which is mentioned in the php.ini as “extension_dir”

restart your webserver
[sourcecode lang=”bash”]
/etc/init.d/apache2 restart
[/sourcecode]

#7 Now you need to add write permission to some directories that storytlr needs. Change your workign directory to /var/www/storytlr/protected and apply the following commands
[sourcecode lang=”bash”]
chmod 0755 logs
chmod 0755 feeds
chmod 0755 temp
chmod 0755 upload
[/sourcecode]

#8 We are almost done. Now change your working directory to /var/www/storytlr/protected/config and copy the config.ini.sample as config.ini. Edit this config.ini – you need to make various changes here.

#line number 1: if you have PDO and PDO_MYSQL installed in your machine, leave it as is – or else change it to “MYSQL” instead of “PDO_MYSQL”

Change DB settings. Add appropritae uername, db name and password there

Change line number 14, 15, 16 and remove the comments (the semicolon 😉 from in front of them. Its better to add caching.

Change line number 19 and add your host name. You may also change the timezone to your working one.

Change line # 25, set app.closed = 0. You want to enable registration for your visitors, right?

Comment out line number 28 (app.user = admin) and add a semicolon in front of it 🙂

Change line #39 (flickr.api_key=) – add your Flickr API key there. This is optional 🙂

You may also change line number 57 and add a google map api key for your domain. This is also optional 😉

#9 Last step, create /tmp/cache directory and add write permission to it 🙂

Done and Enjoy!

Building services like FriendFeed using PHP – Part2

Following the first installment in this series, here is the second part. In this part I will focus mainly on Bookmarking and News services supported by FriendFeed . Here we go

Supported bookmarking services by FriendFeed
1. Del.icio.us
2. Furl
3. Google shared stuffs
4. Mag.nolia
5. Stumbleupon

Except google shared stufss, all of the rests require just an username to generate the access point for retrieving user’s bookmarked items. And for the google shared stuffs, it requires the fully functional url of the feed available from your google bookmark service.

Access points

Del.icio.us

AP: http://feeds.delicious.com/rss/<user name>
example: http://feeds.delicious.com/rss/anduh


Furl

AP: http://rss.furl.net/member/<user name>.rss;
example: http://rss.furl.net/member/pigge.rss


Google Shared Stuffs
you can find your google shared stuff url from http://www.google.com/s2/sharing/stuff

example: http://www.google.com/s2/sharing/stuff?user=110703083499686157981&output=rss


Ma.gnolia

AP: http://ma.gnolia.com/rss/lite/people/<user name>.rss;
example: http://ma.gnolia.com/rss/lite/people/gerryquach


Stumbleupon
Whoops, Double Whoops, Tripple Whoops. It took quite a time for me to find the feed url. I dont know why it is kept so “SECRET” – LOL

AP: http://www.stumbleupon.com/syndicate.php?stumbler=<user name>.rss;
example: http://www.stumbleupon.com/syndicate.php?stumbler=jd001


Supported news services by FriendFeed
1. Digg
2. Google Reader
3. Mixx
4. Reddit

Here are the access points


Digg

AP: http://digg.com/users/<user name>/history.rss;
example: http://digg.com/users/msaleem/history.rss


Google Reader

You can find your shared item’s feed url here http://www.google.com/reader/view/user/-/state/com.google/broadcast


Mixx

Unfortunately during the time of writing this article, Mixx was napping – here is the screenshot. Once they are awake, I will update this section 🙂


Reddit

AP: http://www.reddit.com/user/<user name>/.rss;
example: http://www.reddit.com/user/jack_alexander/.rss

In next installation I will focus on scaling such a huge load successfully. Hope that will be interesting to many of you. Following installation will focus again on the access points.