Jump to content

Recommended Posts

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 :P

Link to comment
https://forums.phpfreaks.com/topic/217331-allow-comments-feature/
Share on other sites

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

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 :P

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.

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...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.