Author Topic: Radio buttons as rate menu  (Read 10311 times)

0 Members and 1 Guest are viewing this topic.

Offline sukholee

  • Newbie
  • *
  • Posts: 26
    • View Profile
Radio buttons as rate menu
« on: August 02, 2002, 09:40:39 PM »
Hi,

Can anyone help me with this? I want to use radio buttons instead of the drop down menu. I have modified the rate_form.html template, but it does not work.

Do I need to change anything else? Please get back anyone...

Thanks

Offline Jaap12

  • Full Member
  • ***
  • Posts: 108
    • View Profile
this?
« Reply #1 on: August 02, 2002, 09:47:47 PM »
Code: [Select]
<form method="POST" action="{self}">
  <p><input type="radio" value="1"></p>      <input type="hidden" name="action" value="rateimage" />
              <input type="hidden" name="id" value="{image_id}" />
              <input type="submit" value="{rate}" class="button" name="submit" />
</form>

Offline sukholee

  • Newbie
  • *
  • Posts: 26
    • View Profile
Radio buttons as rate menu
« Reply #2 on: August 02, 2002, 09:54:52 PM »
I have copied and pasted the html you gave me into rate_form.html but it did not work. It read "Rating Invalid"

Why is this?

Offline dabri

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://www.12geschworene.de
Radio buttons as rate menu
« Reply #3 on: August 02, 2002, 10:38:01 PM »
Ich glaub oben wurde  name="rating" vergessen

Versuch den mal:

Quote

<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" colspan="2">
              <p>
                <input type="radio" name="rating" value="1">
                1
                <input type="radio" name="rating" value="2">
                2
                <input type="radio" name="rating" value="3">
                3
                <input type="radio" name="rating" value="4">
                4
                <input type="radio" name="rating" value="5">
                5
            </td>
            <td rowspan="2">
              <div align="center">
                <input type="hidden" name="action" value="rateimage" />
                <input type="hidden" name="id" value="{image_id}" />
                <input type="submit" value="{rate}" class="button" name="submit" />
              </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>


Gruß Daniel

Offline sukholee

  • Newbie
  • *
  • Posts: 26
    • View Profile
Radio buttons as rate menu
« Reply #4 on: August 03, 2002, 01:05:22 PM »
Thanks a lot! It works now....

Offline olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Radio buttons as rate menu
« Reply #5 on: January 03, 2009, 06:11:22 PM »
Hallo, is it possible to add to the rateform "-1" and "0" values?
Thank you...

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: Radio buttons as rate menu
« Reply #6 on: January 03, 2009, 06:17:41 PM »
did you try change rate_form.html?
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 olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Radio buttons as rate menu
« Reply #7 on: January 03, 2009, 07:25:57 PM »
yes, just by adding   <input type="radio" name="rating" value="0" > and <input type="radio" name="rating" value="-1" >
it does not work.  Probably somewhere in "functions" there is a voting range starting from 1?

Site www.fotoexperiment.robertmagel.de, login and passwort testuser.
                 

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: Radio buttons as rate menu
« Reply #8 on: January 03, 2009, 07:43:11 PM »
in includes/page_header.php find:
  if ($rating && $rating <= MAX_RATING && $id) {

Replace it with:
  if ($rating >= -&& $rating <= MAX_RATING && $id) {
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 olgaart

  • Newbie
  • *
  • Posts: 45
    • View Profile
    • FotoClub
Re: Radio buttons as rate menu
« Reply #9 on: January 03, 2009, 07:54:47 PM »
thank you very much!