4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: ch€ri{Bi}² on August 20, 2005, 11:08:34 AM

Title: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 20, 2005, 11:08:34 AM
After this mod (http://www.4homepages.de/forum/index.php?topic=9288.0), I wonder if it is possible to go farther:
 :?: Is it possible to allow the vote of the users from the thumbnails?

This would be translated by a dropdown list and a button of vote directly in thumbs 8) (for example below the lightbox button).

Any help will largely be appreciated.

Title: Re: [REQ] Rating directly from the thumbnails
Post by: TheOracle on August 20, 2005, 01:47:31 PM
It's been done last week :

http://www.4homepages.de/forum/index.php?topic=9297.0

;)
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 20, 2005, 03:00:43 PM
yes i saw this mod  :?  but it is not exactly what i want : the published mod allows user to rate several pics with the same note in a single operation (It is what I understood).

 :arrow: I want: to be able to note each picture individually (i mean one notes for one picture) from the thumbnails (in categories, lightbox or search).
Is there a way to do it?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: TheOracle on August 20, 2005, 03:31:19 PM
Quote

Is there a way to do it?


Sorry. There are no planifications for these types of modifications yet. Next time, please post on the appropriate thread.  :?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 20, 2005, 04:58:36 PM
Next time, please post on the appropriate thread.  :?

humm....  :?  what thread are you talkink about ?
my request concerns a new mod and was posted in Mods & Plugins (Requests & Discussions) board... Did I miss something?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: TheOracle on August 20, 2005, 05:07:13 PM
Quote

my request concerns a new mod and was posted in Mods & Plugins


If you mean that this sorth of MOD was already posted in the forum in the past ... I don't remember seeing it but it's always possible. However, since my version of this release is pretty much close to what you're looking for - you should use it until the next solution is being discovered. ;)
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 20, 2005, 05:36:48 PM
i mean it is a new request for a new mod and this mod has never existed to my knowledge (i think nobody asked for it until now)!

ok, I am going to work on this mod  :wink:
Let me know if somebody is interested, whether it is to help me or to use this mod.

Regards.
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 21, 2005, 08:57:30 PM
hehe !!!  8)
Who would have believed that it would be so simple?

 :arrow: to allow users to rate directly from the thumbnails, open thumbnail_bit.html from your template
and add at the end:
Code: [Select]
{if rate_form} 
<div align="center">{rate_form}</div>
{endif rate_form}

