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

Thread: Bug Fixed upload photo - the photo not set to primary automatically

  1. #1
    mark
    Guest

    Post Bug Fixed upload photo - the photo not set to primary automatically

    Bug Fixed upload photo - the photo not set to primary automatically

    1) Open filename : inc/classes/BxDolMedia.php
    2) Look in : function insertMediaToDb( $sFileName )
    3) After this line :
    if( 0 < $iResult )
    {
    Insert this :
    // START bug fixed -- first photo upload make primary
    if ( $this -> aMedia['0']['PrimPhoto'] == 0 )
    {
    $iLastID = mysql_insert_id();
    $this -> oMediaQuery -> setPrimaryPhoto( $this -> iProfileID, $iLastID );
    $this -> aMedia['0']['PrimPhoto'] = $iLastID;
    }
    // END bug fixed -- first photo upload make primary

  2. #2
    AndyII
    Guest

    Default

    Thanks Mark
    I agree that its a pain to have to choose a primary pic on 1st upload, and this will be much more simple for members...
    2nd, will this be incorporated in the 6.0.1 clean?..

  3. #3
    mark
    Guest

    Post Bug Fixed upload photo - the photo not set to primary automatically

    Quote Originally Posted by AndyII View Post
    2nd, will this be incorporated in the 6.0.1 clean?..
    Just a couple of hours ago -- I committed the file for this bug fixed to clean 6.01 repository and also the mods to enable/disable the used of encrypted password.


  4. #4
    boifromoz
    Guest

    Default

    heres how it looks after i done it:

    if( 0 < $iResult )
    {
    // START bug fixed -- first photo upload make primary
    if ( $this -> aMedia['0']['PrimPhoto'] == 0 )
    {
    $iLastID = mysql_insert_id();
    $this -> oMediaQuery -> setPrimaryPhoto( $this -> iProfileID, $iLastID );
    $this -> aMedia['0']['PrimPhoto'] = $iLastID;
    }
    // END bug fixed -- first photo upload make primary
    if (getParam("autoApproval_ifPhoto") != 'on' )
    {


    and its not working for me...








    Quote Originally Posted by mark View Post
    Bug Fixed upload photo - the photo not set to primary automatically

    1) Open filename : inc/classes/BxDolMedia.php
    2) Look in : function insertMediaToDb( $sFileName )
    3) After this line :


    Insert this :

  5. #5
    mark
    Guest

    Post Bug Fixed upload photo - the photo not set to primary automatically

    I forgot this :

    $this -> iMediaCount = $this -> iMediaCount + 1;

    Corrected Code :

    // START bug fixed -- first photo upload make primary
    if ( $this -> aMedia['0']['PrimPhoto'] == 0 )
    {
    $iLastID = mysql_insert_id();
    $this -> oMediaQuery -> setPrimaryPhoto( $this -> iProfileID, $iLastID );
    $this -> aMedia['0']['PrimPhoto'] = $iLastID;
    $this -> iMediaCount = $this -> iMediaCount + 1;
    }
    // END bug fixed -- first photo upload make primary
    its working now you can check the clean 6.01 demosite here
    http://clean601.devmysite.com/

  6. #6
    boifromoz
    Guest

    Default

    yay works great thank you!

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

    Default

    Yes - was added to CLEAN also.

    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.

  8. #8
    fatepower
    Guest

    Default

    thx i have added it into my site also

  9. #9
    azaraphale
    Guest

    Default

    Thanks Mark - works a treat.

  10. #10

    Join Date
    Oct 2006
    Posts
    130

    Default

    I have 6.01b3 Clean and 6.01b4 clean, both with this added to them and yet mine is not being made a primary photo.. what have I missed??

    Nah I was right, this doesn't even work right on http://clean601.devmysite.com/index.php Here.. I just made a profile to test it and it is running 6.01B4 too...

    Help someone Please...
    Last edited by rscott4581; 09-29-2007 at 05:52 AM.

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

LinkBacks (?)

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Photo Upload Failed (Photo Error) - Photo Module
    By Page7 in forum Boonex Dolphin 7
    Replies: 4
    Last Post: 03-24-2010, 10:28 PM
  2. Primary Photo goes bye-bye
    By bigal0228 in forum Dolphin General Discussion v6.00 and above
    Replies: 2
    Last Post: 10-14-2009, 07:28 AM
  3. Photo Image will not upload
    By emailgirls in forum General Troubleshooting
    Replies: 23
    Last Post: 09-25-2007, 09:25 AM
  4. Primary Photo not showing?
    By quantumkangaroo in forum General Troubleshooting
    Replies: 7
    Last Post: 07-05-2007, 11:28 AM
  5. Upload Photo
    By BodyMen in forum Bugs Dolphin 5.6.1 / 5.6.2
    Replies: 25
    Last Post: 03-09-2007, 03:46 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