Author Topic: How to change the Rating from 1-5 to 1-10?  (Read 5795 times)

0 Members and 1 Guest are viewing this topic.

Offline NYChack

  • Newbie
  • *
  • Posts: 11
    • View Profile
How to change the Rating from 1-5 to 1-10?
« on: March 12, 2005, 09:37:47 PM »
Hi, does anyone know how to do this? It seems like the standard rating should be "on a scale of 1 to 10" rather than "on a scale of 1 to 5". I was able to change the rating drop down choice to 1 to 10 in the “rate_form.html” template. But when selecting 6-10, it says "invalid rating". I am sure I have to change something in a php file, but I am new at this. Please help!  :roll:

Thank You,
Jason NY, NY USA

------------------------------------------------------------
The Original rate_form.html:

<form method="post" action="{self}">
  <table border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td class="head1">
        <table border="0" cellspacing="0" cellpadding="3" class="row1">
          <tr>
            <td valign="bottom">
              <select name="rating" class="select">
                <option value="">--</option>
                <option value="5">5</option>
                <option value="4">4</option>
                <option value="3">3</option>
                <option value="2">2</option>
                <option value="1">1</option>
              </select>
            </td>
            <td>
              <input type="hidden" name="action" value="rateimage" />
              <input type="hidden" name="id" value="{image_id}" />
              <input type="submit" value="{rate}" class="button" name="submit" />
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>

What I changed or added: I just added option values 6 though 10.

                <option value="">--</option>
                <option value="10">10</option>
                <option value="9">9</option>   
                <option value="9">9</option>
                <option value="8">8</option>
                <option value="7">7</option>
                <option value="6">6</option>
                <option value="5">5</option>
                <option value="4">4</option>
                <option value="3">3</option>
                <option value="2">2</option>
                <option value="1">1</option>


« Last Edit: March 12, 2005, 09:51:40 PM by NYChack »

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: How to change the Rating from 1-5 to 1-10?
« Reply #1 on: March 12, 2005, 09:50:50 PM »
Öffne "includes/constants.php" und finde:

Code:
define('MAX_RATING', 5); 

ersetze durch
Code:
define('MAX_RATING', 10);

gruss
Vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline NYChack

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: How to change the Rating from 1-5 to 1-10?
« Reply #2 on: March 12, 2005, 10:01:53 PM »
Vincent, THANK YOU!!!  It works great now!  :D

Jason NY,NY USA
« Last Edit: March 12, 2005, 10:22:42 PM by NYChack »

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: How to change the Rating from 1-5 to 1-10?
« Reply #3 on: March 12, 2005, 11:11:59 PM »
oops sorry did not write in english
but happy it works
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How to change the Rating from 1-5 to 1-10?
« Reply #4 on: March 12, 2005, 11:12:53 PM »
I just added it to FAQ ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline NYChack

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: How to change the Rating from 1-5 to 1-10?
« Reply #5 on: March 13, 2005, 01:23:44 AM »
Vincent - No problem about the language, I just used the German to English Translation in my web Brower!

V@no – Wow! That’s Great!

Jason NY,NY USA
« Last Edit: March 13, 2005, 01:25:26 AM by NYChack »