Hi @ all,
this is the bugfix for "more photos" on profile page. It was created by Talex83 from Expertzzz forum !
In profile.php find
and replace withPHP Code:function PrintThumbMorePhotos($long_text = 0)
{
..........
}
I don't know if it works, but will test it that evening !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 $long_text </a>";
return $ret;
}
return "";
}
Thanks Talex83 !![]()


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks