+ Reply to Thread (include dating software, release, and patch number!)
Results 1 to 4 of 4

Thread: More Photos Bug-Fix

  1. #1
    Kleetus
    Guest

    Default More Photos Bug-Fix

    Hi @ all,

    this is the bugfix for "more photos" on profile page. It was created by Talex83 from Expertzzz forum !

    In profile.php find
    PHP Code:
    function PrintThumbMorePhotos($long_text 0)
    {
    ..........

    and replace with
    PHP Code:
    function PrintThumbMorePhotos($long_text 0)
    {
        global 
    $site;
        global 
    $dir;
        global 
    $pic_num;
        global 
    $ID//  profile view id
        
    global $icon_yellow;
        global 
    $p_arr;
        global 
    $tmpl;
        global 
    $logged;

        
        
    $oPhoto = new ProfilePhotos$ID );
        
    $query "SELECT `med_id` , `med_prof_id` , `med_file` , `med_title`  FROM `media`WHERE `med_prof_id` =$ID AND `med_status` = 'active'";
        
    $photo_res db_res($query);
        
    $yes_ph 0;
        
        while ( 
    $arr_pic mysql_fetch_array($photo_res) )
        {
            
    $pics['name'] = $dir['profileImage'] ."$ID/photo_".$arr_pic['med_file'];
            
    $pics['exist'] = file_exists$pics[name] );
            
            if ( 
    $pics['exist'] )
            {
                
    $yes_ph 1;
                
    $photo_counter ++;
            }
            
        }
        
        
    /*require_once( BX_DIRECTORY_PATH_ROOT . 'profilePhotos.php' );
        $oPhoto = new ProfilePhotos( $ID );
        $oPhoto -> getMediaArray();
        $yes_ph = $photo_counter = $oPhoto -> iMediaCount;
        */
        

        
    if ( $long_text )
            
    $long_text _t("_More Photos2"$p_arr['NickName'] );
        else
            
    $long_text _t("_More Photos");

        
    $member['ID'] = (int)$_COOKIE['memberID'];
        
    $check_res checkAction$member['ID'], ACTION_ID_VIEW_PHOTOS );
        
        if ( 
    $yes_ph && ( $logged['admin'] || $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) )
        {
           
    $ret .= "<a href='javascript:void(0);' onClick='javascript: get_gallery($ID);'> $photo_counter &nbsp;$long_text </a>";
            return 
    $ret;
        }

        return 
    "";

    I don't know if it works, but will test it that evening !

    Thanks Talex83 !

  2. #2
    Kleetus
    Guest

    Default

    It works !!!

    You just have to change
    PHP Code:
    $ret .= "<a href='javascript:void(0);' onClick='javascript: get_gallery($ID);'> $photo_counter &nbsp;$long_text </a>"
    to
    PHP Code:
    $ret .= '<a href="' $site['url'] . 'photos_gallery.php?ID=' $ID '">' $photo_counter '&nbsp;' $long_text '</a>'

  3. #3

    Join Date
    Mar 2007
    Posts
    23

    Default The second fix makes it complete!

    Fixed my problem! Tested out fine!

  4. #4

    Join Date
    Jun 2007
    Posts
    4

    Default Working fine !

    These 2 fixes are working fine
    Thank you !

    Michel

+ Reply to Thread (include dating software, release, and patch number!)

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Problem with photos
    By Techbot in forum General Troubleshooting
    Replies: 5
    Last Post: 12-05-2006, 10:44 AM
  2. Clickin on more photos
    By gvpm in forum Bugs Dolphin v.5.3.0
    Replies: 0
    Last Post: 10-22-2006, 12:25 AM
  3. Photos are not to scale...
    By shaitan in forum General Troubleshooting
    Replies: 13
    Last Post: 10-18-2006, 02:44 AM
  4. top photos
    By treedguy in forum General Issues, Comments, Questions
    Replies: 2
    Last Post: 10-15-2006, 02:23 AM
  5. Comments on photos?
    By Techbot in forum FAQ & HOWTO
    Replies: 1
    Last Post: 10-01-2006, 03:09 AM

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