display favorites on profile display favorites on profile
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

display favorites on profile

Started by jerx, January 26, 2007, 02:50:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jerx

Is it possible to display the user' s favorites on his profile?

I want other users to be able to browse the favorite photos of a user. Maybe it should be displayed the same way like last updated and last commented pictures are displayed, meaning show only the last picture and a link which points to the rest.

It looks like favorite pictures are stored in the database but also in the cookie on the users computer. I think you need to disable storing favorites in the cookie first to accomplish this. I wanted to add some code to the last comments and last uploads code in profile.php, but I noticed that the favpics table does not have a pid column. So, it won' t work.

Can anyone please help me on this?

Stramm

in include/init.inc.php you'll see how to get an array with a users favpics out of the db after
// If the person is logged in get favs from DB those in the DB have precedence

(the pid is in the array)
however in my opinion displaying a users favs is a no go. I wouldn't love being outed as a pervert (without knowing it).

jerx

Quote from: Stramm on January 26, 2007, 03:31:42 PM
in include/init.inc.php you'll see how to get an array with a users favpics out of the db after
// If the person is logged in get favs from DB those in the DB have precedence
(the pid is in the array)
Thank you. I found the code. It is as follows:
if (USER_ID > 0){
        $sql = "SELECT user_favpics FROM {$CONFIG['TABLE_FAVPICS']} WHERE user_id = ".USER_ID;
        $results = cpg_db_query($sql);
        $row = mysql_fetch_array($results);
        if (!empty($row['user_favpics'])){
                $FAVPICS = @unserialize(@base64_decode($row['user_favpics']));
        }else{
                $FAVPICS = array();
        }
}

But I don' t know how to retrieve the favorite pictures. I only know that includes/init.inc.php is already called in profile.php, so I do not need to put the code into the profile.php file again, right? Still I am totally lost. The latest comments/uploads code is much easier to understand for me. Can you please provide some more assistence?

Quote
however in my opinion displaying a users favs is a no go. I wouldn't love being outed as a pervert (without knowing it).

We do not allow users to have a personal gallery in coppermine and they are also not allowed to upload pictures into the public albums. We only have pictures of our users or of interesting objects, which we have take ourself or have checked, no xxx content. The favorite picture album will be a sort of personal gallery of the user.

Stramm

QuoteWe only have pictures of our users or of interesting objects, which we have take ourself or have checked, no xxx content. The favorite picture album will be a sort of personal gallery of the user.

sorry, but in my opinion that's an utterly bollux argumentation. If you publish what someone likes (favs) and he's not aware of that, then you're volating his privacy rights. Has nothing to do with xxx or user galleries. With seeing ones favs I can tell you a lot about this person.

QuoteI only know that includes/init.inc.php is already called in profile.php, so I do not need to put the code into the profile.php file again, right?

wrong, this only calls the favs of the actual person viewing the gallery, not the favs of the person's profile you're watching. This code can't be used 1:1 in profile.php. It just shows the way how to get the favs. I won't give you a copy/ paste solution cause I do not like what you're up tp. But you're able to do it on your own with this hint.

Again, your surfers may not like what you're doing and probably won't visit your gallery again after seeing what you do. At least I would ;)


jerx

I am very sorry, you see my intention so negatively. But I think you misunderstood my request. I am not trying to put this up secretely. The user will be aware that the favorite pictures can be seen by anyone. We also have a personal profile gallery (a phpbb mod). It is displayed right on the person' s profile and our users know it. They like to look into each other' s galleries to check for updates.

Your arguments made me wonder about this feature and revealed a problem, I have not taken care of. It is the fact, that some users already have favorite pics in their gallery. Putting up this feature would reveal those. Therefore we need to contact them and telling them to save those pictures, because they will be deleted before adding this feature.

I was always thinking that it should be obvious to our members, that their profile gallery can be viewed by every registered member. And because most of our members like to present themself in their gallery, I believe I am right on this one. This made me think the same of the favorite pictures gallery. I was wrong about that one, but I think by telling our members that this feature will be introduced and by adding explainatory text to this feature, everything should be clear again.

I came across this feature, because another community in my town has this feature, too. The community has been around much longer than our homepage. They only allow adding public gallery pictures to the users' public personal galleries. Their users are not able to upload pictures. On our community it is the opposite around. Users are able to upload pictures, but not able to present their favorite pictures of the public gallery to other users. Therefore they often save public photos to their computer and uploaded them to their profile gallery. The new feature should make things easier for them.

I hope that you can understand me a little bit better now. I do not intend to violate our user' s privacy. Thanks for giving me some hints although you do not like what I am trying to do.

chris.h

Did you ever get this up and running? I need a similar feature and wondered if you could help  ???

As the idea of our site is that of a community the voting and more so the favorites form a part of that.

I must say I was surprised at all the negativity to this edit. I've seen similar things on countless other sites, it being viewed as showing your appreciation of someones work rather than anything sinister?

chris.h

I guess not?  ???

Shame as it would be a usefull feature.

Brane29

Yes, fav pics are needed in my site to. Reason is that i have Photo club site and fav pics are users selection of pictures that they like and no reason not showin' pictures in users profile.
I'm traying to code a mod that will display pictures by number of favs descending so that guests can see most favorite pictures. But, my php and mysql is not so good.
I would be greatfull if someone can help solving fav pics on profile at least...tried that but no succsses. Thank you!

If i come up with something, i will share it.

chris.h

Thanks for the reply Brane. Glad to know its not just me stuck.  :)

dke

I would also like to know how to do this. I don't think its invading anyones privacy if you mention this in your FAQ and in the registration message.

Could someone please hook us up?

ravendark

Hello,
Please help , I need to show every user's Favorite Images on Profile page for our digital art community.
I really don't know how to output data stored in a cookie.
Thank you for your support,
Ravendark

Joachim Müller

You can't: the cookies are stored on the user's PC. Coppermine simply doesn't have that feature. End of story. You need that feature -> you code it.

Nibbler

That used to be the case in 1.3, but favourites are in the db for registered users since 1.4.

ravendark

i see ...it's a dead end.
thank you anyway