voting under the thumbnail voting under the thumbnail
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

voting under the thumbnail

Started by nickfzx, December 04, 2006, 02:58:34 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

nickfzx

hey Vuud

how hard would it be to have a little vote thing under the thumbnails...it wouldnt have to be the 6 images like it is in coppermine it could use css like so:

http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/

to keep it compact.

The whole rating thing would have to appear in the subtitle under the thumbnail.

then as far as the code goes all you would have to do is link each star up with the correct url:

http://www.amateurillustrator.com/forums/

I want to stick the rate option underneath the random thumbnails at the top so users can rate pics as they use the forum.

Let me know if there is anything wrong with my reasoning, and any tips would be great.

Cheers

nick

nickfzx

oh yeah and once someone had voted it would have to show the new rating...so it would need to grab that from the gallery...this might be tricky though as the images are refreshed everytime the page is refreshed...

I wouldn't mind changing the thumbnails at the top to last uploaded if this would make things easier however....that might be really cool actually to have people upload there images and then it moves across the top of the forum where everyone hangs out and people can vote on the new stuff.

Hope this can work I think it would be really cool.

nickfzx

I could do the updated rating calculation in the code itself if there is a way to fetch the original rating statistics for each image...so then the page wouldn't have to refresh...except the rating would have to be sent.

Does any of this sound do-able...any tips before I start trying would be great...I won't have much time till the end of the week so I would like to gather as much information as I can before I start.

vuud

Quote from: nickfzx on December 04, 2006, 02:58:34 AM
hey Vuud

how hard would it be to have a little vote thing under the thumbnails...it wouldnt have to be the 6 images like it is in coppermine it could use css like so:

http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/

to keep it compact.

The whole rating thing would have to appear in the subtitle under the thumbnail.

then as far as the code goes all you would have to do is link each star up with the correct url:

http://www.amateurillustrator.com/forums/

I want to stick the rate option underneath the random thumbnails at the top so users can rate pics as they use the forum.

Let me know if there is anything wrong with my reasoning, and any tips would be great.

Cheers

nick


Hmmmm, by design and intention, cpmfetch is read only to the CPG database - and for "I don't want it to be my fault" reasons, this won't be changing anytime soon. 

Anyway, once you could probably just create custom link to throw under each image and have it link to the pic rating system in cpg..  trick is getting it to come back...  Once you solve that one, it should automatically update the page.

Nothing native in cpmfetch to do it though

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

nickfzx

it wouldn't need to come back if I did the rating sum in cpmfetch...so that it was done by coppermine's rating and by my sum...it is a very simple mean number generator or something.

The redirecting issue of rate.php would be a little trouble, I may need to change coppermine's rate file a bit.

Anyways I'll have a stab at it when I have some spare time....If anyhting occurs to you to make it easier before I post next let me know as I need all the help I can get :)

nickfzx

Ok so for anyone interested i think I have figured out how I am going to attempt this...

I am going to use this set of scripts:

http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/

which uses ajax and javascript to post and retrieve votes to and from the database without the need for a screen refresh...therefore I can keep my randomly selected files and have people vote on them while using the forum.

The hard part is going to be rigging this up to cpmfetch and the coppermine votes table in the database.

It shouldn't be impossible though and when I have some time I'll give it a go.

I think it would make an excellent addition to cpmfetch...here is an example of pretty much exactly what I want to do:
http://www.cssremix.com/
here you are voting on sites instead of images but the look will be the same...this site uses the same script I link to above.

all the best and merry christmas for tomorrow.

vuud

Quote from: nickfzx on December 24, 2006, 07:55:09 PM
Ok so for anyone interested i think I have figured out how I am going to attempt this...

I am going to use this set of scripts:

http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/

which uses ajax and javascript to post and retrieve votes to and from the database without the need for a screen refresh...therefore I can keep my randomly selected files and have people vote on them while using the forum.

The hard part is going to be rigging this up to cpmfetch and the coppermine votes table in the database.

It shouldn't be impossible though and when I have some time I'll give it a go.

I think it would make an excellent addition to cpmfetch...here is an example of pretty much exactly what I want to do:
http://www.cssremix.com/
here you are voting on sites instead of images but the look will be the same...this site uses the same script I link to above.

all the best and merry christmas for tomorrow.


Well...
1.9.5 released tonight:  see this post
http://forum.coppermine-gallery.net/index.php?topic=39640.0

This has a new option to give a template for the URL...  so instead of calling CPG stuff, you could submit a template than generates whatever sort of link you want.  Regrettably, this only works on one URL, so having five to vote would just not work.  You could probably do a "Give this a 5!", but thats not exactly fair now is it?

I am considering a way to submit a reference to a function that you could define - which would make it easier to do custom stuff....

something like


<?php  

function myPrintLinks ( ) {
  
$contents "printLinks";
  
$contents =. "printLinks";
  return (
$contents);
}

$styleguide = array(
"subtitle" => "{{aTitle}}<br/>{{aDescription}}",
"imagestyle" => "photoclip",
"imagesize" => 'int',
        
"functionSubtitleOverride" => &myPrintLinks
);

$objCpm->cpm_getAlbumListFrom(20,2,"cat=5",$styleguide);

?>



I have no idea if you can pass references to functions in PHP, so this may not ever happen.










Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

nickfzx

cool thanks...I don't think I'll have enough time over the next 10 days to tackle this but after that things will ease up.

what did you mean by this I don't understand:

"You could probably do a "Give this a 5!", but thats not exactly fair now is it?"

?

Cheers
Nick

vuud

Quote from: nickfzx on December 29, 2006, 02:28:59 AM
cool thanks...I don't think I'll have enough time over the next 10 days to tackle this but after that things will ease up.
what did you mean by this I don't understand:

"You could probably do a "Give this a 5!", but thats not exactly fair now is it?"

With the new link template thing, you can form up any sort of link you want, but only one.  So you could link to the CPG voting for a photo, but only for one...
(in other words you could not have a link to vote 1, vote 2, vote 3 stars... etc...

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

nickfzx

ah, I understand now...I'll look at the options...I was just going to use the linkstyle attribute in the cpmfetch 1.4...

...but I'll look at upgrading to 1.9/2.0 if I need to

nickfzx

I have not had the time to attempt this yet but have also changed my mind with what I would like to do.

I would rather be able to comment under the thumbnail than vote...my users hardly ever vote...commenting is much more popular.

So you could click a comment button under the thumbnail, a little comment box would appear and then you could comment on images from cpmfetch.

I think this would be slightly simpler to code.  What do you think vuud?

vuud

Quote from: nickfzx on March 02, 2007, 03:51:11 PM
I have not had the time to attempt this yet but have also changed my mind with what I would like to do.

I would rather be able to comment under the thumbnail than vote...my users hardly ever vote...commenting is much more popular.

So you could click a comment button under the thumbnail, a little comment box would appear and then you could comment on images from cpmfetch.

I think this would be slightly simpler to code.  What do you think vuud?

With the templated link, you can link directly to cpg's comment maybe?  Not sure how well it would work, but doable.



Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco