For those who like a functional rating bar

Hert
Posts: 7928
Joined: 13 Sep 03 6:24

For those who like a functional rating bar

Post by Hert »

Use the script below as a custom thumb line (click the View button in upper right corner) to get a fully functional rating bar;

http://repository.idimager.com/openreso ... D198B0A7B8

Here's a screenshot
ratings.png
ratings.png (310.85 KiB) Viewed 9197 times
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
weidmic
moderator
Posts: 861
Joined: 04 Dec 06 21:21

Re: For those who like a functional rating bar

Post by weidmic »

COOOL!
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
weidmic
moderator
Posts: 861
Joined: 04 Dec 06 21:21

Re: For those who like a functional rating bar

Post by weidmic »

Hert,
it works. But there seems to be a little bug.
When using the rating bar, images stay in sync...

Cheers,
Michael

P.S.: I have set PSU to not write automatically catalog changes to the image file.
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
Hert
Posts: 7928
Joined: 13 Sep 03 6:24

Re: For those who like a functional rating bar

Post by Hert »

Great, I've updated the script in the opening post. tnx
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
sanphotgn
Posts: 336
Joined: 26 Aug 07 17:06

Re: For those who like a functional rating bar

Post by sanphotgn »

I copied the latest updated script. Note the stars are clipped. Using PSU 4. Thanks.

Ratings.PNG
Ratings.PNG (14.37 KiB) Viewed 9356 times
Photo Supreme 6.7.2.4201 (64 bits) (Windows)
weidmic
moderator
Posts: 861
Joined: 04 Dec 06 21:21

Re: For those who like a functional rating bar

Post by weidmic »

May I suggest to create a new main-topic in the tips for working with photo supreme where everyone can add his scripts and snippets - (no dicusions) - just scripts and the description? This script might otherwise go lost in the abandance of posts!

Everyone could add scripts as I could add my custom thumb script, the script you wrote me for the labels etc.
It might be a great source, additionally to the script repository...

Even with some write protection for new users or post approval...
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
weidmic
moderator
Posts: 861
Joined: 04 Dec 06 21:21

Re: For those who like a functional rating bar

Post by weidmic »

Sanphotgn,

I can see a small A in the last row. What is that for?
Maybe you can exchange the two lines and put the rating bar in the last line...
Attachments
rating bar.PNG
rating bar.PNG (245.18 KiB) Viewed 9350 times
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
RobiWan
moderator
Posts: 243
Joined: 03 Nov 17 8:14

Re: For those who like a functional rating bar

Post by RobiWan »

Hi,

I believe I'm doing something wrong.
I have removed the 2 lines and with copy/ paste inserted the code. Then I receive "Runtime Error. Access violation"
Attachments
19-02-_2018_17-47-21.png
19-02-_2018_17-47-21.png (85.49 KiB) Viewed 9334 times
Cheers, Robert

PSU V2025 Single User, Windows 11/MacOS . PSU V2025 PostgreSQL on Debian Linux Server
Hert
Posts: 7928
Joined: 13 Sep 03 6:24

Re: For those who like a functional rating bar

Post by Hert »

Best to use the drop down -> Remove Line, then paste the entire script. You'll only see part of it in the line field but it should work as soon as you leave the line
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
RobiWan
moderator
Posts: 243
Joined: 03 Nov 17 8:14

Re: For those who like a functional rating bar

Post by RobiWan »

I do not know why but now it works.

Is there a way to display date as well as the file name in the first line?
Cheers, Robert

PSU V2025 Single User, Windows 11/MacOS . PSU V2025 PostgreSQL on Debian Linux Server
sanphotgn
Posts: 336
Joined: 26 Aug 07 17:06

Re: For those who like a functional rating bar

Post by sanphotgn »

weidmic wrote: 19 Feb 18 15:54 Sanphotgn,

I can see a small A in the last row. What is that for?
Maybe you can exchange the two lines and put the rating bar in the last line...
The small A is the file name:

Code: Select all

<font size="14" family="arial" color="white">%FileName</font>
This is my test database where I try out stuff.

Result of moving the functional rating bar script to the lower row:

RatingsBottomRow.PNG
RatingsBottomRow.PNG (13.55 KiB) Viewed 9294 times
Photo Supreme 6.7.2.4201 (64 bits) (Windows)
weidmic
moderator
Posts: 861
Joined: 04 Dec 06 21:21

Re: For those who like a functional rating bar

Post by weidmic »

yeah, I see :)

I think my stars are way smaller. Propably relatet to the screen resolution.
My screens are all 4k...
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
jgodfrey
moderator
Posts: 601
Joined: 17 Dec 05 4:03
Location: Missouri (USA)

Re: For those who like a functional rating bar

Post by jgodfrey »

While I didn't analyze this script closely, reducing the "size=22" values in the following 4 lines seem to eliminate the star clipping. In my case, going down to just "size=20" fixed the clipping, though you can go smaller if necessary.

Code: Select all

      ARatingNoOnStar   := '<a href="' + ARatingAnchorHref + '"><img title="no rating" size="22" path="' + ARatingStar + '" pathfillcolor="' + ARatingNoColor + '" pathstrokestyle="solid" pathstrokecolor="' + ARatingNoColor + '"></a>';
      ARatingNoOffStar  := '<a href="' + ARatingAnchorHref + '"><img size="22" path="' + ARatingStar + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + ARatingNoColor  + '"></a>';
      ARatingOnStar     := '<a href="' + ARatingAnchorHref + '"><img size="22" path="' + ARatingStar + '" pathfillcolor="' + ARatingColor + '" pathstrokestyle="solid" pathstrokecolor="' + ARatingColor + '"></a>';
      ARatingOffStar    := '<a href="' + ARatingAnchorHref + '"><img size="22" path="' + ARatingStar + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + ARatingColor + '"></a>';
sanphotgn
Posts: 336
Joined: 26 Aug 07 17:06

Re: For those who like a functional rating bar

Post by sanphotgn »

jgodfrey - Thank you! Works. I had to go down to "size=18".
Photo Supreme 6.7.2.4201 (64 bits) (Windows)
Hert
Posts: 7928
Joined: 13 Sep 03 6:24

Re: For those who like a functional rating bar

Post by Hert »

The size indeed should have been "18". The images in HTML didn't scale to high DPI and so different resolutions could need different sizes. That is corrected in build 1023 which is now available. A size of "18" should fit all.
The opening script is updated.
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Post Reply