Show
Ignore:
Timestamp:
03/20/07 14:58:20 (2 years ago)
Author:
ben
Message:

Profiles now have columns, widgets, and assorted joy. This commit doesn't include the Yahoo User Interface library, which has been chosen to handle back-end AJAX.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/profile/profile.class.php

    r1022 r1030  
    285285    function field_display ($field, $allvalues) { 
    286286 
    287         global $data, $messages
     287        global $data
    288288 
    289289        $run_result = ''; 
     
    296296            $fblurb = !empty($field[3]) ? $field[3] : ''; 
    297297            $fusertype = !empty($field[4]) ? $field[4] : ''; 
    298             $finvisible = false; 
    299             $frequired = false; 
    300298        // Otherwise map things the new way! 
    301299        } else { 
     
    312310     
    313311            // $value = get_record('profile_data','name',$field[1],'owner',$this->id); 
    314          
    315             foreach($allvalues as $curvalue) { 
    316                 if ($curvalue->name == stripslashes($fname)) { 
    317                     $value = $curvalue; 
    318                     break; // found it, done! 
     312            if (is_array($allvalues) && !empty($allvalues)) { 
     313                foreach($allvalues as $curvalue) { 
     314                    if ($curvalue->name == stripslashes($fname)) { 
     315                        $value = $curvalue; 
     316                        break; // found it, done! 
     317                    } 
    319318                } 
    320319            } 
     
    382381                    } 
    383382                    $friends_username = $info->username; 
    384                     $friends_name = htmlspecialchars(stripslashes(user_name($info->ident)), ENT_COMPAT, 'utf-8'); 
     383                    $friends_name = htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8'); 
    385384                    $friends_menu = run("users:infobox:menu",array($info->ident)); 
    386                     $friends_icon = user_icon_html($info->ident,$width); 
    387385                    $body .= <<< END 
    388386                        <td align="center"> 
    389387                        <p> 
    390388                        <a href="{$CFG->wwwroot}{$friends_username}/"> 
    391                         {$friends_icon}</a><br /> 
     389                        <img src="{$CFG->wwwroot}_icon/user/{$info->icon}/w/{$width}" alt="{$friends_name}" border="0" /></a><br /> 
    392390                        <span class="userdetails"> 
    393391                        {$friends_name} 
     
    461459                                          WHERE '.$searchline)) { 
    462460                foreach($result as $key => $info) { 
    463                     $icon = user_icon_html($info->ident,100,true)
     461                    $icon = url . '_icon/user/'.$post->icon
    464462                    $sub_result .= "\t\t\t<item>\n"; 
    465                     $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes(user_info($info->ident)), ENT_COMPAT, 'utf-8') . "]]></name>\n"; 
     463                    $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8') . "]]></name>\n"; 
    466464                    $sub_result .= "\t\t\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; 
    467465                    $sub_result .= "\t\t\t\t<link>$icon</link>\n"; 
     
    504502                foreach($result as $key => $info) { 
    505503                    $run_result .= "\t<item>\n"; 
    506                     $run_result .= "\t\t<title><![CDATA['" . htmlspecialchars($tagtype, ENT_COMPAT, 'utf-8') . "' = " . htmlspecialchars($tagvalue, ENT_COMPAT, 'utf-8') . " :: " . htmlspecialchars(stripslashes(user_info($info->ident)), ENT_COMPAT, 'utf-8') . "]]></title>\n"; 
     504                    $run_result .= "\t\t<title><![CDATA['" . htmlspecialchars($tagtype, ENT_COMPAT, 'utf-8') . "' = " . htmlspecialchars($tagvalue, ENT_COMPAT, 'utf-8') . " :: " . htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8') . "]]></title>\n"; 
    507505                    $run_result .= "\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; 
    508506                    $run_result .= "\t</item>\n"; 
     
    920918        } 
    921919         
    922         $icon = user_icon_html($info->ident,67)
    923         $name = stripslashes(user_name($info->ident)); 
     920        $icon = '<img alt="" src="' . url . '_icon/user/' . $info->icon . '/w/67" />'
     921        $name = stripslashes($info->name); 
    924922        $url = url . $info->username . "/"; 
    925923