Author Topic: [MOD] Answers in Comments like on YouTube  (Read 31396 times)

0 Members and 1 Guest are viewing this topic.

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: [MOD] Answers in Comments like on YouTube
« Reply #15 on: January 11, 2010, 11:50:51 PM »
OK guys!

found a little bottleneck/bug:

if two or more users will be writing an answer (by clicking on "Post response" and making a hidden field <input type="hidden" name="response_to" value="{response_to}" /> not null) then only the latest answer will be posted...

a simple workaround is for two simultanious users only... if 3 people will click on "Post response" and then submit it, only two (presumably will be kept.. i did not test it with more than 2 users)...

Ok... here is the solution:

find SECOND instance of the following code in details.php:
Code: [Select]
 if ($response_to) {
and ADD AFTER

Code: [Select]
//check for response collission (only for 2 simultaneous users)
$sql = "SELECT user_name, comment_id, image_id, comment_response, response
FROM ".COMMENTS_TABLE."
WHERE image_id = $id AND comment_id = $response_to
LIMIT 1";
$row = $site_db->query_firstrow($sql);
if ($row['comment_response'] <> 0) {
$response_to = $row['comment_response'];
}
//end check for response collission

I hope somebody will be able to find a solution to fix this for a very busy site in terms of comments like mine....  :roll: :wink:

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Answers in Comments like on YouTube
« Reply #16 on: August 26, 2010, 10:25:39 PM »
how does this mod work. Ive installed it and its not what i expected. It simply does not work. When i click response to post, it just makes another post right on top of the one i want to respond to so its exactly like that when i did not install this MOD. is it suppose to be like this.

Please can anyone answer this please