Author Topic: Problem with ranking  (Read 355 times)

0 Members and 1 Guest are viewing this topic.

Offline kortafilmer

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
    • View Profile
Problem with ranking
« on: March 29, 2010, 08:25:56 AM »
This is going to sound ridiculous but our voting stars seems to be hidden because they are just not there. But they are because you can click on them. Why can´t you see them?

http://kortafilmer.se/videos.php?id=21

Any ideas?

We would really appreciate any hints
Kortafilmer.se

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Problem with ranking
« Reply #1 on: March 29, 2010, 01:12:24 PM »
Well looks like the <img> tag is not even showing, and the CSS is pushing the text(1, 2, 3, 4, 5) -90000px left....

Why am not sure, did you touch the videos.php & videos.tpl in anyway? Can you post the code here.

Offline kortafilmer

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
    • View Profile
Re: Problem with ranking
« Reply #2 on: April 12, 2010, 08:40:02 AM »
here it is...

viewvid.tpl

Code: [Select]
{include file="header.tpl"}
<div id="shadow"></div>
{section name=video loop=$video}
<div class="clearer"> </div>
<div id="videowrapper" class="roundedcorner">
<div class="clearer"> </div>
<div id="vheader" class="roundedcorner">
<div class="clearer"> </div>
<div id="name">
<h8>{$video[video].name}</h8>
</div>
<div id="voptions">
<h2><a class="lightSwitcher" href="#">&nbsp;</a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="addfavorite.php?g={$video[video].id}&amp;u={$user}"><img src="templates/default/images/favorites.png" border="0" title="{$LAN_109}" alt="" /></a></h2>
</div>
&nbsp;
</div>
<div class="clearer"> </div>
<div id="video" class="roundedcorner">
<div>&nbsp;</div>
<div style="text-align: center;">
{include file="players.tpl"}
</div>
<br />
{include file="bookmarks.tpl"}
<br />
{include file="comment.tpl"}
</div>
<div id="info" class="roundedcorner">
<div id="userinfo">
<img class="userlogo" alt="" src="templates/default/images/userlogo.png" />
<b>{$LAN_36}:</b> {$video[video].creator}
<br />
<b>{$LAN_32}: </b>{$video[video].views}
<br />
<br />
<br />
<br />
<strong>{$LAN_35|default:"Description"}:</strong>
<br />
<div id="description">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap !important; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">
{$video[video].description}
</pre>
</div>
</div>
<div id="rating">
           
              <h2>{$LAN_92|default:"Rate This Video"}</h2>

                <hr />

                <br />
<img src="templates/default/images/star-default.png" alt="" width="20" height="20" hspace="0" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" hspace="0" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                {rating_bar units='5' id=$video[video].id}            </div>
<div id="link">

<hr />

</div>
{/section}
</div>
<div class="clearer"> </div>
</div>
{include file="footer.tpl"}

videos.php
Code: [Select]
<?php
/*
+ ----------------------------------------------------------------------------+
|     PHPDirector.
| $License: GNU General Public License
| $Website: phpdirector.co.uk
|
| THIS FILE IS AN UPDATED VIDEOS.PHP FILE.
+----------------------------------------------------------------------------+
*/

$idc $_GET["id"];

if(isset($idc) && is_numeric($idc)){

if(!isset($_COOKIE[$idc])){
$twomonths 60 60 24 60 time();
setcookie("$idc"$idc$twomonths);
$viewaddone true;
}

}

require('header.php');
if(isset($_COOKIE["id"]))
{
     
$res mysql_query("select Views from pp_user WHERE id = '$_COOKIE[id]'") or die(mysql_error());
$row_plays mysql_fetch_assoc($res);
$new_plays $row_plays["Views"] + 1;
mysql_query("UPDATE pp_user SET Views = $new_plays WHERE id = '$_COOKIE[id]'");
mysql_free_result($res);
}
$ip=$_SERVER['REMOTE_ADDR'];

if(isset(
$_POST['go']) && !empty($_POST['comment']) && !empty($_POST['nom']))
{
mysql_query("INSERT INTO pp_comment (file_id, nom, comment,ip) VALUES ('$_POST[id]', '$_POST[nom]','".addslashes($_POST['comment'])."','$ip')");

$smarty->assign('message''Your comment has been added. Thanks');
}

if(isset(
$_GET['id']))
{
$query_co "SELECT * FROM pp_comment,pp_user WHERE pp_comment.nom = pp_user.user AND pp_comment.file_id=$_GET[id] ORDER BY pp_comment.id DESC";
$result_co mysql_query($query_co) or die (mysql_error());
while (
$row_co mysql_fetch_array($result_co)){
   
$videos_co[] = $row_co;

}

$smarty->assign('videos_co'$videos_co);
}
if(isset($idc) && is_numeric($idc)){
$id mysql_real_escape_string($idc);
$result mysql_query("SELECT * FROM pp_files WHERE id=$id AND `approved` = '1' LIMIT 1") or die(mysql_error());  
}else{
$result mysql_query("select * from pp_files WHERE approved='1' AND reject='0' order by rand() LIMIT 1") or die(mysql_error());  
}

// For each result that we got from the Database
while ($row mysql_fetch_assoc($result))
{
 

 
$video[] = $row;

  if($viewaddone == true){
$new_views $row["views"] + 1;
mysql_query("UPDATE pp_files SET views = '$new_views' WHERE id = '$id'");
}

$smarty->assign('vidtype'$row['video_type']);

if( $row['video_type'] == "dailymotion"){
$dm_xml_pic_string = @file_get_contents("http://www.dailymotion.com/atom/fr/cluster/extreme/featured/video/".$row['file']);
$dm_xml_pic_start explode("/swf/",$dm_xml_pic_string,2);
$dm_xml_pic_end explode("\"",$dm_xml_pic_start[1],2);
$dmid $dm_xml_pic_end[0];
$smarty->assign('dmid'$dmid);
}

}

// Assign this array to smarty

$smarty->assign('video'$video);
$smarty->assign('id'$row['id']);


if(isset($_GET["pop"])){
$smarty->display('viewvidpop.tpl');
}else{
$smarty->display('viewvid.tpl');
}

mysql_close($mysql_link);
?>

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Problem with ranking
« Reply #3 on: April 12, 2010, 08:10:26 PM »
In Viewvid.tpl replace:
Code: [Select]
<img src="templates/default/images/star-default.png" alt="" width="20" height="20" hspace="0" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" hspace="0" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                {rating_bar units='5' id=$video[video].id}

With just:
Code: [Select]
{rating_bar units='5' id=$video[video].id}

Offline kortafilmer

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
    • View Profile
Re: Problem with ranking
« Reply #4 on: April 15, 2010, 01:10:52 PM »
In Viewvid.tpl replace:
Code: [Select]
<img src="templates/default/images/star-default.png" alt="" width="20" height="20" hspace="0" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" hspace="0" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                <img src="templates/default/images/star-default.png" alt="" width="20" height="20" align="left" class="userlogo" />
                {rating_bar units='5' id=$video[video].id}

With just:
Code: [Select]
{rating_bar units='5' id=$video[video].id}

We had that before but then with didn't saw the stars of rating so we added the image by linking that pics...

Offline ultrafoxus

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
    • sbobet
Re: Problem with ranking
« Reply #5 on: June 01, 2010, 03:06:55 PM »
thank you fo all information  8) 8) 8)  this is very helpful