Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Number of comments under the video on the videos page
30-03-2011, 06:23 AM (This post was last modified: 30-03-2011 03:43 PM by admin.)
Post: #1
Information Number of comments under the video on the videos page
To do this, we one have to exchange two lines of code.
This code is in the functions file, which is located at
/include/functions.php

The two lines we change in functions.php are the same,
so once you find the first one,
the second one is just a bit further down in the code.

Find this line, in the function "tablo()":
Code:
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a></td>';

Add this bit of code above that line:
Code:
$vid_id = $row['v_id'];
$result2 = mysql_query("select * from comments where `v_id` = '$vid_id'");
$com_tot = mysql_num_rows($result2);

Then change the end of the lines at:
Code:
td>';
to this:
Code:
<br>Comments: $com_tot</td>';

NOTE: Be sure to clear your cache files for the changes to take effect.

Custom HTML/CSS/PHP
http://theorderofindividualacceptance.co...p.php?id=1
Find all posts by this user
Quote this message in a reply
30-03-2011, 03:43 PM (This post was last modified: 30-03-2011 03:43 PM by admin.)
Post: #2
RE: Number of comments under the video on the videos page
you do not need to write the code so i edit your post
PHP Code:
while ($row2 mysql_fetch_array($result2))
{

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: