You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 50 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Unrated Stories [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
LunaFaye
Nuke Soldier
Nuke Soldier


Joined: Jun 12, 2005
Posts: 20

Location: Columbus OH

PostPosted: Sat Jan 07, 2006 2:16 pm Reply with quoteBack to top

I don't know if this bothered anyone else, but I didn't like it that a story with no votes would show a rating of "0". I searched around, and didn't see a change for this, so I made one myself, and just thought I would share, incase someone else wanted it.

I changed it to read "Be the first to rate this story".

In modules / News / language / lang-english.php
Added:

Quote:
define("_FIRSTTORATE","Be the first to rate this story");


In modules / News / index.php
Changed:

Quote:
if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
$rated = 0;
}


To:
Quote:
if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
$rated = "$story_link<b>"._FIRSTTORATE."</b></a>";
}


In modules / News / article.php
Changed:

Quote:
if ($ratings != 0) {
$rate = substr($score / $ratings, 0, 4);
$r_image = round($rate);
if ($r_image == 1) {
$the_image = "<br><br><img src=\"images/articles/stars-1.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 2) {
$the_image = "<br><br><img src=\"images/articles/stars-2.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 3) {
$the_image = "<br><br><img src=\"images/articles/stars-3.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 4) {
$the_image = "<br><br><img src=\"images/articles/stars-4.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 5) {
$the_image = "<br><br><img src=\"images/articles/stars-5.gif\" border=\"1\"></center><br>";
}
} else {
$rate = 0;
$the_image = "</center><br>";
}


To:
Quote:
if ($ratings != 0) {
$rate = substr($score / $ratings, 0, 4);
$r_image = round($rate);
if ($r_image == 1) {
$the_image = "<br><br><img src=\"images/articles/stars-1.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 2) {
$the_image = "<br><br><img src=\"images/articles/stars-2.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 3) {
$the_image = "<br><br><img src=\"images/articles/stars-3.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 4) {
$the_image = "<br><br><img src=\"images/articles/stars-4.gif\" border=\"1\"></center><br>";
} elseif ($r_image == 5) {
$the_image = "<br><br><img src=\"images/articles/stars-5.gif\" border=\"1\"></center><br>";
}
} else {
$rate = "Be the first to rate this story";
$the_image = "</center><br>";
}


Luna Faye

_________________
Oracle of Pæthieon
Find all posts by LunaFayeView user's profileSend private messageVisit poster's website
astalavistabd
Captain
Captain


Joined: Dec 19, 2004
Posts: 663

Location: Canada

PostPosted: Sat Jan 07, 2006 3:09 pm Reply with quoteBack to top

hey nice hack. I already implementited it. Smile But my rating is not working. It could be other problem. Thanks

_________________
Free PHPNuke Themes, PHPNuke Modules, PHPNuke Blocks (No Registration Required)
Find all posts by astalavistabdView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.184 Seconds - 304 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::