• [MOD] Ajax Star Rating. Rate images without page reload, like on youtube etc. 4 0 5 1
Currently:  

Author Topic: [MOD] Ajax Star Rating. Rate images without page reload, like on youtube etc.  (Read 123749 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
@ Bash-T,
klasse Arbeit :D!!!!!!

@ mawenzi,
im Prinzip wurde bestätigt das die Modifikation läuft:
Saubere Arbeit.
Danke für deine Tolle Hilfe und für die Super Mod.
Habs in meiner Liste aufgenommen:
http://www.4homepages.de/forum/index.php?topic=24888.0

Ich hatte ein Fehler gemacht! Die Modifikation läuft und auch sehr stabil!
Darum habe ich es in meiner Liste aufgenommen, da sich dort nur getestete Modifikationen befinden!

Offline waynenort

  • Newbie
  • *
  • Posts: 21
    • View Profile
Nice one Bash-T.  :D

Great job.  I've given your mod a 5 star rating  :wink:

Cheers, Wayne

Offline bash-t

  • Newbie
  • *
  • Posts: 20
    • View Profile
I made an enhancement by request of "eeyipes" for my Ajax Star Rating Mod.

With the instructions described here: http://www.4homepages.de/forum/index.php?topic=25666.msg140435#msg140435 you will be able to have starRating-Elements not even on the details page, but on the categories and index page aswell.

Soon I will release a version 1.1 and put the changes onto the 1st post of this thread, but until then, please stick to the instructions in the given link.

Regards,
Bash-T
4images Version: 1.7.7

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Ajax Star Rating. Rate images without page reload, like on youtube etc.
« Reply #18 on: September 24, 2009, 03:59:18 PM »
Hi,

ist es auch möglich eventuell ein Rating Script zu schreiben, was auf dem Fishey-Menü aufbaut?
http://demos.dojotoolkit.org/demos/fisheye/

Das wäre ja mal was richtig geiles!

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: [MOD] Ajax Star Rating. Rate images without page reload, like on youtube etc.
« Reply #19 on: September 25, 2009, 10:11:12 AM »
Hi,

Can help me!

How to make to a user can only vote if make a comment?

Thanks and sorry the english.
www.globalfoto.net

Sintra - Portugal

Offline bash-t

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: [MOD] Ajax Star Rating. Rate images without page reload, like on youtube etc.
« Reply #20 on: September 25, 2009, 01:34:55 PM »
Hi,

ist es auch möglich eventuell ein Rating Script zu schreiben, was auf dem Fishey-Menü aufbaut?
http://demos.dojotoolkit.org/demos/fisheye/

Das wäre ja mal was richtig geiles!

Hallo!

Das ist mit Sicherheit möglich, allerdings verwendet das Fisheye Menü das Dojo-Toolkit. Diese Javascript API ist mir gänzlich unbekannt, weswegen sich dies jemand anschauen müsste, der sich damit auskennt ;)

Grüße
4images Version: 1.7.7

Rembrandt

  • Guest
Re: [MOD] Ajax Star Rating. Rate images without page reload, like on youtube etc.
« Reply #21 on: September 25, 2009, 01:52:13 PM »
...
Hallo!

Das ist mit Sicherheit möglich, allerdings verwendet das Fisheye Menü das Dojo-Toolkit. Diese Javascript API ist mir gänzlich unbekannt, weswegen sich dies jemand anschauen müsste, der sich damit auskennt ;)

Grüße

unter den namen fisheye war mir das gänzlich unbekannt, man findet diese javascripts eher unter den bekannten namen "Mac style menu"oder "mac style menu flash".
@bash-t, wenn dú vielleicht mal zeit dazu und lust hättest?  :mrgreen:
meine wünsche dazu: vertical und horizontal, den bogen in grad einstellbar, oder zumindest nach oben, mitte und unten, analog bei der verticalen version.  :D

mfg Andi

Offline bash-t

  • Newbie
  • *
  • Posts: 20
    • View Profile
Hallo zusammen!

@Andy: Wie Du anhand meiner Reaktionszeit feststellen kannst habe ich leider momentan keine Zeit dazu, Deinen Wünschen bzgl. des Mac-Style Menues nachzukommen :-/

Ich habe beruflich viel mit der YUI zu tun, weswegen ich diese auch für das hier gezeigte Ajax Star Rating verwendet habe.

Die Dojo-API ist mir allerdings gänzlich unbekannt. Daher, und aus dem Grund, dass ich zur Zeit kaum Freizeit habe - um mich da rein zu arbeiten - meinte ich: Falls sich jemand mit dem Dojo-Toolkit auskennt, dann kann derjenige gerne das MOD hier als Grundlage nehmen :-)

