Hi Guys, Today I am going to share my facebook timeline wall script version 2.0 with more interesting features. I have added live commenting system with smileys option. I had received lots of request from my visitors to update the existing facebook wallscript version 1. So today I am very glad to share this wonderful code to all.

Facebook Timeline Wall Script Version 3.0 – Updated Click here

I had published facebook style dynamic  timeline wall script version 1.0 previously – check it out

Facebook Dynamic Timeline Wall Script Version 2.0

Facebook Dynamic Timeline Wall Script Version 2.0

Features

1. Upload pictures
2. Share updates
3. Share youtube videos
4. Delete post
5. Facebook timeline design
6. Live commenting system
7. Smiley support
8. Delete comment
9. Infinite scroll – Auto load more

Database Design for Facebook Timeline Wall Script Version 2.0

Database design for Facebook wall script version 2.0. Contains two tables – Posts & Comments

facebook wallscript version 2 - DB Structure

Facebook Wallscript Version 2 – DB Structure

Facebook Timeline Wall Script – Version 2.0 contains 4 folders

  • assets
    • Stylesheets
    • Javascripts
    • Images
    • Smileys – contains smiley icons
  • Includes
    • config.php
    • security.php
    • SimpleImage.php – used to upload images
    • Smileys – Used to parse smileys
  • Uploads – all pictures are uploaded to this folder

All you have to do is simply download and upload the sql file. finally some minor changes to be done in config.php

Config.php

define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'fb_wall');
define('ImageUploadPath', 'uploads/');
$post_limit = 10; // set number of records to load by default
$connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die(mysql_error());
$database = mysql_select_db(DB_DATABASE) or die(mysql_error());
mysql_query ("set character_set_results='utf8'");
$base_url='http://localhost/facebook-timeline-part-2/'; // with trailing slash
$base_folder = "facebook-timeline-part-2/"; //leave empty if you using root folder
$smiley_folder = $base_url.'assets/smileys/'; // your smiley icons folder

Smileys.php

Here is the code to parse smiley inside the content.

function get_smiley_array()
{
$smileys = array(

//	smiley			image name						width	height	alt
	':)'			=>	array('grin.gif',			'19',	'19',	'grin'),
	':-)'			=>	array('grin.gif',			'19',	'19',	'laugh'),
	':lol:'			=>	array('lol.gif',			'19',	'19',	'LOL'),
	':cheese:'		=>	array('cheese.gif',			'19',	'19',	'cheese'),
	':)'			=>	array('smile.gif',			'19',	'19',	'smile'),
	';-)'			=>	array('wink.gif',			'19',	'19',	'wink'),
	';)'			=>	array('wink.gif',			'19',	'19',	'wink'),
	':smirk:'		=>	array('smirk.gif',			'19',	'19',	'smirk'),
	':roll:'		=>	array('rolleyes.gif',		'19',	'19',	'rolleyes'),
	':-S'			=>	array('confused.gif',		'19',	'19',	'confused'),
	':wow:'			=>	array('surprise.gif',		'19',	'19',	'surprised'),
	':bug:'			=>	array('bigsurprise.gif',	'19',	'19',	'big surprise'),
	':-P'			=>	array('tongue_laugh.gif',	'19',	'19',	'tongue laugh'),
	'%-P'			=>	array('tongue_rolleye.gif',	'19',	'19',	'tongue rolleye'),
	';-P'			=>	array('tongue_wink.gif',	'19',	'19',	'tongue wink'),
	':P'			=>	array('rasberry.gif',		'19',	'19',	'rasberry'),
	':blank:'		=>	array('blank.gif',			'19',	'19',	'blank stare'),
	':long:'		=>	array('longface.gif',		'19',	'19',	'long face'),
	':ohh:'			=>	array('ohh.gif',			'19',	'19',	'ohh'),
	':grrr:'		=>	array('grrr.gif',			'19',	'19',	'grrr'),
	':gulp:'		=>	array('gulp.gif',			'19',	'19',	'gulp'),
	'8-/'			=>	array('ohoh.gif',			'19',	'19',	'oh oh'),
	':down:'		=>	array('downer.gif',			'19',	'19',	'downer'),
	':red:'			=>	array('embarrassed.gif',	'19',	'19',	'red face'),
	':sick:'		=>	array('sick.gif',			'19',	'19',	'sick'),
	':shut:'		=>	array('shuteye.gif',		'19',	'19',	'shut eye'),
	':-/'			=>	array('hmm.gif',			'19',	'19',	'hmmm'),
	'>:('			=>	array('mad.gif',			'19',	'19',	'mad'),
	':mad:'			=>	array('mad.gif',			'19',	'19',	'mad'),
	'>:-('			=>	array('angry.gif',			'19',	'19',	'angry'),
	':angry:'		=>	array('angry.gif',			'19',	'19',	'angry'),
	':zip:'			=>	array('zip.gif',			'19',	'19',	'zipper'),
	':kiss:'		=>	array('kiss.gif',			'19',	'19',	'kiss'),
	':ahhh:'		=>	array('shock.gif',			'19',	'19',	'shock'),
	':coolsmile:'	=>	array('shade_smile.gif',	'19',	'19',	'cool smile'),
	':coolsmirk:'	=>	array('shade_smirk.gif',	'19',	'19',	'cool smirk'),
	':coolgrin:'	=>	array('shade_grin.gif',		'19',	'19',	'cool grin'),
	':coolhmm:'		=>	array('shade_hmm.gif',		'19',	'19',	'cool hmm'),
	':coolmad:'		=>	array('shade_mad.gif',		'19',	'19',	'cool mad'),
	':coolcheese:'	=>	array('shade_cheese.gif',	'19',	'19',	'cool cheese'),
	':vampire:'		=>	array('vampire.gif',		'19',	'19',	'vampire'),
	':snake:'		=>	array('snake.gif',			'19',	'19',	'snake'),
	':exclaim:'		=>	array('exclaim.gif',		'19',	'19',	'excaim'),
	':question:'	=>	array('question.gif',		'19',	'19',	'question') // no comma after last item

		);
	return $smileys;
}
	function parse_smileys($str = '', $image_url = '', $smileys = NULL)
	{
		if ($image_url == '')
		{
			return $str;
		}

		if ( ! is_array($smileys))
		{
			if (FALSE === ($smileys = get_smiley_array()))
			{
				return $str;
			}
		}

		// Add a trailing slash to the file path if needed
		$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);

		foreach ($smileys as $key => $val)
		{
			$str = str_replace($key, "<img style="0border: 0;" alt="\&quot;&quot;.$smileys[$key][3].&quot;\&quot;" src="\&quot;&quot;.$image_url.$smileys[$key][0].&quot;\&quot;" width="\&quot;&quot;.$smileys[$key][1].&quot;\&quot;" height="\&quot;&quot;.$smileys[$key][2].&quot;\&quot;" />", $str);
		}

		return $str;
}
//usage
echo parse_smileys($message, $smiley_folder);

Please don’t forget to share and subscribe to latest updates of the blog. Also any comments and feedback are all welcome!

Thanks!
View Live Demo & Download

Download Script will be available for subscribed members only. If you want this script, please subscribe to my blog and tell me the reason via comment that why do you love this facebook wall script version 2.0.

Facebook Timeline Wall Script Version 3.0 – User Login, User Registration, Facebook style Like System, Add Friend & many more features….
Subscribe to my blog & get more updates on Facebook timeline wall script 🙂
If you enjoyed this article, Get email updates (It’s Free)
http://w3lessons.info/wp-content/uploads/2012/12/facebook-wall-script.pnghttp://w3lessons.info/wp-content/uploads/2012/12/facebook-wall-script-150x150.pngKarthikeyan KfacebookjqueryPHPfacebook,facebook wall script,Jquery,timeline
Hi Guys, Today I am going to share my facebook timeline wall script version 2.0 with more interesting features. I have added live commenting system with smileys option. I had received lots of request from my visitors to update the existing facebook wallscript version 1. So today I am...