Fooblog2000 Forums » Configuration Support

Costum Rating Images

(8 posts)

  1. x10s
    Member

    If i change:
    // Other Images used
    $puts(speakerpic,$getpvar(dir)\speaker-1.png)
    $puts(heartpic,$getpvar(dir)\heart-1.png)
    $puts(starpic,$getpvar(dir)\star3.png)

    &
    // Ratings images
    $if(%RATING%,
    $if($greater(%RATING%,4),
    // If Rating > 4 show HEART image
    $imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(heartpic),NOKEEPASPECT) ,
    // Else show STAR
    $imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(starpic),NOKEEPASPECT)))

    into:
    // Other Images used
    $puts(speakerpic,$getpvar(dir)\speaker-1.png)
    $puts(rate-0pic,$getpvar(dir)\rate-0.png)
    $puts(rate-1pic,$getpvar(dir)\rate-1.png)
    $puts(rate-2pic,$getpvar(dir)\rate-2.png)
    $puts(rate-3pic,$getpvar(dir)\rate-3.png)
    $puts(rate-4pic,$getpvar(dir)\rate-4.png)
    $puts(rate-5pic,$getpvar(dir)\rate-5.png)

    &
    // Ratings images
    $if(%RATING%,
    $if($equal(%RATING%,1),
    $if($equal(%RATING%,2),
    $if($equal(%RATING%,3),
    $if($equal(%RATING%,4),
    $if($greater(%RATING%,4),
    ,$imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(rate-1pic),NOKEEPASPECT)
    ,$imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(rate-2pic),NOKEEPASPECT)
    ,$imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(rate-3pic),NOKEEPASPECT)
    ,$imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(rate-4pic),NOKEEPASPECT)
    ,$imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(rate-5pic),NOKEEPASPECT)
    // Else show RATE-0
    ,$imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(rate-0pic),NOKEEPASPECT)
    ))))))

    Why doesn't this work?
    The images are present...,
    Is there something wrong with my syntax?

    Thx in Advance :p

    PS: Trick o/t day for those with doublecds etc:
    // *** IMAGE SOURCES & LOCATION***
    $select($eval($getpvar(sort.mode)+1),
    $puts(albumartsrc,
    $if($fileexists($replace(%path%,%filename_ext%,folder.*)),
    $replace(%path%,%filename_ext%,folder.*),
    $replace(%_path%,$if(%disc%,%directoryname%'\')%filename_ext%,**.jpg))
    )

    Posted 3 years ago #
  2. x10s
    Member

    Hmm quit confusing:
    $ifgreater(n1,n2,then,else)
    $ifequal(n1,n2,then,else)
    and
    $greater(a,b)
    but
    $equal(a,b) doesn't exist

    Posted 3 years ago #
  3. Many times I have wanted to use $equal(a,b) :(

    Posted 3 years ago #
  4. x10s
    Member

    Wouldn't it work with $ifequal(n1,n2,then,else) ?
    I'm not that good with code....

    Posted 3 years ago #
  5. Check out the new config version for a better rating system.

    Posted 3 years ago #
  6. x10s
    Member

    0.6 is looking nice.
    Gonna study on your code to implement the above :p

    I really like to have different stars for low-high ratings in the SCPL. :p

    Posted 3 years ago #
  7. VivaGardner
    Member

    Hey:

    I need some help with some code. Right now my panels playlist displays a star when a song is rated anything other than a 5. For songs with a 5 rating, it displays a heart.

    This is the code now:

    [quote]
    // Ratings images
    $if(%RATING%,
    $if($greater(%RATING%,4),
    // If Rating > 4 show HEART image
    $imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(heartpic),NOKEEPASPECT)
    ,
    // Else show STAR
    $imageabs2($eval({$get(textleft)*2}+24),,,,,,,,$get(starpic),NOKEEPASPECT)
    )
    )
    [/quote]

    I would like to have a smile for songs with a 3 rating. I added the location in the global theme settings but I don't know how to edit the code so that it displays the image.

    So in conclusion I want songs with ratings of 5 to give a heart image, 4 a star, 3 a smile... and maybe anything else could be a different pic (I'll add it later).

    So if anyone could tell me how to properly word the coding that would be awesome. I haven't been able to figure out a working string.

    Posted 3 years ago #
  8. t
    Member

    man this is impossible to do

    u have to have an if/then statement, so x10s's way of putting many 'if's and 1 'then' does not work, u seem to have to put a 'then' statement for each 'if'.

    and repeating fofr's code with different ratings does not work either because it simply puts another star over the previous one.

    u really have to try this for it to make any sense...

    as long as i can't use any kind of 'equal' statement, then this cannot be done

    anyway, fofr, or someone else equally proficient with coding, how r we to add our own images to ratings? i give up

    Posted 3 years ago #

Rate Topic:
RSS feed for this topic

Reply

You must log in to post.