Fotografika | Foto forum

Witamy, Gość. Zaloguj się lub zarejestruj.
Czy dotarł do Ciebie email aktywacyjny?
Listopad 21, 2008, 13:06:40


Zaloguj się podając nazwę użytkownika, hasło i długość sesji


więcej informacji tutaj
Uśmiech Pierwszy szablon udostępniony publicznie. Uśmiech
Szablon fotoan black v1.0 jest kompatybilny z galerią 4images wersji 1.7.3.
Szablon zawiera również polską wersję językową v.2.0
  więcej tutaj...
820 wiadomości w 190 wątkach, wysłane przez 175 użytkowników
Najnowszy użytkownik: Naigreereovaf
+  Fotografika | Foto forum
|-+  Galeria 4images
| |-+  4images ... [MOD] modyfikacje (Moderator: andreoid)
| | |-+  Zmiana formy oddawnia głosów na zdjęcia
0 użytkowników i 1 Gość przegląda ten wątek. « poprzedni następny »
Strony: [1] Do dołu Drukuj
Autor Wątek: Zmiana formy oddawnia głosów na zdjęcia  (Przeczytany 687 razy)
misiek.154
Użytkownik

*

Pomógł: +0/-0
Offline Offline

Wiadomości: 16

OS:
Windows XP
Browser:
Firefox 2.0.0.3



Zobacz profil
« : Lipiec 17, 2007, 09:39:13 »

======================================================================
Wersja: .............
Data: ................ 2007-05-17
Autor: ............... KurtW  http://4images.malediven-bilder.de/
Oryginalny opis .. http://www.4homepages.de/forum/index.php?topic=17518.msg93446#msg93446
======================================================================
Modyfikacja testowana na wersjach 1.7.0 + 1.7.4

Sam tytuł mówi za siebie ale najlepiej jak pokażę efekt:



Instalacja: Łatwa
Czas: 5min

Zmienione pliki:
- templates/twój szablon/rate_form.html
- templates/twoj_szablon/style.css
- includes/constants.php


Krok 1.
Otwórz plik templates/twój_szablon/rate_form.html i zamień cały kod tym:

Kod:
<!-- ######################################### Start Mod Mouseover- hover Rateform #################################### -->
<script language="JavaScript" type="text/javascript">
function showVote(witch, wert, show) {
for (var i=1; i<=10; i++){
document.getElementById('rm'+witch+i).className="ratemodStandard";
}
if (show == 1) {
for (var j=1; j<=wert; j++) {
document.getElementById('rm'+witch+j).className="ratemod"+wert+"hover";
}}}
</script>
<div align="center"><center>
<table border="0" cellspacing="0" cellpadding="1">
 <tr>
  <td class="head1" align="left" height="18">&nbsp;{rate}</td>
 </tr>
 <tr>
  <td class="head1">
  <table border="0" cellspacing="0" cellpadding="3" class="row1">
  <tr>
  <td valign="bottom">
  <div align="center"><center>
  <table border="0" cellspacing="0" cellpadding="0" width="200">
  <tr>
    <td align="center">1</td>
    <td align="center">2</td>
    <td align="center">3</td>
    <td align="center">4</td>
    <td align="center">5</td>
    <td align="center">6</td>
    <td align="center">7</td>
    <td align="center">8</td>
    <td align="center">9</td>
    <td align="center">10</td>
  </tr>
  <tr><form name="form" method="post" action="{self}">
    <td align="center"><a href="javascript:document.form.rating[1].click()" onmouseover="showVote('2','1',1)" onmouseout="showVote('2','1',0)" title="Flop - 1"><div id="rm21" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[2].click()" onmouseover="showVote('2','2',1)" onmouseout="showVote('2','2',0)"title="2"><div id="rm22" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[3].click()" onmouseover="showVote('2','3',1)" onmouseout="showVote('2','3',0)"title="3"><div id="rm23" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[4].click()" onmouseover="showVote('2','4',1)" onmouseout="showVote('2','4',0)"title="4"><div id="rm24" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[5].click()" onmouseover="showVote('2','5',1)" onmouseout="showVote('2','5',0)"title="5"><div id="rm25" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[6].click()" onmouseover="showVote('2','6',1)" onmouseout="showVote('2','6',0)"title="6"><div id="rm26" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[7].click()" onmouseover="showVote('2','7',1)" onmouseout="showVote('2','7',0)"title="7"><div id="rm27" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[8].click()" onmouseover="showVote('2','8',1)" onmouseout="showVote('2','8',0)"title="8"><div id="rm28" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[9].click()" onmouseover="showVote('2','9',1)" onmouseout="showVote('2','9',0)"title="9"><div id="rm29" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[10].click()" onmouseover="showVote('2','10',1)" onmouseout="showVote('2','10',0)" title="Top - 10"><div id="rm210" class="ratemodStandard"></div></a></td>
  </tr>
 </table>
 <table border="0" cellspacing="0" cellpadding="0" style="DISPLAY: none">
  <tr>
    <td align="center">
      <input type="radio" name="rating" value="0" checked>&nbsp;
      <input type="radio" name="rating" value="1" onClick="document.form.submit()">1&nbsp;
      <input type="radio" name="rating" value="2" onClick="document.form.submit()">2&nbsp;
      <input type="radio" name="rating" value="3" onClick="document.form.submit()">3&nbsp;
      <input type="radio" name="rating" value="4" onClick="document.form.submit()">4&nbsp;
      <input type="radio" name="rating" value="5" onClick="document.form.submit()">5&nbsp;
      <input type="radio" name="rating" value="6" onClick="document.form.submit()">6&nbsp;
      <input type="radio" name="rating" value="7" onClick="document.form.submit()">7&nbsp;
      <input type="radio" name="rating" value="8" onClick="document.form.submit()">8&nbsp;
      <input type="radio" name="rating" value="9" onClick="document.form.submit()">9&nbsp;
      <input type="radio" name="rating" value="10" onClick="document.form.submit()">10&nbsp;
      <INPUT type="hidden" name="action" value="rateimage" />
      <INPUT type="hidden" name="id" value="{image_id}" />
    </td></form>
   </tr>
 </table>
</center></div>
</td>
</tr>
   <tr>
    <td height="5"></td>
  </tr>
</table>
</td>
</tr>
</table>
<!-- ######################################### End Mod Mouseover- hover Rateform #################################### -->

Krok 2.
Otwórz plik templates/twój_szablon/style.css i dodaj ten kod:

Kod:
.ratemodStandard, .ratemod1hover, .ratemod2hover, .ratemod3hover, .ratemod4hover, .ratemod5hover, .ratemod6hover, .ratemod7hover, .ratemod8hover, .ratemod9hover, .ratemod10hover {
    background: #fff;
    width: 18px;
    height: 12px;
    float: center;
    margin-right: 1px;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod1hover, .ratemod2hover, .ratemodr {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #466900;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod3hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #5A8700;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod4hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #6EA500;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod5hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #82C300;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod6hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #96E100;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod7hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #AAFF00;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod8hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #BEFF3C;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod9hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #D2FF78;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod10hover, .ratemodg {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF7C50;
    border: 1px solid #004C75;
    text-decoration: none;
}

Krok 3.
- Otwórz plik includes/constants.php i znajdź:

Kod:
define('MAX_RATING', 5);

zamień na:

Kod:
define('MAX_RATING', 10);

Kolory wyświetalane możemy zmienić w pliku templates/twój_szablon/style.css
 

Dodatek: Przycisk aby zagłosować



Wystarczy dokonać jednej zmiany w pliku templates/twój_szablon/rate_form.html:

Zamienić cały kod tym:
Kod:
<!-- ######################################### Start Mod Mouseover- hover Rateform #################################### -->
<script language="JavaScript" type="text/javascript">
function showVote(witch, wert, show) {
for (var i=1; i<=10; i++){
document.getElementById('rm'+witch+i).className="ratemodStandard";
}
if (show == 1) {
for (var j=1; j<=wert; j++) {
document.getElementById('rm'+witch+j).className="ratemod"+wert+"hover";
}}}
</script>
<table border="0" cellspacing="1" cellpadding="0" width="200" class="head1">
 <tr>
  <td align="center">
   <table border="0" cellspacing="0" cellpadding="0" width="200" class="row2">
   <tr>
    <td width="4">&nbsp;</td>
    <td align="center">1</td>
    <td align="center">2</td>
    <td align="center">3</td>
    <td align="center">4</td>
    <td align="center">5</td>
    <td align="center">6</td>
    <td align="center">7</td>
    <td align="center">8</td>
    <td align="center">9</td>
    <td align="center">10</td>
    <td width="4">&nbsp;</td>
  </tr>
  <tr><form name="form" method="post" action="{self}">
    <td>&nbsp;</td>
    <td align="center"> <a href="javascript:document.form.rating[1].click()" onmouseover="showVote('2','1',1)" onmouseout="showVote('2','1',1)" title="Flop - 1"><div id="rm21" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[2].click()" onmouseover="showVote('2','2',1)" onmouseout="showVote('2','2',1)" title="2"><div id="rm22" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[3].click()" onmouseover="showVote('2','3',1)" onmouseout="showVote('2','3',1)" title="3"><div id="rm23" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[4].click()" onmouseover="showVote('2','4',1)" onmouseout="showVote('2','4',1)" title="4"><div id="rm24" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[5].click()" onmouseover="showVote('2','5',1)" onmouseout="showVote('2','5',1)" title="5"><div id="rm25" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[6].click()" onmouseover="showVote('2','6',1)" onmouseout="showVote('2','6',1)" title="6"><div id="rm26" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[7].click()" onmouseover="showVote('2','7',1)" onmouseout="showVote('2','7',1)" title="7"><div id="rm27" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[8].click()" onmouseover="showVote('2','8',1)" onmouseout="showVote('2','8',1)" title="8"><div id="rm28" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[9].click()" onmouseover="showVote('2','9',1)" onmouseout="showVote('2','9',1)" title="9"><div id="rm29" class="ratemodStandard"></div></a></td>
    <td align="center"><a href="javascript:document.form.rating[10].click()" onmouseover="showVote('2','10',1)" onmouseout="showVote('2','10',1)" title="Top - 10"><div id="rm210" class="ratemodStandard"></div></a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
   <td width="100%" height="25" align="center" valign="middle" class="row2" colspan="12">
    <INPUT type="hidden" name="action" value="rateimage" />
    <INPUT type="hidden" name="id" value="{image_id}" />
    <INPUT disabled type="submit" value="{rate}" class="button" name="submit" />
  </td>
 </tr>
 </table>
 <table border="0" cellspacing="0" cellpadding="0" style="DISPLAY: none">
  <tr>
    <td align="center">
      <input type="radio" name="rating" value="0" checked>&nbsp;
      <input type="radio" name="rating" value="1" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">1&nbsp;
      <input type="radio" name="rating" value="2" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">2&nbsp;
      <input type="radio" name="rating" value="3" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">3&nbsp;
      <input type="radio" name="rating" value="4" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">4&nbsp;
      <input type="radio" name="rating" value="5" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">5&nbsp;
      <input type="radio" name="rating" value="6" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">6&nbsp;
      <input type="radio" name="rating" value="7" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">7&nbsp;
      <input type="radio" name="rating" value="8" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">8&nbsp;
      <input type="radio" name="rating" value="9" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">9&nbsp;
      <input type="radio" name="rating" value="10" onClick="if(this.checked==true) { document.form.submit.disabled=false; } else { document.form.submit.disabled=true; }">10&nbsp;
     </td>
    </tr></form>
   </table>
  </td>
 </tr>
</table>
<!-- ######################################### End Mod Mouseover- hover Rateform #################################### -->


pozdrawiam Misiek




« Ostatnia zmiana: Lipiec 17, 2007, 12:53:09 wysłane przez andreoid » Zapisane
misiek.154
Użytkownik

*

Pomógł: +0/-0
Offline Offline

Wiadomości: 16

OS:
Windows XP
Browser:
Firefox 2.0.0.3



Zobacz profil
« Odpowiedz #1 : Lipiec 17, 2007, 09:53:12 »

Musiałem napisać jednego posta pod drugim bo w jednym poście się nie zmieściło.

Podaje kilka innych kolorów:

Niebieski:

Kod:
.ratemodStandard, .ratemod1hover, .ratemod2hover, .ratemod3hover, .ratemod4hover, .ratemod5hover, .ratemod6hover, .ratemod7hover, .ratemod8hover, .ratemod9hover, .ratemod10hover {
    background: #fff;
    width: 18px;
    height: 12px;
    float: center;
    margin-right: 1px;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod1hover, .ratemod2hover, .ratemodr {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #004669;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod3hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #005A87;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod4hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #006EA5;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod5hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #0082C3;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod6hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #0096E1;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod7hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #00AAFF;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod8hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #3CBEFF;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod9hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #78D2FF;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod10hover, .ratemodg {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF7C50;
    border: 1px solid #004C75;
    text-decoration: none;
}

Czerwony:

Kod:
/* RateMod */
.ratemodStandard, .ratemod1hover, .ratemod2hover, .ratemod3hover, .ratemod4hover, .ratemod5hover, .ratemod6hover, .ratemod7hover, .ratemod8hover, .ratemod9hover, .ratemod10hover {
    background: #fff;
    width: 18px;
    height: 12px;
    float: center;
    margin-right: 1px;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod1hover, .ratemod2hover, .ratemodr {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #690000;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod3hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #870000;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod4hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #A50000;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod5hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #C30000;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod6hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #E10000;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod7hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF0000;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod8hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF2828;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod9hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF5050;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod10hover, .ratemodg {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF7C50;
    border: 1px solid #004C75;
    text-decoration: none;
}

Zielony(standardowy przy instalacji)

Kod:
.ratemodStandard, .ratemod1hover, .ratemod2hover, .ratemod3hover, .ratemod4hover, .ratemod5hover, .ratemod6hover, .ratemod7hover, .ratemod8hover, .ratemod9hover, .ratemod10hover {
    background: #fff;
    width: 18px;
    height: 12px;
    float: center;
    margin-right: 1px;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod1hover, .ratemod2hover, .ratemodr {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #466900;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod3hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #5A8700;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod4hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #6EA500;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod5hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #82C300;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod6hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #96E100;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod7hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #AAFF00;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod8hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #BEFF3C;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod9hover, .ratemody {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #D2FF78;
    border: 1px solid #004C75;
    text-decoration: none;
}
.ratemod10hover, .ratemodg {
    cursor: hand;
    float: center;
    width: 18px;
    height: 12px;
    background: #FF7C50;
    border: 1px solid #004C75;
    text-decoration: none;
}

Pozdrawiam Misiek
« Ostatnia zmiana: Lipiec 17, 2007, 09:56:47 wysłane przez misiek.154 » Zapisane
Strony: [1] Do góry Drukuj 
« poprzedni następny »
Skocz do:  



Dziękuję
Dziękuję za odwiedzenie naszego serwisu, mam nadzieję że jesteś zadowolona/y z pomocy którą tutaj otrzymałaś/eś.
Było by nam miło, jeżeli w zamian za uzyskaną pomoc, wkleisz na swojej stronie link do naszego serwisu.

Serwis fotograficzny

lub
Foto forum


Życzymy Ci dalszych sukcesów w dziedzinie prezentacji internetowej,
oraz wielu odwiedzin internautów.
statystyki www stat.pl
Strona wygenerowana w 0.229 sekund z 20 zapytaniami.
Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Design by fotoan.com

wizytówki - yerba mate - Zdjęcia ślubne Poznań - Przecinarka taśmowa - pozycjonowanie - Domki w górach
Foto serwis © 2005-2007 fotoan.com