+ Reply to Thread (include dating software, release, and patch number!)
Page 1 of 5 1 2 ... LastLast
Results 1 to 10 of 45

Thread: Can the user background picture size be changed?

  1. #1

    Join Date
    Sep 2006
    Posts
    191

    Default Can the user background picture size be changed?

    I uploaded a background picture to my profile to test how that works, and when I went to look at my profile, the picture was tiled throughout the background. I know the picture I had was at least 1270-768 or something like that
    Real big picture.

    Is there a way to either stretch the picture or possibly use the size of the picture before it starts to tile?
    ------------------------------------
    Have a MMORPG character you are proud
    of - Toon in your Character at
    http://www.charnation.com

  2. #2
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,642
    Blog Entries
    5

    Default

    Yes - we know about this - either us (MMS) or someone is sure to post a fix for this soon.

    Or maybe BoonEx will fix this in the next release.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  3. #3

    Join Date
    Sep 2006
    Posts
    191

    Default

    Well I was digging around and I found this

    $query = "SELECT * FROM ProfilesSettings WHERE `IDMember` = '$ID'";
    $arr = db_arr( $query );
    if ( $arr['IDMember'] )
    $ret = "<style type=\"text/css\">
    body
    {
    background-image: url( {$ID_PIC_URL}{$arr['BackgroundFilename']});
    background-color: {$arr['BackgroundColor']};
    }
    div#right_column_content
    {
    color: {$arr['FontColor']};
    font-size: {$arr['FontSize']}px;
    font-family: {$arr['FontFamily']};
    }
    </style>";

    return $ret;
    I am not sure if this is the place I found this in the profile.php. is that for the background? Could html code be inserted in the 'BackgroundFilename htmlcode here' ?
    ------------------------------------
    Have a MMORPG character you are proud
    of - Toon in your Character at
    http://www.charnation.com

  4. #4
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,642
    Blog Entries
    5

    Default

    perhaps that - but also need to deal with the uploading of the background and how it is resized by gd/imagemagick - make some decisions about that.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  5. #5

    Join Date
    Sep 2006
    Posts
    191

    Default

    Well I have been playing around with it.
    I have read in other forums, that stretching a background image to match the screen size or browser size doesn't work yet, until css3 comes out.

    But I have played around with it and got it to untile and have just one picture up there in the top left corner and then I was able to fix it to make it stay put when you are scrolling, but never got it to resize. I can move the picture all over the screen. From one end to another,
    I guess I will have to look at gd/imagemagick and see what I can rig up lol
    ------------------------------------
    Have a MMORPG character you are proud
    of - Toon in your Character at
    http://www.charnation.com

  6. #6
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,642
    Blog Entries
    5

    Default

    Quote Originally Posted by ArnMan
    I guess I will have to look at gd/imagemagick and see what I can rig up lol
    I think if you check the exising code - you will find what you need to do this - perhaps no reason to read the GD or Imagamagick docs at all.

    Rob
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  7. #7
    PLAYMATE
    Guest

    Default Anything On This Resize?

    Anything On This Resize?

  8. #8
    gvpm
    Guest

    Default

    !!WARNING!! I JUST REALIZED IM THAT OF COURSE IM USING DOLPHIN 5.6 SO IF YOUR USING UNDER THAT IM NOT SURE IF IT WILL WORK BUT USE THE STEPS I USED HERE FOR ALL OTHER VERSIONS

    ok to my understanding when you upload the background image its being resized.... i deleted this becuz i found no reason for even profile_customize.php because its so limited but you can try this im not sure if it will work...as i said i deleted the file....:

    Add this to the bottom of profile customize...


    PHP Code:
    function Backgroundresizer$_FILES$fname$path_and_name$maxsize=''$imResize='true' )
    {
            
    $max_photo_width 1024///CHANGE TO ANYTHING YOU WANT
            
    $max_photo_height 800///CHANGE TO ANYTHING YOU WANT

        
    $height $max_photo_height;
        if ( !
    $height ///IF IMAGE HEIGHT IS BIGGER THAN MAX HEIGHT..
            
    $height 800///HEIGHT WILL EQUAL THIS-------------^
        
    $width $max_photo_width
        if ( !
    $width ///IF IMAGE WIDTH IS BIGGER THAN MAX WIDTH..
            
    $width 1024;///WIDTH WILL EQUAL THIS-------------^

        
    if ( $maxsize && ($_FILES[$fname]['size'] > $maxsize || $_FILES[$fname]['size'] == 0) )
        {
            if ( 
    file_exists($_FILES[$fname]['tmp_name']) )
            {
                
    unlink($_FILES[$fname]['tmp_name']);
            }
            return 
    false;
        }
        else
        {
            
    $scan getimagesize($_FILES[$fname]['tmp_name']);

            if ( (
    $scan['mime'] == 'image/jpeg' && $ext '.jpg' ) || ( $scan['mime'] == 'image/gif' && $ext '.gif' ) ||
                ( 
    $scan['mime'] == 'image/png' && $ext '.png' ) || ( $scan['mime'] == 'image/bmp' && $ext '.bmp' ) )
            {

                
    $path_and_name .= $ext;
                
    move_uploaded_file$_FILES[$fname]['tmp_name'], $path_and_name );

                if ( 
    $imResize )
                    
    imageResize$path_and_name$path_and_name$width$height ); ///this is whats chopping up the image and saying resize me dude :)

            
    }
            else
            {
                return 
    IMAGE_ERROR_WRONG_TYPE;
            }
        }

        return 
    $ext;

    as you will notice this function looks a lot like the one is image.inc.php...becuz it is! ... you don't want to change anything so just replicate the function..if you read the code whats happening is its saying if photo height is above 1024 and width is above 1024 we will resize. if you notice in image.inc.php the parameter says 400...go figure boonex...but anyway change in profile customize

    PHP Code:
    moveUploadedImage$_FILES'bgimg'$dir['profileBackground'] . $pic_name''
    to:....

    PHP Code:
    Backgroundresizer$_FILES'bgimg'$dir['profileBackground'] . $pic_name''
    let me know if it works if it didn't sorry i tried

    !!WARNING!! I JUST REALIZED IM THAT OF COURSE IM USING DOLPHIN 5.6 SO IF YOUR USING UNDER THAT IM NOT SURE IF IT WILL WORK BUT USE THE STEPS I USED HERE FOR ALL OTHER VERSIONS
    Last edited by gvpm; 03-18-2007 at 12:42 PM.

  9. #9

    Join Date
    Sep 2006
    Posts
    191

    Default

    I don't have 5.6 I believe I am using 5.4 lol haven't checked that in a while lol
    anywho I did that and i so far get one error message

    Fatal error: Only variables can be passed by reference in /my/base/path/html/profile_customize.php on line 77
    I have checked everything I copyied and pasted is the same as yours. I will take a look at my image.inc.php and see if there are any differences
    ------------------------------------
    Have a MMORPG character you are proud
    of - Toon in your Character at
    http://www.charnation.com

  10. #10
    gvpm
    Guest

    Default

    yea there will be differences if im correct from 5.5+ they set it so when user upload image it creates folders so in that case when you directly copied what i posted your script is trying to upload to a place that doesn't exist so see whhat i changed and do the same for 5.4. all your doing is copying the last function on image.inc.php renaming it ...changing the sizes and changing where the fuction is being called when you upload the image. since i don't have 5.4 show me what it say in images.inc.php for the move function thanks

+ Reply to Thread (include dating software, release, and patch number!)
Page 1 of 5 1 2 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. profile background picture/wallpaper
    By doomenterprises in forum Dolphin General Discussion v6.00 and above
    Replies: 3
    Last Post: 11-01-2008, 01:24 AM
  2. text background size
    By nolimitslove in forum Dolphin General Discussion v6.00 and above
    Replies: 2
    Last Post: 05-06-2008, 09:58 PM
  3. Upload User Picture during the new Member signup !?
    By TrippleEx in forum General Issues, Comments, Questions
    Replies: 0
    Last Post: 12-28-2006, 05:20 PM
  4. Picture size
    By spikelee in forum FAQ & HOWTO
    Replies: 17
    Last Post: 10-17-2006, 03:22 AM
  5. Changing Code to Increase Picture Size
    By Mary Jane in forum FAQ & HOWTO
    Replies: 2
    Last Post: 09-20-2006, 06:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts