chrules Posted October 31, 2010 Share Posted October 31, 2010 Hey, i'm working on a CMS What would be the best way to give a choice to allow comments on their posts/pages? Kindda like Wordpress, where when you create a post/page you give the user the opportunity to allow for comments... I would prefer if it was not a MySQL based solution :/ In advance, thx Quote Link to comment https://forums.phpfreaks.com/topic/217331-allow-comments-feature/ Share on other sites More sharing options...
MPeter Posted October 31, 2010 Share Posted October 31, 2010 Hello, "chrules". When you work on an CMS you really should work with MySQL as your first choice to store information beside. When you now start to save data into *.txt-files it will occur that you hang up your webspace by fact one "number of files" (when you do not correct the limitation on the *nix-system), fact two "webspace" because all the little *.txt-files with a few Bytes in it are above 1 KiloByte because of their file-start and file-ending which you do not get to see in the FTP-View, but the result could be that 1,000,000 *.txt-files of 200 MegaByte will consume 3-4 GigaByte of webspace. I hope I could give out a hint that you should start working with MySQL. On that a CMS is a Content-Management-System. My rememberence does not remind me that WORDPRESS is one, too. In my point of view WORDPRESS is more a WEBLOG (Web-Blog). Anyways! You want to have Stuff-commented, right? Work with MySQL - perhaps start here, it is a great source for: http://www.w3schools.com/php/php_mysql_intro.asp Regards, MPeter Quote Link to comment https://forums.phpfreaks.com/topic/217331-allow-comments-feature/#findComment-1128584 Share on other sites More sharing options...
chrules Posted October 31, 2010 Author Share Posted October 31, 2010 Thx for your reply, I have a working commenting feature and all, and wasn't really comparing Wordpress to a CMS, but more just giving an example of the one feature. I know how to do this with MySQL, and i use MySQL for most of my site already. Was just getting worried that it would be to database reliant. I was more thinking something in the line of having a .php document with DEFINE = true; statements in. But if MySQL is the best way, then i would just have to go with that then Quote Link to comment https://forums.phpfreaks.com/topic/217331-allow-comments-feature/#findComment-1128628 Share on other sites More sharing options...
The Little Guy Posted October 31, 2010 Share Posted October 31, 2010 I would create a column in the table that stores the post, and set it to 1 (allow posts) or 0 (don't allow posts). So, when you get the information with the page, you will also get the column with a 1 or 0, and if it is 1 display a comment box and if it is 0 don't display a comment box. The only other way to do this without mysql is using a flat file database, which is even worse the mysql. Quote Link to comment https://forums.phpfreaks.com/topic/217331-allow-comments-feature/#findComment-1128713 Share on other sites More sharing options...
gevans Posted October 31, 2010 Share Posted October 31, 2010 On that a CMS is a Content-Management-System. My rememberence does not remind me that WORDPRESS is one, too. In my point of view WORDPRESS is more a WEBLOG (Web-Blog). In theory you are very right wordpress is... WordPress is web software you can use to create a beautiful website or blog But the options are endless, I've used Wordpress to build fairly large websites with a CMS; WordPress started as just a blogging system, but has evolved to be used as full content management system and so much more... Quote Link to comment https://forums.phpfreaks.com/topic/217331-allow-comments-feature/#findComment-1128740 Share on other sites More sharing options...
chrules Posted November 1, 2010 Author Share Posted November 1, 2010 Actually ended up doing as The Little Guy said. But thx for the suggestions all, will mark this as solved now... Quote Link to comment https://forums.phpfreaks.com/topic/217331-allow-comments-feature/#findComment-1128879 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.