Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
jane65
Regular
Regular


Joined: Feb 24, 2009
Posts: 81
Location: UK

PostPosted: Mon Jan 21, 2013 10:40 am Reply with quote

Hi,

I'd like to make a small change to a function of the comments.php in the News module if possible. Currently a User can post a parent comment to which a reply can be given to. If a reply is given, it displays underneath the parent comment, and it also displays another link to reply to the reply. If possible, I'd like to make this reply link visible and available ONLY for use by the specific User that posted the initial parent comment, rather than enabling all Users to reply as it currently stands. I hope this makes sense and thank you for any help with this. Smile

This is the code that relates to the 'Reply' link that I want to alter if possible.


Code:
if ($anonpost == 1 OR is_admin($admin) OR is_user($user)) {

                  echo '<span style="color:' . $textcolor2 . '"> [ <a href="modules.php?name=' . $module_name . '&amp;file=comments&amp;op=Reply&amp;pid=' . $row['tid'] . '&amp;sid=' . $row['sid'] . '">' . _REPLY . '</a>';
               }
[/b]
 
View user's profile Send private message
neralex
The Mouse Is Extension Of Arm


Joined: Aug 22, 2007
Posts: 1295
Location: Germany

PostPosted: Mon Jan 21, 2013 4:09 pm Reply with quote

And what if someone else wants to reply to the response and the original author of the parent comment is no longer active? This user would then have to create a new response that is not related to the parent comment. Make it sense?
 
View user's profile Send private message
jane65
PostPosted: Tue Jan 22, 2013 8:47 am Reply with quote

Thanks for the reply neralex, I'm using the News module for questions and answers, so the User would ask a question (rather than make a comment) in the parent comment section, and the reply would be a specific answer to their question, so therefore I want to make it so that only that User can respond to the answer to their queston. All other Users will create their own parent comment if they also want to ask a question.
 
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Fri Jan 25, 2013 10:47 am Reply with quote

The trick would be determining which user is the one you want to show the link to. The code does not distinguish one from another right now. You would have to add some kind of logic to determine the user based on the comment id.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
Guardian2003
Site Admin


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

PostPosted: Fri Jan 25, 2013 4:24 pm Reply with quote

I believe you can also have multiple parents, so you may need to look at that also.
Would it suit your purposes better if you disabled comments for News articles and instead provided a link to a forum topic?
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©