• [MOD] Member personal photo v1.1.3 by V@no (2011-10-23) 4 0 5 1
Currently:  

Author Topic: [MOD] Member personal photo v1.1.3 by V@no (2011-10-23)  (Read 326232 times)

0 Members and 1 Guest are viewing this topic.

Offline luener

  • Jr. Member
  • **
  • Posts: 54
  • Pessimisten sind Optimisten mit mehr Erfahrung!
    • View Profile
    • TopFoto24.com
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #300 on: October 16, 2009, 04:30:19 PM »
Hi, V@no..!

Thx for your fast Answer.
Any Idea, how i can schow the Pic in comment_bit smaller then the original Size???

So that also  IE displays The Pic.

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #301 on: September 08, 2010, 05:56:32 PM »
So in this MOD is it the same as the avatar MOD or can users actually upload real photos to be on profile or just avatars?

thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #302 on: September 09, 2010, 12:46:12 AM »
Usually avatars is something being visible everywhere where the user is published, while personal photo is something being showed at their profile page, in much larger resolution then avatar.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #303 on: October 16, 2010, 10:30:25 AM »
Hi,

Thanks for this great mod.

A question about the random userpic
http://www.4homepages.de/forum/index.php?topic=6797.msg60282#msg60282

How I can show the members userpic to guests?Now only registered members can see the members user pic.

Thanks
www.globalfoto.net

Sintra - Portugal

Rembrandt

  • Guest
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #304 on: October 16, 2010, 12:47:14 PM »
...
How I can show the members userpic to guests?Now only registered members can see the members user pic.
search:
if ($user_info['user_level'] >= USER) {

$site_template->register_vars(array(
"user_name" => $user_name,
"userpic_img" => $userpic_img,
"lang_no_random_userpic" => $lang['no_random_userpic'],
"lang_random_userpic_images_title" => $lang['random_userpic_images_title']
));
###### End of if statement.


replace:

$site_template
->register_vars(array(
"user_name" => $user_name,
"userpic_img" => $userpic_img,
"lang_no_random_userpic" => $lang['no_random_userpic'],
"lang_random_userpic_images_title" => $lang['random_userpic_images_title']
));

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #305 on: October 17, 2010, 10:01:41 AM »
Hi,

Thanks,

I changed the code,but only show this for guests.

Random userpic images
 

This user has no picture on his profile
fer


 But ,the user have userpic.


Found a problem in the original code.
The name under the thumbnail does not match with the userpic

Thanks
www.globalfoto.net

Sintra - Portugal

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #306 on: October 11, 2011, 01:41:39 PM »
With 1.7.10 the userpic isn't shown in the details page of an image - Comments are working, but using {userpic} in the details doesn't show anything.

To solve it take a look at that fix:

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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #307 on: October 11, 2011, 07:31:20 PM »
mmmm what about step 10?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #308 on: October 22, 2011, 09:29:15 PM »
mmmm what about step 10?

Did it. Or maybe the beer was too much, anyway I got it working now ;)

V@no, can we crop the image to a fixed size, rather then resize only the longest side? That was requested before in this thread.

Example: I set 200x200 px in the admin panel, and the uploaded pictures are all 200x200 px (Like in this modification for thumbnails ?

I tried to play around to do it myself, but didn't manage it. Hope you can help, again. Beer is on me ;)










« Last Edit: October 22, 2011, 09:57:37 PM by trez »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #309 on: October 23, 2011, 06:58:22 AM »
Try this:
1) [FIX] Max height has no affect when do image resize
2) in member.php find:
          if ($convert_options['convert_error'] || (!$convert_options['convert_error'] && !resize_image($userpic_file85$config['userpic_width'], 1))) 
Replace it with:
          if ($convert_options['convert_error'] || (!$convert_options['convert_error'] && !resize_image($userpic_file85$config['userpic_width'], 1$config['userpic_height']))) 


[EDIT]
I think I misunderstood your request...maybe this will suit you better (assuming you've added the code for thumbnails you've mentioned)
replace the line above (in member.php) with this:
          $image_info = @getimagesize($userpic_file);
          if (
$image_info)
            
$wh get_width_height($config['userpic_width'], $image_info[0], $image_info[1], 1);
          if (
$convert_options['convert_error'] || !$wh || (!$convert_options['convert_error'] && !resize_image_gd_thumb($userpic_file$userpic_file85$wh['width'], $wh['height'], $image_info)))
« Last Edit: October 23, 2011, 05:52:06 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #310 on: October 23, 2011, 03:11:18 PM »
Hey,

thanks for your help on such short notice. I included the code snippet, image upload works, but there is no resize of the userpic image.
That's how it looks like:

Code: [Select]
      {
        $userpic = $HTTP_POST_VARS['userpic'] = $userpic_new = $userpic_name;
        if ($user_info['userpic'] != $userpic_name && file_exists($userpics_dir.$user_info['userpic']))
        {
          @unlink($userpics_dir.$user_info['userpic']);
        }
        if (!function_exists(init_convert_options))
        {
          require(ROOT_PATH.'includes/image_utils.php');
        }
        $image_info = getimagesize($userpic_file);
        $convert_options = init_convert_options();
        if (($image_info[0] > $config['userpic_width'] || $image_info[1] > $config['userpic_height']))
        {
          $image_info = @getimagesize($src);
          if ($image_info)
  $wh = get_width_height($config['userpic_width'], $image_info[0], $image_info[1], 1);
          if ($convert_options['convert_error'] || !$wh || (!$convert_options['convert_error'] && !resize_image_gd_thumb($userpic_file, $userpic_file, 85, $wh['width'], $wh['height'])))
          {
            if ($image_info[0] > $config['userpic_width'])
            {
              $error[] = $lang['invalid_image_width'];
            }
            if ($image_info[1] > $config['userpic_height'])
            {
              $error[] = $lang['invalid_image_height'];
            }
          }
        }
      }

You were assuming right, I have added the code for those thumbnails

I tried this too, but I assume it's wrong because I get sql errors:

Code: [Select]
        $image_info = getimagesize($userpic_file);
        $convert_options = init_convert_options();

          if ($image_info)
  $wh = get_width_height($config['userpic_width'], $image_info[0], $image_info[1], 1);
          if ($convert_options['convert_error'] || !$wh || (!$convert_options['convert_error'] && !resize_image_gd_thumb($userpic_file, $userpic_file, 85, $wh['width'], $wh['height'])))
          {
            if ($image_info[0] > $config['userpic_width'])
            {
              $error[] = $lang['invalid_image_width'];
            }
            if ($image_info[1] > $config['userpic_height'])
            {
              $error[] = $lang['invalid_image_height'];
            }
          }


EDIT:

Replacing $image_info = @getimagesize($src); with $image_info = @getimagesize($userpic_file); shows me an error in the "resize_image_gd_thumb()". But I guess I am one step closer now.




Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #311 on: October 23, 2011, 05:53:39 PM »
I've updated my post above. Seems to work for me (at least no error messages)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Member personal photo v1.1.2 by V@no (2008-12-11)
« Reply #312 on: October 23, 2011, 06:26:30 PM »
Yepp, working now ;)

PS: Where to send you a six-pack of Heinecken?  8)