Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
RevCMS Working News Comments!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Dann" data-source="post: 177329" data-attributes="member: 27418"><p>I've looked at the code and it seemed like everyone could post unlimited comments so I've whipped up a fix, find:</p><p>[PHP]<?php</p><p>if($userPosts >= 1)</p><p>{</p><p> define('ERROR', 'Sorry, you are only allowed one comment per article.');</p><p>}</p><p>if(defined("SUCCESS")){</p><p>?>[/PHP]</p><p>and replace it with</p><p>[PHP]<?php</p><p>$userPosts = mysql_query("SELECT * FROM cms_comments WHERE userid = '".$_SESSION['user']['id']."'");</p><p>if($userPosts >= 2)</p><p>{</p><p> define('ERROR', 'Sorry, you are only allowed two comments per article.');</p><p>}</p><p>if(defined("SUCCESS")){</p><p>?>[/PHP]</p><p>(I know I've made it two comments since I think it's a bit more reasonable than one</p><p>EDIT: Just realized this only lets you have 2 comments on every article there - I'll try whip up a fix</p><p>EDIT 2: Fell asleep on my keyboard whilst trying to find a fix, sorry, I'll have it done some time soon.</p></blockquote><p></p>
[QUOTE="Dann, post: 177329, member: 27418"] I've looked at the code and it seemed like everyone could post unlimited comments so I've whipped up a fix, find: [PHP]<?php if($userPosts >= 1) { define('ERROR', 'Sorry, you are only allowed one comment per article.'); } if(defined("SUCCESS")){ ?>[/PHP] and replace it with [PHP]<?php $userPosts = mysql_query("SELECT * FROM cms_comments WHERE userid = '".$_SESSION['user']['id']."'"); if($userPosts >= 2) { define('ERROR', 'Sorry, you are only allowed two comments per article.'); } if(defined("SUCCESS")){ ?>[/PHP] (I know I've made it two comments since I think it's a bit more reasonable than one EDIT: Just realized this only lets you have 2 comments on every article there - I'll try whip up a fix EDIT 2: Fell asleep on my keyboard whilst trying to find a fix, sorry, I'll have it done some time soon. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
RevCMS Working News Comments!
Top