Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Issues
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Sun Jan 18, 2009 1:51 pm Reply with quote

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
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Jan 20, 2009 12:19 pm Reply with quote

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. 
View user's profile Send private message
Palbin







PostPosted: Tue Jan 20, 2009 12:49 pm Reply with quote

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 . '&amp;rop=postcomment&amp;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 . '&amp;rop=postcomment&amp;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







PostPosted: Tue Jan 20, 2009 1:10 pm Reply with quote

If you want to remove the "|". Remove it from line 740.
 
dad7732







PostPosted: Tue Jan 20, 2009 1:41 pm Reply with quote

Great, this works as well as removing that extra ]

Cheers

RavensScripts
 
dad7732







PostPosted: Wed Jan 21, 2009 12:29 pm Reply with quote

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
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Wed Jan 21, 2009 12:44 pm Reply with quote

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?
 
View user's profile Send private message
dad7732







PostPosted: Wed Jan 21, 2009 12:49 pm Reply with quote

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

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







PostPosted: Wed Jan 21, 2009 12:58 pm Reply with quote

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







PostPosted: Wed Jan 21, 2009 1:53 pm Reply with quote

dad7732, I understand what you are saying and will look into this asap.
 
dad7732







PostPosted: Wed Jan 21, 2009 2:10 pm Reply with quote

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







PostPosted: Wed Jan 21, 2009 2:18 pm Reply with quote

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 Smile
 
dad7732







PostPosted: Wed Jan 21, 2009 2:26 pm Reply with quote

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

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

Cheers
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Wed Jan 21, 2009 3:59 pm Reply with quote

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...........
 
View user's profile Send private message Send e-mail
Palbin







PostPosted: Wed Jan 21, 2009 4:21 pm Reply with quote

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 . '&amp;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 . '&amp;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:
Code:


write_review();


Change to:
Code:


if (is_user($user) || is_admin($admin)) write_review(); else Header('Location: modules.php?name=' . $module_name);
 
Palbin







PostPosted: Wed Jan 21, 2009 4:23 pm Reply with quote

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 Smile
 
dad7732







PostPosted: Wed Jan 21, 2009 4:24 pm Reply with quote

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







PostPosted: Wed Jan 21, 2009 4:35 pm Reply with quote

Let me know if that code works for you.
 
dad7732







PostPosted: Wed Jan 21, 2009 4:36 pm Reply with quote

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







PostPosted: Wed Jan 21, 2009 4:50 pm Reply with quote

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 Cheers

Edit: Actually can't see "write a review" from anon access. Smile
 
Palbin







PostPosted: Fri Jan 23, 2009 1:06 pm Reply with quote

dad7732 wrote:
Edit: Actually can't see "write a review" from anon access. Smile


Cool
 
dad7732







PostPosted: Tue Jan 27, 2009 11:31 am Reply with quote

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. Bang Head
 
Palbin







PostPosted: Sat Feb 07, 2009 10:41 am Reply with quote

Sorry I missed this post. Are you still having this problem?

Mine seems to be working.
 
dad7732







PostPosted: Sat Feb 07, 2009 11:17 am Reply with quote

Still have the problem, nothing appears when clicking any letter or number with about 20 posted reviews. RN 2.20.01
 
Palbin







PostPosted: Sat Feb 07, 2009 12:02 pm Reply with quote

All I can suggest is turn error reporting on and see if anything comes up on the screen or in the log.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©