jQuery, AJAX AND PHP for YouTube Style Rating/Voting System

Ajax, PHP Scripts, Techniques, Tutorials
Today we have made Youtube style rating framework which is likewise called thumbs up/down rating. It is 99% indistinguishable to unique youtube rating framework. I have tried my best to give you a jazzy and same youtube look rating framework. I have execute Ip address checks for the purpose that a solitary client can rate once. It looks extremely wonderful please attempt it and give your food backs. Database Structure CREATE TABLE IF NOT EXISTS `youtube_ip` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userip` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE IF NOT EXISTS `youtube_rating` ( `id` int(11) NOT NULL AUTO_INCREMENT, `liked` int(11) NOT NULL, `dislike` int(11) NOT NULL, PRIMARY KEY (`id`) ) INSERT INTO `youtube_rating` (`id`, `liked`, `dislike`) VALUES (1, 0, 0); Download Source Code
Read More

jQuery ,MYSQL and PHP to create : Facebook like photo gallery with comments

Databases, PHP, PHP Scripts, Tutorials
Have you considered own facebook-style photograph gallry framework with remarks? I suppose – yes. Today I made up my psyche to plan it for you. Fundamental thought – when we click at pictures – they popup (ajax) with greater picture at the left and remarks area at the right. All pictures are in the database (mysql). Furthermore, obviously, we will utilize Php to realize our effect. Additionally, our remark framework will anticipate tolerating more than 1 remark for every 10 mins (to dodge spam). Step 1. SQL For our gallery I prepared two SQL tables: first table keeps records of our images. It contains several fields: title, filename, description, time of adding and comments count. Another table keeps comments. So, execute next SQL instructions: 01 CREATE TABLE IF NOT EXISTS…
Read More

jQuery to create : Facebook Style Pagination

Ajax, PHP, PHP Scripts
As your site develops, it is no more drawn out down to earth to showcase all the information without a moment's delay on the same page. Also, the closure client will most likely be intrigued with just part of the substance. Likewise, stacking all the substance as soon as possible may build the server burden or basically a waste of transmission capacity. This is where pagination comes into play.first, I am not too beyond any doubt how you might as well call this thing that you are set to look into yet its objective is comparable to an ordinary pagination, That is, to presentation fractional substance and to spare data transfer capacity! This article is about how to make a comparable stuff to twitter and Facebook's route of showing information.…
Read More

PHP and jQuery to create : facebook post to wall system

Ajax, PHP, PHP Scripts, Tutorials
Assuming that you have not perused our past post on making a Facebook post to divider framework then you might as well read it first. In this article, we will demonstrate how I included code antiquated bind" for the purpose that when clicked, it will post the substance of the content range as divider post. HOW IT WORKS ? When you click on “share” button : The file insert.php is called via ajax to save message in database, if message is saved successfully , then add message to the unordered list like below: <ul id="posts"> <li>My wall post message </li> </ul> Jquery code below is used to add the message as list : $('ul#posts').prepend('My wall post message'); The textarea message is then cleared $('textarea#wall').val(''); If another message is shared on the…
Read More

PHP Cookies

PHP, PHP Scripts
Cookies are principally used to validate a clients session, they are modest parcels of information that are archived in the web browser that permit a site to match particular client qualified data to that in the database, therefore confirming the client. So what are the values? setcookie($name, $value, $expire, $path, $domain, $secure); $name – is what you want to call the cookie, we will use this to reference the cookie later $value – value of the cookie. For example "yourname". $expire – is the time in UNIX timestamp format when the cookie will expire for example, time()+”3600″. The cookie would then expire after an hour. $path – The path on the server where the cookie will be available. For example, if the path is set to “/”, the cookie will…
Read More

Using PHP and CSS to make a simple graph

PHP Scripts
Here's a simple route to showcase a straightforward rate chart utilizing Php to function out the rates and do the maths and Css to showcase the information on our page. To start with you have to duplicate the Css beneath into the head of your page, you can style this to suit your requirements once we have the Php set up to render our diagram. .clear{ clear:both;} .graphcont { padding-top:10px; color:#000; font-weight:700; float:left } .graph { float:left; margin-top:10px; background-color:#cecece; position:relative; width:280px; padding:0 } .graph .bar { display:block; position:relative; background-image:url(images/bargraph.gif); background-position:right center; background-repeat:repeat-x; border-right:#538e02 1px solid; text-align:center; color:#fff; height:25px; font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:1.9em } .graph .bar span { position:absolute; left:1em } Download
Read More

Php customary representation Twitter connections

PHP, PHP Scripts
Here's a snappy bit of code to highlight answers to clients in twitter for instance @vivacityIT this script utilization general outflow to find and trade a dependent upon two items. Firstly it checks for a space preceding the @ image and after that checks for the space at the close of the clients name, it then takes that string and swaps it with a connection to the client twitter profile. Convenient in the event that you have a dynamic record of tweets that you need to linkify. All you have to do is change $ret to the variable the holds your string. $ret = preg_replace("#(^|[n ])@([^ "tnr<]*)#ise", "'\1<a href="http://www.twitter.com/\2" >@\2</a>'", $ret); These two lines of code make a comparable showing with respects the structure anyway they search for the http://…
Read More

Drag & Drop functionality with Php & jquery

Ajax, PHP Scripts
The capacity to move and customize content on a page and have it safeguard the request can make for an extraordinary client interface and is really generally simple to execute with a couple of lines of jquery. You'll have to incorporate the jquery client interface library which you can find here: Jquery Google Api. All the records would have done well to get this up and running are in the download at the lowest part of this post. In this exercise we're set to be taking a gander at 2 fundamental Php pages. the index.php page which holds the substance and purpose to perform the customizable and the updatelist.php record which is a modest bit of code to upgrade the listorder section in the database utilizing Php and Mysql. Furthermore…
Read More

jQuery and PHP inline editing

Ajax, PHP Scripts, Tutorials
Inline altering as its known, or having the capacity to alter substance straightforwardly on a page is an incredible instrument have added to your repertoire. I'm set to run through precisely how it fills in and also how to Post the redesigned content through to a Php script for server side handling to put in the database. The Code It looks a little complex so i'm set to rapidly run through precisely what's going on. At the time you visit the demo page are given a piece of content. Assuming that you float your rodent over the content you'll see a little alter symbol comparative to when you need to alter substance on Facebook. Provided that the client clicks on the square of code the content is reinstated with a…
Read More

Easy PHP Pagination

PHP, PHP Scripts, Tutorials
We had a couple of pagination scripts through the years yet I supposed i'd impart the particular case that i'm presently utilizing as its an of service script to have in your tool stash. As a designer you'll soon discover a requirement to paginate information when showing substance from the database, and instead of utilization Javascript which could require all the information to be stacked into the page on burden, we can utilize Php to guarantee that we're just asking for the information that we need from the database. For those who have no idea what i'm discussing. Pagination is a path of part up information into reasonable pieces to presentation to a client, assuming that you've used more than two minutes on the web chances are you've come into…
Read More