radiations3 Posted August 6, 2011 Share Posted August 6, 2011 I just want to know for any post if we want to add a comment like facebook what is a good approach of coding for that Is it good through php get id of the post and comment accordingly or any other language should good for this...?? And kindly also tell me which language is used by facebook for commenting is it ajax or what?? Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/ Share on other sites More sharing options...
trq Posted August 6, 2011 Share Posted August 6, 2011 You could write code in any server-side language to do this. Facebook uses PHP for allot of it's stuff, I wouldn't know what there comment engine is written in but I think allot of there real time stuff is node.js these days. Ajax is NOT a language. Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253057 Share on other sites More sharing options...
radiations3 Posted August 6, 2011 Author Share Posted August 6, 2011 Someone told me that if you would like to do certain things on run time then you have to use AJAX Actually i dont have any idea about AJAX why is it used and the like... So do you suggest me to use php for creating the commenting functionality?? (easy and good approach)??? There's just one problem if i'll work on php my commenting system will not allow a user to comment on the same page for commenting a new page gets loaded (comment.php) which i think is a bad appraoch. Any suggestions how to perform the functionality on the same page (like on "yoursite.com/profile.php?radiations") Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253058 Share on other sites More sharing options...
phpSensei Posted August 6, 2011 Share Posted August 6, 2011 Radiation, Ajax retrieves information from the server asynchronously with an XMLHTTPREQUEST OBJECT, meaning in the background, now you can pretty much do anything with this, it sends a request to the PHP, same way you do POST AND GET methods from a form.... request.open('GET','page.php?id=12',true) the data returned can be handled using Ajax's XML functions Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253063 Share on other sites More sharing options...
radiations3 Posted August 6, 2011 Author Share Posted August 6, 2011 Can you provide me any working code/sample so that i'll try to use the method u've mentioned?? Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253064 Share on other sites More sharing options...
phpSensei Posted August 6, 2011 Share Posted August 6, 2011 Have you tried GOOGLE? Its SOOOO EASY when you just put some effort into research. Ajax Chat Tutorial, that should be a good one. http://www.dynamicajax.com/pg/193-.html That was my first Ajax tutorial, never looked at another tutorial again Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253066 Share on other sites More sharing options...
radiations3 Posted August 6, 2011 Author Share Posted August 6, 2011 GOT IT THANX!! I'll try if i'll face any difficulty then i'll keep you in loop Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253068 Share on other sites More sharing options...
phpSensei Posted August 6, 2011 Share Posted August 6, 2011 Np, Mark topic solved. edit: nvm you did Quote Link to comment https://forums.phpfreaks.com/topic/244003-what-is-a-good-approach-for-commenting/#findComment-1253069 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.