Way to display star ratings permanently?

fbungarz
Posts: 3285
Joined: 08 Dec 06 5:03
Location: Galapagos, Ecuador

Way to display star ratings permanently?

Post by fbungarz » 12 Feb 13 4:29

Hi Hert,
Unlike IDI Pro 5 PSU shows only one single star when images are rated and displays the numbers of ratings applied by a minute, barely visible number.
With several images thumbs by side, all with different ratings, the minute numbers don't stand out at all !!!
This defies the purpose of ratings and makes it virtually impossible what ratings have been designed for: a very quick way to detect which picture inside a series of evaluated images is the best...
Is there any way how to customize PSU so that the number of stars of a rating are displayed side by side similar to IDI Pro 5?
Thanks,
Frank

Hert
Posts: 21344
Joined: 13 Sep 03 7:24

Re: Way to display star ratings permanently?

Post by Hert » 12 Feb 13 6:30

First of all, stop expecting PSU to be identical to IDI.

I agree that ratings could stand out more. Maybe a color for the star would help?
Of course you can always achieve a set of stars with a custom thumb line
Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

fbungarz
Posts: 3285
Joined: 08 Dec 06 5:03
Location: Galapagos, Ecuador

Re: Way to display star ratings permanently?

Post by fbungarz » 12 Feb 13 7:02

I agree that ratings could stand out more. Maybe a color for the star would help?
Yes, it would help some, but already the yellow star is a BIG problem on a yellow label. It does not stand out, and a red on a red label would not either. I know it looks sleek with the one star and numbers, but it defies the purpose...
Of course you can always achieve a set of stars with a custom thumb line
OK - that custom line seems to be something fantastic and new for everything that got eliminated, the versioning indicator for example. Problem: I have no idea how to do this....

Hert
Posts: 21344
Joined: 13 Sep 03 7:24

Re: Way to display star ratings permanently?

Post by Hert » 12 Feb 13 7:14

OK - that custom line seems to be something fantastic and new for everything that got eliminated, the versioning indicator for example. Problem: I have no idea how to do this....
Yes, the new custom thumb info *is* very powerful, and fast. This makes it a very useful tool for customizing thumbnails.

I did post a custom thumb line in the version bar topic. Maybe we can choose good colors for main and sub versions and paint ratings on top of that bar? What do you think?

Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

fbungarz
Posts: 3285
Joined: 08 Dec 06 5:03
Location: Galapagos, Ecuador

Re: Way to display star ratings permanently?

Post by fbungarz » 12 Feb 13 7:27

I did post a custom thumb line in the version bar topic. Maybe we can choose good colors for main and sub versions and paint ratings on top of that bar? What do you think?
Sounds good. Main version yellow, sub-version green was IDI's default, one, two, three, four, five black stars on that bar, why not...
Now, how to program that, still beyond me...

Hert
Posts: 21344
Joined: 13 Sep 03 7:24

Re: Way to display star ratings permanently?

Post by Hert » 12 Feb 13 7:59

How about this?

Code: Select all

%code
var
  ACatItem: TCatalogItem;
  ARatingColor: String;
  ARatingStar: String;
  ARatingOnStar: String;
  ARatingOffStar: String;
  i: Integer;
begin
  result := '';
  ARatingStar := 'M 303,419.883 L 299.600,422.354 L 300.909,426.369 L 297.501,423.890 ' +
               'L 294.086,426.369 L 295.394,422.354 L 292,419.883 L 296.193,419.883 ' +
               'L 297.501,415.890 L 298.801,419.883 L 303,419.883 Z';

  ACatItem := TCatalogItem.Create(nil);
  if Catalog.FindImageCombined (ImageItem, ACatItem, False, vptNone) then
  begin
    ARatingColor := '#CCCCCCCC';
    if ACatItem.IsVersion then
      result := '<body bgcolor="#8000FF00">'
    else if (ACatItem._MainVersionGUID = ACatItem.GUID) and (ACatItem.VersionCount > 0) then
      result := '<body bgcolor="#80FFFF00">';

    if result <> '' then
      ARatingColor := '#CC000000';

    result := result + '<font color="#000000"><ind y="2">';

    ARatingOnStar := '<img size="22" path="' + ARatingStar + '" pathfillcolor="' + ARatingColor + '">';
    ARatingOffStar := '<img size="22" path="' + ARatingStar + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + ARatingColor + '">';
    for i := 1 to ACatItem.Rating do
      result := result + ARatingOnStar;
    for i := ACatItem.Rating + 1 to 5 do
      result := result + ARatingOffStar;

    result := result + '</ind></font>'
    result := result + '</body>'
    ACatItem.Free;
  end;
end;
%/code
Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

fbungarz
Posts: 3285
Joined: 08 Dec 06 5:03
Location: Galapagos, Ecuador

Re: Way to display star ratings permanently?

Post by fbungarz » 12 Feb 13 8:30

Perfect!
Thanks,
Frank

Hert
Posts: 21344
Joined: 13 Sep 03 7:24

Re: Way to display star ratings permanently?

Post by Hert » 12 Feb 13 8:38

For others to see the result of this custom thumb script:
StarRatings.png
StarRatings.png (180.81 KiB) Viewed 6709 times
Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

danaltick
Posts: 663
Joined: 04 Aug 09 1:34
Location: St. Louis, Missouri USA

Re: Way to display star ratings permanently?

Post by danaltick » 12 Feb 13 19:51

I actually use the five thumb colors along with the stars to rate my images (e.g. 3 stars along with green color bar). It works quite well and makes my rated thumbs easily seen on the catalog viewer. I did the same thing in IDI and even in Bridge. I picked up this technique from "The DAM Book".

Dan

dwphoto
Posts: 36
Joined: 21 Dec 07 5:04
Location: Brisbane, QLD

Re: Way to display star ratings permanently?

Post by dwphoto » 27 Jun 13 7:34

Hi
I'm just new to PS but have been a long time IDI user.
I tried this script to customise my thumb view and it worked, however I'm getting some weird behaviour.
Firstly it worked ok:
Image

but then I started to get this:
Image

On a side note that might be related - I can't seem to use the versioning tool. I apply it to a folder with def versions and it searches then does nothing
Thanks for any help
Dean

David Grundy
Posts: 326
Joined: 13 May 07 16:40
Location: Hong Kong

Re: Way to display star ratings permanently?

Post by David Grundy » 27 Jun 13 17:40

Not wanting to distract from the question just asked, but on another side note ...

This reminded me to look at custom thumb info again. I didn't quite like Hert's way with the solid colour bars filled with stars, as I find it's a bit distracting when the colour bar is brighter than the image, and I also find that my eyes are slow to interpret the meaning where sometimes the dark stars are the ones that matter, and other times the light stars are the ones that matter (in Hert's colour scheme).

So my mod this evening from Hert's code:
thumbs stars.jpg
thumbs stars.jpg (39.78 KiB) Viewed 6536 times

Code: Select all

%code
var
  ACatItem: TCatalogItem;
  ARatingColor: String;
  ARatingStar: String;
  ARatingOnStar: String;
  ARatingOffStar: String;
  i: Integer;
