Module: Ratings
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
A simple photo ratings module - See full details here It can be found here
We need help from you, the community:
1) More hearts.png files - This is a weird file, and the PSD for photoshop is included
in the module zip file
It is a reverse transparent png (meaning only the center of the hearts are transparent)
We could use anything unique for our gallery!
These need to be same size/proportion/etc. as the the hearts.png for simplicity sakes
2) CSS needs to be tweaked to be more attractive. It's wrapped in a white box because
the hearts.png background is white. We're going to make this configurable, but still
need a more attractive solution.
3) A new module that uses that will use this data to allow viewing by
rankings / searching by ratings / etc.
Current issue working list: * Thanks! |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Not sure how you want to collaborate. Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Found a star image. Dave |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
Fantastic! There seem to be many open-source star icons we can use, I suppose that we can add our own star images if we edit the code? Also, will albums be able to sort by star ratings? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
post the star icons that you find that are similar to the ones in the images directory. Must be the same size/dimensions. Dave |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
floridave wrote:
Not sure how you want to collaborate. updated code... if you have suggestions on collaboration, let me know |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
Guys , just curious...what's the purpose of the ratings module if you can't sort an album by it? |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
skunker, to rate them of course! Seriously though, did you read this above in the original post: Quote:
It currently works, but is lacking any features at this point. We're working on that. |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
Hi jnash, |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
skunker and others: Quote:
what we need from you, the community: so the more the community gives the more the community gets. Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Some of the ideas that I have came up with: Dave |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
skunker wrote:
Hi jnash, I'm not taking it the wrong way, I just meant that we have to walk before we can run! Thanks for the feedback. James |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Dave, I've made the 'hearts' image configurable... (sort of, still working it - framework done though) However, the images you provided above are not drop in replacements, the image is off when displayed. However, I see that there are vars that must be set for the image being used on the msteigerwalt page. This may be difficult to code in if they aren't drop-in replacements... EDIT: it appears that the CSS would need modification as well if the images are swapped out. UNLESS the images are exact in dimensions (including the 'hearts')... So this should be added into the CSS part of the TO-DO's We really need a collaborative space for this... * The ratings.css and bottom of ratings.js both define where/how the icon image is placed and 'filled' * Should the 'search and sorts' be included in this module, or the search module modified/updated? I'm think this module as an 'option' in the blocks displayed. |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
NOTES GOING FORWARD: I bumped the version to 2, however, keep in mind that since quite a few things changed, the module should be completely removed and then reinstalled to get everything back on track... |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
However, the images you provided above are not drop in replacements, I figured one might be close. I was really hoping the community that has barked and barked so long for a module like this, that at least one member of this community would step up with the skills we don't have to do a simple image or two. I think that we should just use images that are the same dimensions to fit in the existing method for now. @collaboration: I will let you be the prime and I'll give code snippets as needed. I'll send you a email address as well. JUst keep the codex version up to date so I can work on the most recent version, unless you want to do a git gallery-contrib. I'm open to anything you want. Dave |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
if you guys give me a chance, I'll help out. This has been the busiest week for me thus far of the year. Stand by! |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Great, thanks! Dave, I added all the frameworks for the customization of the image and the word used (heart) in the text. So, we're set once we get some images to work with. I'm freezing things on my end for now, so feel free to go to town. James |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
Here are some custom stars I made. Just need to know what size they need to be for this module and how to implement them. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
skunker, What we need is images like the one provided 100x300px. Thanks! _____________________________________________ |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
Thanks Dave, will work on that tonight. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
I hope you guys get this to work as I really like this idea. Fingers crossed. Keep up the great work! |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
I did this icon up real quick as a drop-in replacement for hearts.png [img]http://codex.gallery2.org/images/5/59/Filmstrip.png[/img] - also - [img]http://codex.gallery2.org/images/3/35/Filmstrip-blk.png[/img] - also - [img]http://codex.gallery2.org/images/9/98/Filmstrip-gry.png[/img] |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
I also modified the css a bit to make things appear a bit better with the iconsets... So, new version up on the codex. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
New version is much easier to install. Thanks. It comes up in the modules list as Ratings and is Version 4. I still cant get it to work. I see the text under the photo saying "Ratings But I don't see any hearts and there is no-where to click. Have I missed something or done something wrong? Cheers |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Doh, made a mistake on version in the installer... I'll fix that and re-upload. Also, ensure that the directory is owned and readable by the webserver user. This may be why the hearts aren't showing up. (I re-did the perms in the zip as well, but double check) Bumped to v5 for a minor fix on display... |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
Now have V5 thanks. Permissions set in the rating directory and sub albums and files to 777 - is that what you meant? Still no hearts to click |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
hmmm Will have to troubleshoot somehow, let me think about it a bit. See if you can see them by browsing to: http://yourgalleryurl/modules/ratings/vendor/img/hearts.png |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
jnash - a couple of things. Yes, if I browse to that folder I can see the image. I should say that I have 4 websites with gallery installed - all are 3.0.2. but they have different themes, modules etc I have been trying your module on my own StAndrews theme and having limited success. Sorry about this. Maybe other folk are having more success ? You are doing great work. I have the utmost admiration for people who can write modules. Cheers (and goodnight) |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
One more piece, and maybe we can solve the first part: Go to your Admin->settings->advanced and tell me what you have for ratings/iconset I don't think it's a 3.0.2 issue, but we'll get there. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
It is a SQL issue. Dave |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
floridave, awesome catch on the error, fixed, and re-uploaded corrected - still v5 though, so reinstall. shug17: redownload and reinstall I like the UI design, now I just need to incorporate it. That's next I suppose. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
Blimey! do you guys never sleep? lol! Sorry to say the new update is still not working - I still can't see the hearts. They are there in the folder - I can browse and see them there but they just do not show up on the photo page. The module is nearly working on the left&right wind theme but is working less well on StAndrews theme. I wish I could help! |
|
jusie
Joined: 2007-06-21
Posts: 48 |
![]() |
Same problem here, I've just installed the latest version of the add-on but the images won't show up in my gallery - I've tried both hearts and stars, located under photo or in sidebar. The text appears but nothing to click on. I am on Gallery 3.0.2. I am very excited about this add-on and can't wait to get it to work! Sorry I am no good with graphics so I can't be of much help here |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
EDIT: I found a couple more db selects that weren't prefixed properly. Fixed and re-uploaded. Try this ver and see if it's still broke, and if so, please check your admin->settings->advanced and tell me what you have set for ratings->iconset Thanks Ver 6 up - these fixes and adds initial support for iconset selection. |
|
jusie
Joined: 2007-06-21
Posts: 48 |
![]() |
The value for 'iconset' is Looking at it, I just realised that the 'index.php/' is what makes the URL incorrect - the image is at I think that's it. In the source code of a gallery item page, I can see it uses the incorrect URL as background image in the <style> information. Another thing I've noticed is that when I set the rating to show in the sidebar, the ratings block displays twice. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
Hello, I see the changes in the settings menu but nothing has changed when I got to the photo page - still no graphic on the StAndrews Theme and only a coloured bar on the wind left&right theme. I am going to attach some grabs from the one website that is working better which uses the wind left&right theme. Hope this helps. Gonna go try it on one more gallery install with another different theme. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
Me again! tried v6 on a third gallery installation using a themroller theme and I get the block under the photo but no graphic or coloured dragable block. Hope this is all helping? |
|
jusie
Joined: 2007-06-21
Posts: 48 |
![]() |
shug17 wrote:
Me again! Check out the URL to the rating image in the source code of your page.... Perhaps the path in your gallery is wrong like it is in mine? |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
I will if you point me towards where I am looking. Thanks |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Okay, jusie, excellent catch. I think I can account for this in the code and make appropriate corrections. Give me a bit to work with it. |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Jusie, new file uploaded, give this one a shot. It removes the 'index.php' from the img URL Shug, I'm not sure what the issue is with yours, the URL looks good from your screenshot. Does it work on the wind theme? Also, what browser are you using? And, do you have a link to your website? (You can 'write to author' below to send it to me privately if you want) |
|
jusie
Joined: 2007-06-21
Posts: 48 |
![]() |
shug17 wrote:
I will if you point me towards where I am looking. Open the source code by right clicking anywhere on your page and in the context menu there is an option to show the source code. Search the HTML file for e.g. 'rabidRating' and you will find a bit that starts with <style> and contains a background image URL for the rating. |
|
jusie
Joined: 2007-06-21
Posts: 48 |
![]() |
jnash wrote:
Jusie, new file uploaded, give this one a shot. It removes the 'index.php' from the img URL Just downloaded and installed v6 - I think it removes the complete URL, not just 'index.php', lol! HTML source now contains: <style> .rabidRating .ratingStars { display: block; background: url('') no-repeat center; } </style>
Feel free to have a look at the source to see the 'ratingurl' that was constructed in my gallery. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
here is a link to the website with the wind left&right theme - the one that is nearly working. http://seangroat.co.uk/gallery3/index.php/animals/13437 I am using Firefox 12.0 Best wishes |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Okay, give v7 a try, if not, I'm going back to the drawing board for a while to rethink this out. This plugin is a pain to modify for gallery unfortunately. |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
I think I'm going to just rewrite the entire thing here soon. We're using a JS module from a third party, and it's integration into the gallery is a real PITA... I think if the functionality is brought in to a true G3 module, we may be better off. |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
I held off on doing any design work because I couldn't get it to work on my default theme. Also, the PSD was confusing. Jnash, let us know how we can help. Thanks, |
|
jusie
Joined: 2007-06-21
Posts: 48 |
![]() |
Sorry to hear this is turning out to be so difficult =/ I can try the latest version out tomorrow. But I guess if it is easier to start from scratch and create a clean new add-on, that might be the better option. |
|
shug17
Joined: 2009-01-10
Posts: 76 |
![]() |
Dinna do anything rash! It appears to be working on the wind left&right theme - the hearts are there and they change colour - just waiting to see if the database records it. Nope - the wee icon keeps spinning round and never stops. You are so close!! |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Think we got the image bug fixed up. Also found another instance of a bad url with index.php in it causing vote not to succeed. shug17, give v8 a shot. I've not given up yet, cause I can't find another good alternative to this script. Maybe I just need a break from it for a bit. Let's cross our fingers. Skunker, take a look at filmstrip.png and you'll get a better idea now hopefully on the graphics... Only thing to remember is the center of the 'star' needs to be transparent, and if I got this right, 2px side border, [20pxL x 20-30pxH star, 2px divider](x5 stars) and then 2px side border -- all this centered on a 100Hx300W background <- hopefully this makes some sense... |
|