• [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 327153 times)

0 Members and 1 Guest are viewing this topic.

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 by V@no
« Reply #60 on: April 28, 2005, 02:38:22 PM »
try redo Step 1.2
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 TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #61 on: April 28, 2005, 06:05:01 PM »
When I delete the following code (regarding point 1.2), all the information about the user pic isn't displayed anymore on the memberprofile.

Code: [Select]
//User Pic
    "userpic_allowed" => $config['userpic'],
    "userpic_img" => ($user_info['userpic']) ? ROOT_PATH."data/userpic/".$user_info['userpic'] : "",
    "lang_userpic_del" => $lang['userpic_del'],
    "lang_userpic_upload" => preg_replace("/".$site_template->start."userpic_max_size".$site_template->end."/siU", $config['userpic_size']." ".$lang['kb'], preg_replace("/".$site_template->start."userpic_max_width".$site_template->end."/siU", $config['userpic_width'], preg_replace("/".$site_template->start."userpic_max_height".$site_template->end."/siU", $config['userpic_height'], $lang['userpic_upload']))),
    "userpic_max_width" => $config['userpic_width'],
    "userpic_max_height" => $config['userpic_height'],
    "userpic_max_size" => $config['userpic_size']." ".$lang['kb'],
//End User Pic

But I have entered the values fix in main.php (hardcoded), instead of the variables. That is ok for me.

Thank's anyway

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.1 by V@no
« Reply #62 on: April 29, 2005, 12:19:59 AM »
the only line was changed is the "lang_userpic_upload" => ...
what if u try use this line instead:
Code: [Select]
    "lang_userpic_upload" => str_replace("{userpic_max_size}", $config['userpic_size']." ".$lang['kb'], str_replace("{userpic_max_width}", $config['userpic_width'], str_replace("{userpic_max_height}", $config['userpic_height'], $lang['userpic_upload']))),
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 ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #63 on: April 29, 2005, 04:19:10 AM »
I V@no how can i allow the usersjust to upload .jpg images only as a member personal picture? i think that there is some problem renaming the gif files they get a name like -1.gif

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.1 by V@no
« Reply #64 on: April 29, 2005, 04:24:37 AM »
what renaming problem?

the allowed extensions are set in member.php:
Code: [Select]
      $mime_types = array(
        "image/jpeg",
        "image/pjpeg",
        "image/gif",
        "image/x-png"
      );
      $extensions = array(
        "jpg",
        "jpeg",
        "gif",
        "png"
make sure that mime type is sinchronized with the extensions.
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 ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #65 on: April 29, 2005, 04:26:47 AM »

I don't know I look in the userpic folder and I saw a gif called -1.gif and  jpg -1.jpeg :S

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.1 by V@no
« Reply #66 on: April 29, 2005, 04:48:34 AM »
thats not supposed to happend...
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 ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #67 on: April 29, 2005, 04:50:19 AM »
i know lol that's why i'm telling you :P

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #68 on: April 29, 2005, 05:45:37 AM »
Hi V@no How can I insert the User personal picture here to see on the list?

Code: [Select]
$sql = "SELECT user_t_images, user_name, user_id FROM ".USERS_TABLE."
WHERE user_level >= '".USER."'
ORDER BY user_t_images DESC
LIMIT 100";
$result = $site_db->query($sql);

while ($row = $site_db->fetch_array($result)) {
$last_action_user_list .= '<img border="0" src="http://69.56.196.226/~ascanio/templates/revolution/images/flecha.gif" width="13" height="10">&nbsp;<a href ="'.ROOT_PATH.'member.php?action=showprofile&user_id='.$row['user_id'].'"><b>'.$row['user_name'].'</b></a> <span class="smalltext">'.$row['user_t_images'].'</span><br>';
}

$site_template->register_vars(array(
"user_top_uploaders" => $last_action_user_list,
));
unset($user_top_uploaders);

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #69 on: April 30, 2005, 02:44:32 AM »
Ok I have try by myself and I almost got it!  :lol: :lol: :lol: but it just show the pics with jpg pictures  :( :( how can I do it to show all the formats?

what i did was this :

I change this:
Code: [Select]
$last_action_user_list .= '<img border="0" src="http://69.56.196.226/~ascanio/templates/revolution/images/flecha.gif" width="13" height="10">&nbsp;<a href ="'.ROOT_PATH.'member.php?action=showprofile&user_id='.$row['user_id'].'"><b>'.$row['user_name'].'</b></a> <span class="smalltext">'.$row['user_t_images'].'</span><br>';
For this:

Code: [Select]
$last_action_user_list .= '<table border="0" width="100%" id="table1"><tr><td><img src="'.ROOT_PATH.'/data/userpic/'.$row['user_id'].'.jpg" width="37" height="39">&nbsp;&nbsp;<a href ="'.ROOT_PATH.'member.php?action=showprofile&user_id='.$row['user_id'].'"><b>'.$row['user_name'].'</b></a> <span class="smalltext">'.$row['user_t_images'].'</span></td></tr></table><br>';
I would like to show the users in a table like in the V@no site, in the top members section

I need help please

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.1 by V@no
« Reply #70 on: April 30, 2005, 03:09:39 AM »
u need get the userpic value from database for each member.
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 ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #71 on: April 30, 2005, 03:20:08 AM »
u need get the userpic value from database for each member.
to do what? to get all the images formats? I allready see the members pictures but just the jpg ones

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.1 by V@no
« Reply #72 on: April 30, 2005, 04:02:50 AM »
u need get the userpic value from database for each member. :roll:

in userpic field stores the name of the image and that's what u need.
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 ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Member personal photo v1.1.1 by V@no
« Reply #73 on: April 30, 2005, 04:27:53 AM »
V@no the name of the image is the same name of the id of the user so what i did was this:
Code: [Select]
<img src="'.ROOT_PATH.'/data/userpic/'.$row['user_id'].'.jpg" width="37" height="39">and it work but just for jpg files
so i wonder if there are nay way to pchange this part
Code: [Select]
.'.jpg" and work for the other formats

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.1 by V@no
« Reply #74 on: April 30, 2005, 04:36:42 AM »
oh boy...we are talking about same thing but about different thing...kinda none-sence, dont u think? ;) :)
I'm telling u, the image name with it's extension is saved in userpic field for each member. Yes, I know the name of the picture is the same as member id, but the extension may varay, that's why u need get the filename from the userpic field.
just add userpic in the field list in the database query, then u'll be able use $row['userpic'] variable.
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)