REGISTER or LOGIN to have the annoying ads removed.
 
Thread Rating:
  • 3 Votes - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[r4] Profile Picture
Aug 04, 2008, 11:02 AM (This post was last modified: Apr 18, 2009 09:18 AM by LeX-.)
Post: #1
[r4] Profile Picture
MyBB Version: MyBB 1.4
New Settings: 3 [ Profile Picture Settings ]
New Templates: 3 [ usercp_pp; usercp_pp_current; member_profile_ppbox ]
DB Changes: 3 [ new columns in users table ]
File Changes: 0
Files: 3
  • pp.php
  • ./inc/plugins/pp.php
  • ./inc/languages/english/pp.lang.php
Images: 1
  • ./images/usercp/pp.gif
Install:
  • Upload pp.php into your root folder
  • Upload ./images/usercp/pp.gif into your ./images/usercp/ folder
  • Upload ./inc/plugins/pp.php into your ./inc/plugins/ folder
  • Upload ./inc/languages/english/pp.lang.php into your ./inc/languages/english/ folder
  • Create a new folder ( pp ) within your ./uploads/ folder where all Profile Pictures will be stored. CHMOD 777 !
  • Go to your PluginManager and Activate the "Profile Picture" Plugin.
Settings:
  • UploadPath
  • Picture Size (kB)
  • Maximum Dimensions (WxH)
What:
* Users can add a picture of themself in their profile; There's a new link within the UCP.
* Oversized Images [Dimensions] Get Resized.

.jpg  nav_pp.jpg (Size: 2.3 KB / Downloads: 924)

Update: MyBB 1.2.* => MyBB 1.4
* Open ./inc/plugins/pp.php [ MyBB 1.2.* ]
Find && Remove
PHP Code:
    // REMOVE PP OUT OF DIR
    
remove_pp(); 
And
PHP Code:
    $db->query("ALTER TABLE `".TABLE_PREFIX."users` DROP `pp`,
    DROP `pptype`,
    DROP `ppdimensions`;"
); 
* Upload && Deactivate
* Upload New Version && Activate


Attached File(s)
.zip  ProfilePicture.zip (Size: 8.83 KB / Downloads: 140)

Visit this user's website Find all posts by this user
Aug 09, 2008, 03:15 PM
Post: #2
RE: [r4] Profile Picture
after adding this plug in, it doesnt display the new link within the UCP?
Find all posts by this user
Aug 09, 2008, 03:31 PM (This post was last modified: Aug 09, 2008 03:36 PM by LeX-.)
Post: #3
RE: [r4] Profile Picture
Are you using the default Theme ?

Edit:

Also; deactivate the plugin reupload both files and activate again;
One of the ProfilePicture templates needs to be updated.

Visit this user's website Find all posts by this user
Aug 09, 2008, 03:43 PM
Post: #4
RE: [r4] Profile Picture
im using a new 1.4 theme
just reuploaded and still nothing?
Find all posts by this user
Aug 09, 2008, 03:59 PM (This post was last modified: Aug 09, 2008 04:14 PM by LeX-.)
Post: #5
RE: [r4] Profile Picture
That aint my plugin's fault; i can't include a way that for each theme the replace_templates function works properly.

Open your usercp_nav_misc template
Find
Code:
</tbody>

Add above
Code:
<tr><td class="trow1 smalltext"><a href="pp.php?action=pp" style="padding-left: 23px;background: url('images/usercp/pp.gif') no-repeat left center;">Profile Picture</a></td></tr>

Visit this user's website Find all posts by this user
Aug 09, 2008, 04:13 PM
Post: #6
RE: [r4] Profile Picture
sorted, thank you!!
Find all posts by this user
Aug 09, 2008, 08:42 PM
Post: #7
RE: [r4] Profile Picture
How about resize picture bigger if sizes are larger than standard?
At the moment the plugin isn't informing of the mistake, when uploaded picture is to big.
Visit this user's website Find all posts by this user
Aug 10, 2008, 01:15 AM (This post was last modified: Aug 10, 2008 01:59 AM by LeX-.)
Post: #8
RE: [r4] Profile Picture
DamYan Wrote:How about resize picture bigger if sizes are larger than standard?
At the moment the plugin isn't informing of the mistake, when uploaded picture is to big.

PHP Code:
    if($mybb->settings['maxprof_picdims'] != "")
    {
        list(
$maxwidth$maxheight) = @explode("x"$mybb->settings['maxprof_picdims']);
        if((
$maxwidth && $img_dimensions[0] > $maxwidth) || ($maxheight && $img_dimensions[1] > $maxheight))
        {
            
$ret['error'] = $lang->sprintf($lang->error_prof_pictoobig$maxwidth$maxheight);
            @
unlink($mybb->settings['prof_picuploadpath']."/".$filename);
            return 
$ret;
        }
    } 

It does.
And resizing can be done i suppose. Something for this afternoon maybe.
But why does the plugin have to do all the work? Choose a picture that fits ...
The lazyness of people ...

Edit:
Reupload pp.php (root) if you want them to be 'resized' if they overseed the maximum dimensions.

Visit this user's website Find all posts by this user
Aug 12, 2008, 02:26 AM
Post: #9
RE: [r4] Profile Picture
MyBB 1.4 automaticly resizes pics ;-)

[Image: classic-76561197972846836.png]
Visit this user's website Find all posts by this user
Aug 12, 2008, 03:17 PM (This post was last modified: Aug 12, 2008 03:24 PM by taxido.)
Post: #10
RE: [r4] Profile Picture
Great work

Edit

you can modify the plug so that I can add to the profile of many gallery?
Find all posts by this user


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [r4] Additional Group Images; Postbit && Profile LeX- 68 23,271 Sep 01, 2010 07:39 PM
Last Post: protocol
  [r4] Recent Profile Visitors LeX- 29 6,399 Apr 29, 2010 02:41 AM
Last Post: scarface
  [r4] Buddies In Profile LeX- 15 5,422 Jul 05, 2009 11:31 PM
Last Post: DanielK

Forum Jump:


User(s) browsing this thread: 1 Guest(s)