Viele Grüße und bis bald,
Bash-T
4images Version: 1.7.7

Offline winracer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Help Me With Perl
here is the english translate

Code: [Select]
//-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START------------------------------------------------
$lang['ajax_rating_labels'] = array (
0 => "Not Yet Rated",
1 => "desolation",
2 => "Nothing special",
3 => "Worth",
4 => "Real cool",
5 => "Excellent!"
);
$lang['ajax_rating_messages'] = array (
0 => "vote invalid", //voting_error
1 => "Thank you for your vote!", // voting_success
2 => "You have already rated this image.", //already_voted
3 => "Some ratings are disabled for this image."
);
$lang['ajax_rating_points'] = "Score";
//-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//--------------------------------------------------END
winracer

Offline Habi86

  • Newbie
  • *
  • Posts: 46
    • View Profile
HI  :D

Der Mod ist einsame klasse  :!: :!: :!:
Hab mich total darüber gefreut und gleich den alten gelöscht  :roll:
Funktionierte auch gleich auf anhieb ^_^  :)

Nur eine kleine Frage ^^
Da ist doch was falsch oder x_x bei der Demo hab ich auch geguckt

Hab ich was überlesen?

Angezeigt werden 4 rote Sterne obwohl es 5.00 Punkte sind ?_? da sollten doch auch 5 rote Sterne angezeigt werden - oder nicht?

Kann das jemand einem Noob erklären bitte  :lol:


Liebe Grüße & weiter so  :!:
Habi
« Last Edit: November 20, 2009, 06:58:47 PM by Habi86 »

Offline winracer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Help Me With Perl
HI  :D

Der Mod ist einsame klasse  :!: :!: :!:
Hab mich total darüber gefreut und gleich den alten gelöscht  :roll:
Funktionierte auch gleich auf anhieb ^_^  :)

Nur eine kleine Frage ^^
Da ist doch was falsch oder x_x bei der Demo hab ich auch geguckt

Hab ich was überlesen?

Angezeigt werden 4 rote Sterne obwohl es 5.00 Punkte sind ?_? da sollten doch auch 5 rote Sterne angezeigt werden - oder nicht?

Kann das jemand einem Noob erklären bitte  :lol:


Liebe Grüße & weiter so  :!:
Habi





I had same trouble on found out that I had this code below on more then just the details.html page. I also had it in the header.html. page the home.html and the catrgories page. check al them and see if it is in more then one place
Code: [Select]
<!-- ----------------------------------------------- -->
<!-- [MOD] Ajax Star Rating -------------- by Bash-T -->
<!-- START ----------------------------------------- -->
<script type="text/javascript">
YAHOO.namespace('rating');
YAHOO.rating.star={
display_percentage : true, //set to true if a percentaged value shall be shown beneath the stars.
display_lables: true, //set to true if a ranking label shall be displayed beneath the stars at mouseover.
//do not modify the properties below!
num : 0,
successfully_voted : false,
labels : [ '{ajax_rating_labels_0}' , '{ajax_rating_labels_1}', '{ajax_rating_labels_2}', '{ajax_rating_labels_3}', '{ajax_rating_labels_4}', '{ajax_rating_labels_5}'],
msgs : [ '{ajax_rating_messages_0}' , '{ajax_rating_messages_1}', '{ajax_rating_messages_2}']
};
</script>
<script type="text/javascript" src="scripts/ajaxrating.js"></script>
<!-- ----------------------------------------------- -->
<!-- [MOD] Ajax Star Rating -------------- by Bash-T -->
<!-- END ----------------------------------------- -->

the only trouble i am having is  that if not login then beside the stars will display "Some ratings are disabled for this image."
winracer

Offline bash-t

  • Newbie
  • *
  • Posts: 20
    • View Profile
HI  :D

Der Mod ist einsame klasse  :!: :!: :!:
Hab mich total darüber gefreut und gleich den alten gelöscht  :roll:
Funktionierte auch gleich auf anhieb ^_^  :)

Nur eine kleine Frage ^^
Da ist doch was falsch oder x_x bei der Demo hab ich auch geguckt

Hab ich was überlesen?

Angezeigt werden 4 rote Sterne obwohl es 5.00 Punkte sind ?_? da sollten doch auch 5 rote Sterne angezeigt werden - oder nicht?

Kann das jemand einem Noob erklären bitte  :lol:


Liebe Grüße & weiter so  :!:
Habi

Hallo,

