Author |
Message |
dad7732
RavenNuke(tm) Development Team

Joined: Mar 18, 2007
Posts: 1242
|
Posted:
Sun Jan 18, 2009 1:51 pm |
|
All users can read the reviews and reg'd only can write a review as well as comment. However, what's happening now is that some users are registering for the sole purpose of commenting on reviews thereby leaving spamvertising links only.
I don't see a way in the preferences to completely disable review comments. But I did edit the /Reviews/index.php file and commented out the case 'postcomment'; line which does eliminate posting of comments.
Is there an easier way as I would really like to remove the "Post a comment" line under the review itself.
Cheers |
|
|
|
 |
Palbin
Site Admin

Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Tue Jan 20, 2009 12:19 pm |
|
I'll look into it. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
 |
Palbin

|
Posted:
Tue Jan 20, 2009 12:49 pm |
|
Find line 741-742 of modules/Reviews/index.php
Code:
// montego:0000763 - decided to remove the title in the link as it just opens the door for abuse and some characters can trip NukeSentinel.
. '<a href="modules.php?name=' . $module_name . '&rop=postcomment&id=' . $id . '">' . _REPLYMAIN . '</a> ]</center>';
|
Change to this:
Code:
// montego:0000763 - decided to remove the title in the link as it just opens the door for abuse and some characters can trip NukeSentinel.
//. '<a href="modules.php?name=' . $module_name . '&rop=postcomment&id=' . $id . '">' . _REPLYMAIN . '</a> ]</center>';
. ' ]</center>';
|
This should remove the comment link. This is the best I can do untill maybe RN 2.4. I did notice a few other issues that we could fix as well. I will put an issue into our tracking system. |
|
|
|
 |
Palbin

|
Posted:
Tue Jan 20, 2009 1:10 pm |
|
If you want to remove the "|". Remove it from line 740. |
|
|
|
 |
dad7732

|
Posted:
Tue Jan 20, 2009 1:41 pm |
|
Great, this works as well as removing that extra ]
Cheers
 |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 12:29 pm |
|
Oh, one more thing ... Anonymous can read but cannot write, only reg'd user can write. How we do that? If the module can be viewed in the main menu that means that anon can write also.
I think I had this situation wrong in my first post concerning who can view/write, etc.
Cheers |
|
|
|
 |
horrorcode
Involved


Joined: Jan 17, 2009
Posts: 272
Location: Missouri
|
Posted:
Wed Jan 21, 2009 12:44 pm |
|
Im not 100% sure but I think the posting of comments by anonymous would be controled by the Allow Anonumous to Post setting in Admin, Preferences? |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 12:49 pm |
|
No, read up the thread a bit and see the fix posted for removing writing a comment altogether in "Reviews". The anon to post is for the forums, ie., "post" as opposed to "comment". Unless "post" in that preference means "post" a comment.
At any rate, in the module configuration, if you set it to "view in the module block" and it's set to "anonymous" then anons can also "write" which is not what I want. I need to have all users able to read the reviews but ONLY reg'd users able to write one.
Cheers |
|
|
|
 |
horrorcode

|
Posted:
Wed Jan 21, 2009 12:58 pm |
|
Well post in that section may also be for forums, but I know it controls anonymous posting comments in polls, thats all I've tested.
But I understand what youre saying, there must be a problem somewhere, as the posting of reviews should be controlled by the same function. |
|
|
|
 |
Palbin

|
Posted:
Wed Jan 21, 2009 1:53 pm |
|
dad7732, I understand what you are saying and will look into this asap. |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 2:10 pm |
|
Palbin: Great, I had my own doubts as to what I was speaking of. No hurry tho ..
horrorcode: I think the major difference is that writing a Review requires Admin review whereas posting a comment in a poll does not .. I think. I don't do polls and I don't really like comments either. If a user wants to make a comment they can register and post to the "general" forum, IMHO of course.
Cheers |
|
|
|
 |
horrorcode

|
Posted:
Wed Jan 21, 2009 2:18 pm |
|
Ah I totally understand now, sorry for the confusion. I only knew about the comments, as I used to get alot of spam that way, one of the reasons I switched to RN. Again, sorry, I now see that there is no where to disable anonymous users posting a review. I also look forward to seeing an update as that could get very frustrating if someone were to take a long time writing it out only to have it rejected because they were anonymous. Ill be sure to read everything twice next time  |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 2:26 pm |
|
Actually it could be a semantics issue, eg., post a review or write a review. Post a comment or write a comment, post a message or write a message, etc. and so on ...
Don't worry about asking questions as the only stupid question is the one you don't ask. Nobody here that I know of will chastise you for asking what you think is a dumb question. We may get a laugh or two at your expense tho ...
Cheers |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Wed Jan 21, 2009 3:59 pm |
|
I have not used Reviews for years but if it doesn't already have a CAPTCHA switch for the comments I think it might be prudent to add that at some point.
So many things to do........... |
|
|
|
 |
Palbin

|
Posted:
Wed Jan 21, 2009 4:21 pm |
|
Find line 80 of /modules/Reviews/index.php:
Code:
global $module_name;
|
change to:
Code:
global $module_name, $admin, $user;
|
Find line 96:
Code:
echo '<center>[ <a href="modules.php?name=' . $module_name . '&rop=write_review">' . _WRITEREVIEW . '</a> ]</center><br /><br />' . "\n\n";
|
change to:
Code:
if (is_user($user) || is_admin($admin)) echo '<center>[ <a href="modules.php?name=' . $module_name . '&rop=write_review">' . _WRITEREVIEW . '</a> ]</center><br /><br />' . "\n\n";
|
In between Lines 27-28:
Code:
require_once('mainfile.php');
$module_name = basename(dirname(__FILE__));
|
Add this:
Code:
global $admin, $user;
|
Find line 53:
Change to:
Code:
if (is_user($user) || is_admin($admin)) write_review(); else Header('Location: modules.php?name=' . $module_name);
|
|
|
|
|
 |
Palbin

|
Posted:
Wed Jan 21, 2009 4:23 pm |
|
Guardian2003 wrote: | I have not used Reviews for years but if it doesn't already have a CAPTCHA switch for the comments I think it might be prudent to add that at some point.
So many things to do........... |
It has a captcha, but he didn't want anonymous people posting regardless. He just wants anonymous be able to read and not write.
At first I thought it didn't have a captcha too  |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 4:24 pm |
|
The only problem I have with adding a captcha for a comment, it will still not prevent the reg'd user from entering a spamvertising entry. And that's what was happening on one of my production sites, spammers registering and writing a comment because it didn't need admin review/approval. Only the Review itself does and there IS a captcha for that function.
Cheers |
|
|
|
 |
Palbin

|
Posted:
Wed Jan 21, 2009 4:35 pm |
|
Let me know if that code works for you. |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 4:36 pm |
|
Hmmm, I sit corrected, too tired to stand. There is in fact a captcha for both writing and commenting. Didn't see the one for commenting because I was logged in as admin and doesn't require a captcha. Logged in as a user AFTER logging out as admin an sho 'nuff, the captcha was there for commenting.
Cheers |
|
|
|
 |
dad7732

|
Posted:
Wed Jan 21, 2009 4:50 pm |
|
Yes, the code works. Accessed via anon and I can see the reviews but when trying to write or post a comment I get "Restricted Area" message.
Cheers
Edit: Actually can't see "write a review" from anon access.  |
|
|
|
 |
Palbin

|
Posted:
Fri Jan 23, 2009 1:06 pm |
|
dad7732 wrote: | Edit: Actually can't see "write a review" from anon access. |
 |
|
|
|
 |
dad7732

|
Posted:
Tue Jan 27, 2009 11:31 am |
|
Another issue I forgot to mention is why clicking on any letter shows a blank page for every one, including the numbers OR maybe I don't know what I'm doing - quite possible.  |
|
|
|
 |
Palbin

|
Posted:
Sat Feb 07, 2009 10:41 am |
|
Sorry I missed this post. Are you still having this problem?
Mine seems to be working. |
|
|
|
 |
dad7732

|
Posted:
Sat Feb 07, 2009 11:17 am |
|
Still have the problem, nothing appears when clicking any letter or number with about 20 posted reviews. RN 2.20.01 |
|
|
|
 |
Palbin

|
Posted:
Sat Feb 07, 2009 12:02 pm |
|
All I can suggest is turn error reporting on and see if anything comes up on the screen or in the log. |
|
|
|
 |
|