Author Topic: [MOD]Oylamalarý yýldýzlarla gösterin  (Read 5247 times)

0 Members and 1 Guest are viewing this topic.

Offline DilnüvaZ

  • Moderator
  • Hero Member
  • *****
  • Posts: 527
  • Gönül Okþayýcý
    • View Profile
    • Nuvanda Resimlere Dair Ne Varsa
[MOD]Oylamalarý yýldýzlarla gösterin
« on: January 28, 2009, 05:14:58 PM »
aç includes/functions.php:

ara
 
Code: [Select]
if (!check_permission("auth_readcomment", $image_row['cat_id'])) {
    $image_row['image_allow_comments'] = 0;
  }


Altýna ekle

Code: [Select]
if ($image_row['image_rating'] == '5.00') {
     $rating_pic = "5.gif";
  } elseif ($image_row['image_rating'] >= '4.00') {
     $rating_pic = "4.gif";
  } elseif ($image_row['image_rating'] >= '3.00') {
     $rating_pic = "3.gif";
  } elseif ($image_row['image_rating'] >= '2.00') {
     $rating_pic = "2.gif";
  } elseif ($image_row['image_rating'] >= '1.00') {
     $rating_pic = "1.gif";
  } else {
     $rating_pic = "0.gif";
  }
  $site_template->register_vars(array(
     "rating_pic" => $rating_pic,
     "lang_rating" => $lang['rating'],
     "lang_votes" => $lang['votes']
  ));

templates/temanýz/home.html yi açýnýz.

rateform kýsmýnýn hemen altýna

Code: [Select]
<br><img src="{template_url}/images/{rating_pic}" width="55" height="10" alt="{lang_rating} {image_rating} ({image_votes} {lang_votes})" /><br>bu kodu ekleyiniz.

templates/temanýz/images/
klasörü altýna 0.gif 1.gif diye 5 e kadar 55*10 pixel boyutlarýnda yýldýz resimleri atýnýz.

örnek: http://www.elemegim.info

Anlatým için hasan arkadaþýmýza teþekkür ederiz.

 

Post your comments here