4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: sukholee on August 02, 2002, 09:40:39 PM

Title: Radio buttons as rate menu
Post by: sukholee 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
Title: this?
Post by: Jaap12 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>
Title: Radio buttons as rate menu
Post by: sukholee 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?
Title: Radio buttons as rate menu
Post by: dabri 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
Title: Radio buttons as rate menu
Post by: sukholee on August 03, 2002, 01:05:22 PM
Thanks a lot! It works now....
Title: Re: Radio buttons as rate menu
Post by: olgaart on January 03, 2009, 06:11:22 PM
Hallo, is it possible to add to the rateform "-1" and "0" values?
Thank you...
Title: Re: Radio buttons as rate menu
Post by: V@no on January 03, 2009, 06:17:41 PM
did you try change rate_form.html?
Title: Re: Radio buttons as rate menu
Post by: olgaart 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.
                 
Title: Re: Radio buttons as rate menu
Post by: V@no 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 >= -1 && $rating <= MAX_RATING && $id) {
Title: Re: Radio buttons as rate menu
Post by: olgaart on January 03, 2009, 07:54:47 PM
thank you very much!