After this, all your thumbs will have a rate form where users can rate pics without open detail page.  :D :D
Title: Re: [REQ] Rating directly from the thumbnails
Post by: TheOracle on August 21, 2005, 08:59:13 PM
And does it actually update the right fields ?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 21, 2005, 09:53:33 PM
well, at the moment I am testing all my modification because i use those 2 mods :  Rating Button Disabled After Vote (http://www.4homepages.de/forum/index.php?topic=5853.0) &  Votes saved in DB (http://www.4homepages.de/forum/index.php?topic=6123.0).

Until now, everything seems to work correctly  :D :D :D 

here an example : look at the bottom of thumbs for rate form.

(http://patsgallery.free.fr/images/rate_thumb.jpg)

the differents fields used for count and rate seems to be ok (tested with 2 users).
Title: Re: [REQ] Rating directly from the thumbnails
Post by: TheOracle on August 21, 2005, 09:58:01 PM
Quote

the differents fields used for count and rate seems to be ok (tested with 2 users).


You ... do know that these votes would go all in the image_votes field from 4images_images table by applying the {rate_form} tag - right ?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 21, 2005, 10:32:32 PM
hummm... the {rate_form} tag uses:
Quote
function update_image_rating($image_id, $rating) {
in includes/functions.php.
it updates  the image_votes field and image_rating fields from 4images_images table for current picture and it also add new data in the 3 fields from 4images_voted table for those who use the MOD Votes saved in DB (version a).

 :? Do you see a problem somewhere?

Title: Re: [REQ] Rating directly from the thumbnails
Post by: TheOracle on August 21, 2005, 10:43:25 PM
Quote

Do you see a problem somewhere?


Actually, I do.

You're using the {rate_form} on two places :

- Categories has : {rate_form}
- Details has : {rate_form}

See what I mean ?

What I'm trying to explain here is that you're using the same tag twice which goes into the same field names under the images table. Meaning, If you rate the picture from the category that has the same ID has the details page, you won't be able to vote twice for a while (still - on that same picture) since it's being called from the ' auth_vote ' field during the action in includes/functions.php file.

That said, that is the reason why I created a auth_cat_vote in my other MOD - to avoid the actions to be applied on the same fields since I also created : cat_votes and cat_rating fields. ;)

See where I'm going ? 8)
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on August 22, 2005, 01:26:28 AM
Yes I understand what you want to say and why you made it like that. Your mod seems to be interesting but...  :?  it does not correspond to the fact that I look.

You're using the {rate_form} on two places :

- Categories has : {rate_form}
- Details has : {rate_form}
Actually, all the pages using thumbnail_bit.html file will use the tag {rate_form} (including home, categories, details, search, lightbox).
The tag works in a identical way for every thumbs and it is generated in the demand. Thus no risk of confusion or conflict.

If you rate the picture from the category that has the same ID has the details page, you won't be able to vote twice for a while
The users cannot vote twice? no problem. They will be warned of it.

i simply want that users can rate pics everywhere they want and now they can!!!  :D

now i will try to insert [MOD] - Restrict users to use e-card and download if they have not voted first (http://www.4homepages.de/forum/index.php?topic=9288.0), I  am curious to see how's it is going to take place with the lightbox.  :wink:

thank you for your help.
Best regards.
Title: Re: [REQ] Rating directly from the thumbnails
Post by: RuthE on October 12, 2005, 02:30:22 AM
here an example : look at the bottom of thumbs for rate form.

(http://patsgallery.free.fr/images/rate_thumb.jpg)


I really like this graphic form for the rating, does it show the current rating or what you rated it? Where can I find that mod?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: JensF on December 07, 2005, 07:51:42 AM
Hi there,

is this working or not???
Title: Re: [REQ] Rating directly from the thumbnails
Post by: Acidgod on December 07, 2005, 10:05:03 AM
was genau willste wissen? Ursprünglich ging es doch darum das man die Thumbnails wie Detailbilder bewerten kann oder habe ich das falsch verstanden?
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on December 07, 2005, 11:51:52 AM
was genau willste wissen? Ursprünglich ging es doch darum das man die Thumbnails wie Detailbilder bewerten kann oder habe ich das falsch verstanden?
@Acidgod : i read somewhere you will answer only in english or something like that  :wink:
if i understood your question, you want to know if users can rate the thumbs with this mod...
well the answers is... NO !!! this mod just move/copy the rate form from the detail page to the thumbs.

with this mod when a user rates from the thumbs, it is exactly the same process as the original vote except that the vote can be carried out starting from the thumbs, i mean everywhere you can find thumbs, you can rate the pic  8)

is this working or not???
Yes it works very well  :D :D  :D
Title: Re: [REQ] Rating directly from the thumbnails
Post by: Acidgod on December 07, 2005, 02:19:49 PM
My Question was targeted to JensF... (o:

And i unterstood that this Modification only put the Rate Form form the detail.html in to the thumbnail_bit.html... (o:
Title: Re: [REQ] Rating directly from the thumbnails
Post by: JensF on December 07, 2005, 04:15:33 PM
Hi,

der Mod ist insofern interessant für mich weil ich die Mods Lightbox for Guest, Multilightbox & Restrict users to use e-card and download if they have not voted first eingebaut habe.
Und das Problem ist das die User nicht die Bilder in der Lightbox runterladen können wenn nicht alle Bilder von ihnen bewertet wurden. Und bevor man alle Bilder durchsucht wo man noch keine Bewertung abgegeben hat kann man unter dem Bild halt gleich sehen wo noch ne Bewertung fehlt.

Title: Re: [REQ] Rating directly from the thumbnails
Post by: JensF on December 08, 2005, 05:26:10 PM
Hi,

i have insert this little modification but i have a question.

when i have images in the lightbox and i vote for it in the lightbox then i become this site...

(http://www.terraristik-galerie.de/sonstiges/lightbox.gif)

Is there a way to redirect to the lightbox with images....???
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on December 08, 2005, 06:45:52 PM
Is there a way to redirect to the lightbox with images....???

tested  at home : no need to redirect since you stay in lighbox after rating a picture  :arrow: if you got pics in lightbox, you should see them !

[EDIT] tested on your site : everything seems to work properly  :wink: [/EDIT]
Title: Re: [REQ] Rating directly from the thumbnails
Post by: JensF on December 08, 2005, 07:52:42 PM
Hi,

yes. i have test it. In Guest Lightbox it works but not in Lightboy for members...
Title: Re: [REQ] Rating directly from the thumbnails
Post by: ch€ri{Bi}² on December 08, 2005, 10:03:41 PM
In Guest Lightbox it works but not in Lightboy for members...
  :?: and what is the difference ?  :?:
Title: Re: [REQ] Rating directly from the thumbnails
Post by: V@no on December 09, 2005, 01:51:37 AM
Hi,

yes. i have test it. In Guest Lightbox it works but not in Lightboy for members...
This is caused by multi-lightbox mod.
Find in lightbox.php:
Code: [Select]
if ($action != "" || $user_info['user_level'] == GUEST || $action == "addtolightbox" || $action == "removefromlightbox")
{
  $action = "show";
}
elseif ($action == "clearlightbox")
{
  $action = "manage";
}
Replace with:
Code: [Select]
if ($user_info['user_level'] == GUEST || ($action != "manage" && $action != "save"))
{
  $action = ($action == "clearlightbox" && $user_info['user_level'] >= USER) ? "manage" : "show";
}

I also will update the mod with this change.
Title: Re: [REQ] Rating directly from the thumbnails
Post by: JensF on December 09, 2005, 06:56:30 AM
Thanks, works fine!!! :)