ich gebe zu es in in Deinem Beispiel etwas irritierend. Der Grund ist, dass die Punktanzeige Dezimalwerte sind, die mit mindestens 1,0 beginnen.
Am deutlichsten wird es mit einem Beispiel:
- Füllst Du den ersten Stern halb auf, so steht dort 1,5 Punkte, obwohl eigentlich nur ein halber Stern ausgefüllt ist.
- In Deinem Beispiel sind sind genau 4 Sterne voll, also fängt der 5. Stern sich gerade an zu füllen - also steht dort eine 5,0.
- Der höchste Wert, der demnach jemals erreicht werden kann sind 5 gefüllte Sterne. Das entspricht einem Wert von 5,99.


Ich hoffe das war nun verständlich :)

Viele Grüße,
Bash-T
4images Version: 1.7.7

Offline Habi86

  • Newbie
  • *
  • Posts: 46
    • View Profile
Hallo,

ich gebe zu es in in Deinem Beispiel etwas irritierend. Der Grund ist, dass die Punktanzeige Dezimalwerte sind, die mit mindestens 1,0 beginnen.
Am deutlichsten wird es mit einem Beispiel:
- Füllst Du den ersten Stern halb auf, so steht dort 1,5 Punkte, obwohl eigentlich nur ein halber Stern ausgefüllt ist.
- In Deinem Beispiel sind sind genau 4 Sterne voll, also fängt der 5. Stern sich gerade an zu füllen - also steht dort eine 5,0.
- Der höchste Wert, der demnach jemals erreicht werden kann sind 5 gefüllte Sterne. Das entspricht einem Wert von 5,99.


Ich hoffe das war nun verständlich :)

Viele Grüße,
Bash-T

Achsoooooo ist das aufgebaut - klar halben stern gibts ja nicht - na hoffentlich haben meine mitglieder eine ruhige hand um 5,99 zu werten  :lol:
Ich glaub am Best ich erkläre das dann auch auf meiner Hauptseite ^_^

Danke für die schnelle Antwort und *spamhug* für den tollen Mod den du gezaubert hast :)


@winracer thanks for your answer too ^_^ sry cant help you with your problem =/ maybe you set the rights wrong in ACP for guests?



Offline tirakle

  • Newbie
  • *
  • Posts: 26
    • View Profile
langsam macht sich bei mir die verzweiflung breit.
habe den mod nun x-mal installiert und bin mir sicher, dass alles passt. ich habe aber immer das selbe problem:

die sterne werden blau angezeigt. wenn ich mit dem coursor darüber fahre verändern sie auch die farbe. ein text wie z.b. "noch nicht bewertet" wird allerdings nicht angezeigt. außerdem kann ich nicht speichern bzw. bewerten. es bleibt immer beo 0 Stimmen und 0 Punkt.

an was kann das liegen ?

ich nutzt 1.7.7. und habe das script in einem unterverzeichnis am laufen.

weiß jemand rat ?

Offline Marcovich

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • High Definition Wallpapers
I have problem, please help me!
2 scripts does not working together for some reason, i'll exaplain.
I have menu and rating with javascript (Menu of downloads & Share & details- see picture).

I try to find the good place to put each code that both will work, but i dont know how..

Picture 1: Menu is not working



here the code:
Code: [Select]
<head>

<title>{image_name} High Definition Wallpaper, HD Wallpaper</title>


<META NAME="Description" CONTENT="{image_name} High Definition Wallpaper, click now and find more High Definition Wallpapers of {image_name} and much more">


<base href="http://www.backgroundscity.net">

<link rel="shortcut icon" href="{template_url}/images/icon1.ico">


<script src="/stats/?js" type="text/javascript"></script>

<meta http-equiv="content-type" content="text/html; charset={charset}" />

<script src="http://cdn.gigya.com/wildfire/js/wfapiv2.js"></script>

<script type="text/javascript">

function highlight(field) {
        field.focus();
        field.select();
}
</script>


<link type="text/css" href="{template_url}/css/flick/jquery-ui-1.7.2.custom.css" rel="stylesheet" />



<script type="text/javascript" src="{template_url}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{template_url}/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
$(function(){


// Tabs
$('#tabs').tabs();



//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
function() { $(this).addClass('ui-state-hover'); },
function() { $(this).removeClass('ui-state-hover'); }
);

});
</script>


<style type="text/css">
/*demo page css*/
body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
.demoHeaders { margin-top: 2em; }
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
ul#icons {margin: 0; padding: 0;}
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
ul#icons span.ui-icon {float: left; margin: 0 4px;}
</style>





<link rel="stylesheet" href="{template_url}/style.css" />

<!-- ----------------------------------------------- -->
<!-- [MOD] Ajax Star Rating -------------- by Bash-T -->
<!-- START ----------------------------------------- -->
<script type="text/javascript" src="scripts/yui/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="scripts/yui/2.7.0/build/json/json-min.js"></script>
<script type="text/javascript" src="scripts/yui/2.7.0/build/connection/connection-min.js"></script>
<!-- ----------------------------------------------- -->
<!-- [MOD] Ajax Star Rating -------------- by Bash-T -->
<!-- END ----------------------------------------- -->

<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START----------------------------------------------->
<script type="text/javascript">
YAHOO.namespace('rating');
YAHOO.rating.star={
display_percentage : false, //set to true if a percentaged value shall be shown beneath the stars.
display_lables: true, //set to true if a ranking label shall be displayed beneath the stars at mouseover.
//do not modify the properties below!
num : {image_id},
successfully_voted : false,
labels : [ '{ajax_rating_labels_0}' , '{ajax_rating_labels_1}', '{ajax_rating_labels_2}', '{ajax_rating_labels_3}', '{ajax_rating_labels_4}', '{ajax_rating_labels_5}'],
msgs : [ '{ajax_rating_messages_0}' , '{ajax_rating_messages_1}', '{ajax_rating_messages_2}']
};
</script>
<script type="text/javascript" src="scripts/ajaxrating.js"></script>
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//-----------------------------------------------END-->

{if has_rss}

<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />

{endif has_rss}

</head>

Picture 2: Rating star isnt working ([COLOR="RoyalBlue"]see online:[/COLOR] http://www.backgroundscity.net/lions_112/lion-closeup-by-ng-25433.htm)

[SIZE="5"]you can see the stars but they arent working![/SIZE]



Code: [Select]
<head>

<title>{image_name} High Definition Wallpaper, HD Wallpaper</title>


<META NAME="Description" CONTENT="{image_name} High Definition Wallpaper, click now and find more High Definition Wallpapers of {image_name} and much more">


<base href="http://www.backgroundscity.net">

<link rel="shortcut icon" href="{template_url}/images/icon1.ico">


<script src="/stats/?js" type="text/javascript"></script>

<meta http-equiv="content-type" content="text/html; charset={charset}" />

<script src="http://cdn.gigya.com/wildfire/js/wfapiv2.js"></script>

<script type="text/javascript">

function highlight(field) {
        field.focus();
        field.select();
}
</script>


<link type="text/css" href="{template_url}/css/flick/jquery-ui-1.7.2.custom.css" rel="stylesheet" />

<!-- ----------------------------------------------- -->
<!-- [MOD] Ajax Star Rating -------------- by Bash-T -->
<!-- START ----------------------------------------- -->
<script type="text/javascript" src="scripts/yui/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="scripts/yui/2.7.0/build/json/json-min.js"></script>
<script type="text/javascript" src="scripts/yui/2.7.0/build/connection/connection-min.js"></script>
<!-- ----------------------------------------------- -->
<!-- [MOD] Ajax Star Rating -------------- by Bash-T -->
<!-- END ----------------------------------------- -->

<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START----------------------------------------------->
<script type="text/javascript">
YAHOO.namespace('rating');
YAHOO.rating.star={
display_percentage : false, //set to true if a percentaged value shall be shown beneath the stars.
display_lables: true, //set to true if a ranking label shall be displayed beneath the stars at mouseover.
//do not modify the properties below!
num : {image_id},
successfully_voted : false,
labels : [ '{ajax_rating_labels_0}' , '{ajax_rating_labels_1}', '{ajax_rating_labels_2}', '{ajax_rating_labels_3}', '{ajax_rating_labels_4}', '{ajax_rating_labels_5}'],
msgs : [ '{ajax_rating_messages_0}' , '{ajax_rating_messages_1}', '{ajax_rating_messages_2}']
};
</script>
<script type="text/javascript" src="scripts/ajaxrating.js"></script>
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//-----------------------------------------------END-->


<script type="text/javascript" src="{template_url}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{template_url}/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
$(function(){


// Tabs
$('#tabs').tabs();



//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
function() { $(this).addClass('ui-state-hover'); },
function() { $(this).removeClass('ui-state-hover'); }
);

});
</script>


<style type="text/css">
/*demo page css*/
body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
.demoHeaders { margin-top: 2em; }
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
ul#icons {margin: 0; padding: 0;}
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
ul#icons span.ui-icon {float: left; margin: 0 4px;}
</style>





<link rel="stylesheet" href="{template_url}/style.css" />


{if has_rss}

<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />

{endif has_rss}

</head>

Please, help!?