Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[r4] Profile Picture
#1
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   Less than 1 minute ago">nav_pp.jpg (Size: 2.3 KB / Downloads: 929)

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 Files
.zip   ProfilePicture.zip (Size: 8.83 KB / Downloads: 141)
#2
after adding this plug in, it doesnt display the new link within the UCP?
#3
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.
#4
im using a new 1.4 theme
just reuploaded and still nothing?
#5
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>
#6
sorted, thank you!!
#7
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.
#8
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.
#9
MyBB 1.4 automaticly resizes pics ;-)
[Image: classic-76561197972846836.png]
#10
Great work

Edit

you can modify the plug so that I can add to the profile of many gallery?


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

Forum Jump:


Users browsing this thread: 1 Guest(s)