Jump to content


Photo
- - - - -

Comment count issue


  • Please log in to reply
5 replies to this topic

#1 eFex

eFex

    Senior Member

  • Members
  • PipPipPip
  • 138 posts

Posted 09 December 2015 - 01:56 AM

After removing any comments of video it's still couting it.



 


#2 sreviews

sreviews

    Junior Member

  • Members
  • Pip
  • 17 posts

Posted 15 December 2015 - 06:26 AM

The comment count is stored in the video database. When you delete the comments in the admin section it does not reduce the number of comments in the video database. You have to add a update query to the comments.php page in the site admin.

 

Hope this helps.

 

Marcus



#3 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 16 December 2015 - 08:35 PM

File: /siteadmin/modules/videos/comments.php

 

Above Line:

$sql = "DELETE FROM video_comments WHERE CID = '" .mysql_real_escape_string($COMID). "' LIMIT 1";

Insert line:

$conn->execute("UPDATE video SET com_num = com_num-1 WHERE VID = " .$VID);

Edited by dargre, 18 December 2015 - 11:23 PM.

VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)


#4 apple82

apple82

    Member

  • Members
  • PipPipPipPip
  • 293 posts
  • LocationSpain

Posted 17 December 2015 - 08:24 PM

 

File: /siteadmin/modules/videos/comments.php

 

Above Line:

$sql = "DELETE FROM video_comments WHERE CID = '" .mysql_real_escape_string($COMID). "' LIMIT 1";

Insert line:

$conn->execute("UPDATE video SET com_num = com_num-1 WHERE VID = " .$VID;

 

 

with no error code does not work:

$conn->execute("UPDATE video SET com_num = com_num-1 WHERE VID = " .$VID;


#5 sreviews

sreviews

    Junior Member

  • Members
  • Pip
  • 17 posts

Posted 18 December 2015 - 07:55 PM

If I am not mistaken there might be a ) missing at the end.

$conn->execute("UPDATE video SET com_num = com_num-1 WHERE VID = " .$VID);


#6 dargre

dargre

    Senior Member

  • Members
  • PipPipPipPipPip
  • 988 posts

Posted 18 December 2015 - 11:31 PM

 

If I am not mistaken there might be a ) missing at the end.

$conn->execute("UPDATE video SET com_num = com_num-1 WHERE VID = " .$VID);

 

 

You guess right. Good catch. Added missing slash.

A don't use AVS script daily, so if I enter code here I do it from head, and sometimes there can be a typo.


VIDEO.JS - best HTML5 player in the world for AVS script

NUEVOPLAYER 8 - best flash+html5 player for video scripts
Mods, custom code by NuevoLab (Search Suggest, Multiple image upload, Seo mods,and much more)