In an effort to give a website im working on more functionality, im wanting the ability for readers to post comments/thoughts to the stories they read.
any ideas the best way to go about this?
ive tried Google but the minute i add the word "comments " + html or php etc (assuming i can do it in these languages) then google just gives me methods to commenting on code....
Any ideas, tips, tutorials etc ill gladly jump on.
Thanks in advance
-somdow
Well the most popular embeddable comment system is probably Disqus. Besides that you will have to look if there are plugins for your framework of choice - or just roll your own (a comment system is basically just like any other database backed PHP application - and there are many ways to implement these).
Why not just look at how popular content management systems have implemented comments? (For instance, take a look at how Drupal and Wordpress do it.) The manner in which you build a comment system will depend on your needs and the limitations imposed by the structure of the system you're trying to integrate it with.
You should work out your database schema first. I'm assuming you're writing all of this from from scratch. You haven't given a lot of details.
It will be easier if you put your comments in a separate table. Make sure you have some basic protections against bots(captcha, etc.)
Sort the results by the timestamp.
comments_table
Id
UserId
UserDisplayName
ArticleId
Comment
PostTime
Disqus is nice, I must say. If you want code that you want to copy/paste, Google Friend Connect is a different route you can take... Almost everyone has a google account and it only takes a few minutes to set up. They also have some sweet other widgets you might want to try out like rating, etc.
http://google.com/friendconnect
If you really want to customize it just how you want it, I would create your own commenting system with a MYSQL database to store all your data. You could even use some nice jQuery animations when they write / delete a comment. (I just did something simular to that and it's really nice).
Whatever works best for you -- roll with it!
Good luck,
Coulton
Related
I'm primarily using Drupal and am considering moving away from CMS. If I were to build my own platform could I integrate modules like commenting systems, user login, etc. through a PHP/Python API? What would be the proper steps/good places to look/good tutorial on this? Would I have to build all of my own tables manually to suit the needs of such custom modules? I'm wondering if this would even be possible with out having to hard code all of this by hand? Thank you.
You can drop the Disqus commenting system into any site. Same with Facebook Comments.
First of all if you are considering moving away from CMS than you should consider using some sort of framework but with time you will come to idea that you need your own shit in order to be satisfied.
Second, subject you are trying to decipher is a little bit more complex than just writing it down here.
I would suggest you to first think what do you need. What is your main goal with it or what are you trying to accomplish? For example in meaning of commenting, if you want the truth nor PHP nor Python are masterpieces. Why not to consider Node.JS for that?
I mean, web is becoming real-time more and more. Now days we have scripts or to be more precise, pieces of art such as Socket.IO who can with help of Node.JS handle large amount of traffic without any problem. Something nor Python nor PHP can do.
Some stuff you will need to code by yourself but most of the time you just need to code "architecture link" between one versus many features. Eg. take some code and adjust it to be able use it from your own framework or whatever.
As far I see it. I like to do all crucial parts by myself but for example there is Zend Framework and you can use ACL + Auth library and start from there.
Hope this makes some sense. Cheers!
Comment systems
Services
Disqus
Intense Debate
JS-Kit Echo
Chirrup
InstaComment
Have a look at the comparison.
Self-Hosted
Commentator
I'm looking for a php/mysql-based rating and comment system that has a one time license fee per site. Can someone recommend something?
I could build my own -- I already started but then I was thinking there must be something out there already.
It would be nice if it included the ability to poll people too.
Thanks
I've been seeing a lot of sites using Disqus. You might give that a look.
It's not really clear what you need exactly, but facebook is offering comments for your site as well.
you could build your own threaded comment system with this class here:
http://www.jongales.com/blog/2009/01/27/php-class-for-threaded-comments/
You would just have to design your table structure, its not really that hard, as for polling would be something else, i dont think you'll find an integrated soultion since, they are two different beasts.
I am trying to create a website that will allow me to list all of the different types of beers I have tried including name, type, location, and brief tasting notes. I have a basic login created and believe that I will have to store the information about the beer in a database as well (with a cell for each of the elements). I was wondering a) if this is how people would suggest going about doing this and b) if anyone knows of good tutorials on how to set this up. I plan on using mySQL and PHP for the database and jQuery for the visual side of things. I am relatively new at this, so I am having trouble figuring out what exactly to Google to find what I am looking for.
I plan on going about it similar to a to-do list (only each element would have multiple attributes — name, type, etc.). Any help/suggestions/direction would be awesome! Thanks!
First off you need to decide on the features you want to implement, and then work out which to do first.
For example,
you need a database, which has a table for your beer info. (but do you need another one for people to have a user account too?)
you need to create a set of functions that you can access from the web site.
list beers
add beer
etc.
How do you want the front end to work?
How do you want the front end to look?
Once you know exactly what you want to do, it's much easier to break down the tasks into jobs you need the application to do.
I'd also suggest you look at Ruby on Rails (especially + the Hobo addon) to get you up and running faster (instead of PHP) - if you are set on PHP, have a look at CakePHP or another similar framework, so that you don't end up re-inventing the wheel.
Update:
Once you get started, further more detailed problems will be faced, many you can get a quick answer from google or the documentation for the language / database etc. If something is extra tricky, post another question on StackOverflow.
As it is your question is too general for a more specific answer, but if you need any additional info, just yell.
I've just got started with the basics (as well as a few intermediate aspects) of HTML, CSS and PHP. What is a good starting point to practice these 3 languages?
I was thinking of writing a URL shortening script but I was wondering if anyone here might have a better idea.
I am looking to develop something that would help me broaden my knowledge of the above 3 languages, but it shouldn't be too advanced that I wouldn't even know how to start it.
Any suggestions would be appreciated.
Whatever you write, if you allow users to input anything, prepared for it to get spammed and hacked mercilessly as soon as it goes live.
Therefore I'd suggest starting with something where you don't give end users any input ability. Something like an image gallery, or a CMS where you as the site admin can create the content, but end users only get to see the finished pages.
If you're feeling more adventurous, you could write a guestbook app, or something like that, but be warned that you'll have to learn quickly all the security aspects of allowing end user input. You'll need to learn how to block spam, avoid SQL injection attacks, prevent cross-site scripting attacks, and a whole bunch of other stuff.
That's all important stuff to know about, but perhaps best left to your second project rather than your first.
Some common beginner tasks are:
- image gallery
- message board
- phone book
- simple forum
These simple projects will allow you to get accustomed to the languages and prepare you for the next steps: security, optimization, user experience, and maybe other.
I recommend trying something very simple at first and finishing it. Only after that you should start something bigger, or better still improve on your first project.
A simple blog platform would be a potentially good second or side project, with the opportunity for enhancement as your skills improve and incorporating things you'll learn from other smaller systems. Start from a single-user blog without comments, and build things up as you go along. Gives you some more free reign to play around on the design (HTML and CSS) side of things as well, and you can always throw in some simple JavaScript as well.
I'll say that #Alin's answers are some good potential starter projects as well, and #Spudley's answer is a good one.
And above all else - have fun!
I support a few of these. I would also suggest you look into doing something for someone else, say a small project. One think I find with myself and those I've taught is that it's a lot harder to commit to something when it's your own project. You also get caught up in the details. When you're doing it for someone else, though, it minimizes the chance.
Also look into using a MVC framework as a way to learn. Good MVC frameworks will allow you to play around while learning how classes work in PHP. I'm sure there are plenty of questions regarding them on SO.
Finally, if none of that leads you anywhere, think of something fun you'd like to try, not matter the difficulty, and go with that. Even if you don't complete a project, there's a high chance you learned something on the way, and that's worth your time.
You can start by reading and do some examples from here http://www.w3schools.com, they have good explanations for everything you want to use in html, php and css.m
Here are a couple suggestions:
Guest book
Simple client / project management
No PHP script could help you with html and css.
You have to master these things separately.
if you want to practice with html and css - just create an HTML page that represents one of your site/script pages and use it to train your html,css skills.
And it will have absolutely nothing to do with PHP part.
Just once you have finished with HTML, you will need to produce the same text dynamically.
Make blog. One step at a time:
On the main page articles one after another. Store them in files.
On the main page only 3 newest. Access the rest of them by menu.
Add option to create new articles.
Add option to edit or delete them.
Restrict access to these actions by using logins and passwords stored in file.
Add option to comment articles.
Add option to remove comments only by administrators (those logged with login and password).
I've been googling around for a really simple way of making what is, in effect, nothing more than an enhanced phpMyAdmin.
In a mysql database, I have:
Name, address, phone, website etc, plus 2 or 3 custom fields. This data is pulled out to make a website.
All I want is to be able to make a freeform form, a bit like Access, but for the web, and the only thing I want to do over and above normal field editing would be to have a list of when I contact them, what was said, and perhaps a reminder when the next action is due. It also needs to implement some basic permissions so that different users can access different subsets of the data.
I've looked at so many CRMs my mind is boggling, and they all do WAY more than I need. I don't have leads or accounts, all I have is the need to make sure than when I update the person's details, and for that data to be in the same DB as my site is generate from.
I'm happy to learn if I can get pointed in the right direction, and I have a feeling that something like what I want might lie in the direction of jquery. It's just that there's so much good jquery stuff about, I can't see the wood for the trees!
Thanks.
If phpMyAdmin doesn't quite do it for you, it sounds like you just want a simple little web application.
jQuery is probably barking up the wrong tree. It's just a javascript library. While you could certainly use it to spiff up your little application, it's not going to get you the core functionality you need.
I would just dig in and write a little PHP script that does exactly what you want. Even if you're not very experienced, this would be a great learning project.
There are lots of tools which will generate forms including Phpeanuts, phpFormGen, Delphi for PHP, PfP Studio, FormFields, phpMyEdit (and many more).
I've not looked at Radria for some time - previously, it was more of a CMS/page layout/mashup thing rather than a form generator though.
C.
As has been said, you need to build a web interface.
One simple thing you can use is something like Django's admin panel or Ruby on Rails' script/generate scaffold functionality. If you can run Rails or Django, try those.
If you are tied into PHP, consider using one of the PHP frameworks. I'm no expert on them - some of my PHP-using friends have good stuff to say about Symfony (the alternatives: Cake, CodeIgniter, Zend). A bit of random Googling tells me that Symfony has an admin generator that may be quite like that of Django.
As has been said, jQuery won't do what you need, although you can use it.