begin
  result := '';
  ARatingStar := 'M 303,419.883 L 299.600,422.354 L 300.909,426.369 L 297.501,423.890 ' +
               'L 294.086,426.369 L 295.394,422.354 L 292,419.883 L 296.193,419.883 ' +
               'L 297.501,415.890 L 298.801,419.883 L 303,419.883 Z';

  ACatItem := TCatalogItem.Create(nil);
  if Catalog.FindImageCombined (ImageItem, ACatItem, False, vptNone) then
  begin
    ARatingColor := '#CCCCCCC';
    if ACatItem.IsVersion then
     ARatingColor := '#F000FF00';
    if (ACatItem._MainVersionGUID = ACatItem.GUID) and (ACatItem.VersionCount > 0) then
     ARatingColor := '#CCFF00FF';

    result := result + '<font color="'+ ARatingColor +'"><ind y="2">';

    ARatingOnStar := '<img size="22" path="' + ARatingStar + '" pathfillcolor="' + ARatingColor + '">';
    ARatingOffStar := '<img size="22" path="' + ARatingStar + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + ARatingColor + '">';
    for i := 1 to ACatItem.Rating do
      result := result + ARatingOnStar;
    for i := ACatItem.Rating + 1 to 5 do
      result := result + ARatingOffStar;

    result := result + '</ind></font>'

    ACatItem.Free;
  end;
end;
%/code



dwphoto
Posts: 36
Joined: 21 Dec 07 5:04
Location: Brisbane, QLD

Re: Way to display star ratings permanently?

Post by dwphoto » 28 Jun 13 4:47

Hi David, since you posted and seem to know a little about coding, I don't suppose you know what's going on with the problem I'm experiencing.
I like what you've done with the coloured stars and tried your code, but unfortunately I'm still getting the weird behaviour.
Thanks, Dean

weidmic
moderator
Posts: 4468
Joined: 04 Dec 06 22:21

Re: Way to display star ratings permanently?

Post by weidmic » 28 Jun 13 6:19

Have you tried a compact and repair? (Preferences/Catalog)
PSUServer 4.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

Hert
Posts: 21344
Joined: 13 Sep 03 7:24

Re: Way to display star ratings permanently?

Post by Hert » 28 Jun 13 9:13

David,

I like what you've done with the script. Very nice output.
But the ACatItem.Free; call should be place outside the if-then block.

@dean; you're getting a script run-time error. Are you sure you've copied/pasted the script correctly?
Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

David Grundy
Posts: 326
Joined: 13 May 07 16:40
Location: Hong Kong

Re: Way to display star ratings permanently?

Post by David Grundy » 28 Jun 13 15:25

Thanks Hert for the comment and the correction.

For completeness then, code corrected for that error:

Code: Select all

%code
var
  ACatItem: TCatalogItem;
  ARatingColor: String;
  ARatingStar: String;
  ARatingOnStar: String;
  ARatingOffStar: String;
  i: Integer;
begin
  result := '';
  ARatingStar := 'M 303,419.883 L 299.600,422.354 L 300.909,426.369 L 297.501,423.890 ' +
               'L 294.086,426.369 L 295.394,422.354 L 292,419.883 L 296.193,419.883 ' +
               'L 297.501,415.890 L 298.801,419.883 L 303,419.883 Z';
  ACatItem := TCatalogItem.Create(nil);
  if Catalog.FindImageCombined (ImageItem, ACatItem, False, vptNone) then
  begin
    ARatingColor := '#CCCCCCC';
    if ACatItem.IsVersion then
      ARatingColor := '#FF40FF40';
    if (ACatItem._MainVersionGUID = ACatItem.GUID) and (ACatItem.VersionCount > 0) then
      ARatingColor := '#CCFF00FF';

    result := result + '<font color="'+ ARatingColor +'"><ind y="2">';

    ARatingOnStar := '<img size="22" path="' + ARatingStar + '" pathfillcolor="' + ARatingColor + '">';
    ARatingOffStar := '<img size="22" path="' + ARatingStar + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + ARatingColor + '">';

    for i := 1 to ACatItem.Rating do
      result := result + ARatingOnStar;
    for i := ACatItem.Rating + 1 to 5 do
      result := result + ARatingOffStar;

    result := result + '</ind></font>'
  end;
  ACatItem.Free;
end;
%/code
Dean, it's lucky Hert rejoined the conversation as I'm a scripting newbie. I can proceed only by analogy with sample code, and don't really know anything much about the script language as yet.

... David

Post Reply