108health.com : สุขภาพ ผู้หญิง การลดน้ำหนัก อาหารเพื่อสุขภาพ แฟชั่น ครอบครัว ท่องเที่ยว
  สมัครสมาชิก | เข้าสู่ระบบ  
 
คลิปวีดีโอ คลิปวีดีโอ ฟังวิทยุ ฟังวิทยุ โปรโมชั่นแนะนำ โปรโมชั่นแนะนำ Blog Blog gallery gallery เกี่ยวกับเรา เกี่ยวกับเรา
      หน้าแรก » บล็อกบล็อก นายเอ้จร้าๆ
บล็อก <?=บล็อก นายเอ้จร้าๆ?> บล็อกบล็อก นายเอ้จร้าๆ
บล็อกทั่วไปจร้า http://www.108health.com ทักทายกันได้ครับผม
ปรับปรุงล่าสุด : 2013-05-20
โดย : อำนวย จิตต์กลาง | จำนวนบทความ : 61 บทความ | หมวด : คุณแม่-คุณพ่อนักเขียน
การทำ รูปภาพส่วนตัวให้กับ smf 2.0.3
File Edits
./Sources/Load.php
Find: [Select]
'time_offset' => empty($user_settings['time_offset']) ? 0 : $user_settings['time_offset'],
Add After: [Select]
'gender' => empty($user_settings['gender']) ? '' : $user_settings['gender'],
 
Find: [Select]
// Are we also loading the members custom fields into context?
Add Before: [Select]
 
// Default avatar mod starts here.
if($memberContext[$user]['avatar']['image'] == '' && !empty($modSettings['enable_default_avatar']) && ($memberContext[$user]['gender']['name'] == $txt['male']) && !empty($modSettings['default_male_avatar_url']))
$memberContext[$user]['avatar'] = array(
'name' => '',
'image' => (($profile['is_online'] || empty($modSettings['default_avatar_opacity'])) ? '<img class="avatar" src="' . $modSettings['default_male_avatar_url'] . '" alt="" />' : '<img class="avatar" src="' . $modSettings['default_male_avatar_url'] . '" alt="" />'),
'href' => '',
'url' => '',
);
 
elseif($memberContext[$user]['avatar']['image'] == '' && !empty($modSettings['enable_default_avatar']) && ($memberContext[$user]['gender']['name'] == $txt['female']) && !empty($modSettings['default_female_avatar_url']))
$memberContext[$user]['avatar'] = array(
'name' => '',
'image' => (($profile['is_online'] || empty($modSettings['default_avatar_opacity'])) ? '<img class="avatar" src="' . $modSettings['default_female_avatar_url'] . '" alt="" />' : '<img class="avatar_offline" src="' . $modSettings['default_female_avatar_url'] . '" alt="" />'),
'href' => '',
'url' => '',
);
 
elseif($memberContext[$user]['avatar']['image'] == '' && !empty($modSettings['enable_default_avatar']) && !empty($modSettings['default_avatar_url']))
$memberContext[$user]['avatar'] = array(
'name' => '',
'image' => (($profile['is_online'] || empty($modSettings['default_avatar_opacity'])) ? '<img class="avatar" src="' . $modSettings['default_avatar_url'] . '" alt="" />' : '<img class="avatar_offline" src="' . $modSettings['default_avatar_url'] . '" alt="" />'),
'href' => '',
'url' => '',
);
 
elseif($memberContext[$user]['avatar']['image'] == '' && !empty($modSettings['enable_default_avatar']))
$memberContext[$user]['avatar'] = array(
'name' => '',
'image' => (($profile['is_online'] || empty($modSettings['default_avatar_opacity'])) ? '<img class="avatar" src="' . $settings['default_images_url'] . '/default_avatar.png" alt="" />' : '<img class="avatar_offline" src="' . $settings['default_images_url'] . '/default_avatar.png" alt="" />'),
'href' => '',
'url' => '',
);
// Default avatar mod ends.
 
 
Find: [Select]
'email' => $user_info['email'],
Add After: [Select]
'gender' => $user_info['gender'],
 
Find: [Select]
$context['html_headers'] = '';
Add After: [Select]
 
if(!empty($modSettings['default_avatar_opacity']))
{
$context['html_headers'] .= '
<style type="text/css">
.avatar_offline
{
filter:alpha(opacity=30);
-moz-opacity:0.3;
-khtml-opacity: 0.3;
opacity: 0.3;
}
</style>';
}
 
 
./Sources/Subs.php
Find: [Select]
// Figure out how long they've been logged in.
Add Before: [Select]
 
// Default avatar mod starts here.
if(empty($context['user']['avatar']['image']) && !empty($modSettings['enable_default_avatar']) && ($context['user']['gender'] == '1') && !empty($modSettings['default_male_avatar_url']))
$context['user']['avatar'] = array(
'name' => '',
'image' => '<img class="avatar" src="' . $modSettings['default_male_avatar_url'] . '" />',
'href' => '',
'url' => '',
);
 
elseif(empty($context['user']['avatar']['image']) && !empty($modSettings['enable_default_avatar']) && ($context['user']['gender'] == '2') && !empty($modSettings['default_female_avatar_url']))
$context['user']['avatar'] = array(
'name' => '',
'image' => '<img class="avatar" src="' . $modSettings['default_female_avatar_url'] . '" />',
'href' => '',
'url' => '',
);
 
elseif(empty($context['user']['avatar']['image']) && !empty($modSettings['enable_default_avatar']) && !empty($modSettings['default_avatar_url']))
$context['user']['avatar'] = array(
'name' => '',
'image' => '<img class="avatar" src="' . $modSettings['default_avatar_url'] . '" />',
'href' => $modSettings['default_avatar_url'],
'url' => '',
);
 
elseif(empty($context['user']['avatar']['image']) && !empty($modSettings['enable_default_avatar']))
$context['user']['avatar'] = array(
'name' => '',
'image' => '<img class="avatar" src="' . $settings['default_images_url'] . '/default_avatar.png" />',
'href' => '',
'url' => '',
);
// Default avatar mod ends.
 
 
./Sources/ManageSettings.php
Find: [Select]
$config_vars = array(
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
Add After: [Select]
array('check', 'enable_default_avatar'),
array('text', 'default_male_avatar_url'),
array('text', 'default_female_avatar_url'),
array('text', 'default_avatar_url', 'subtext' => $txt['default_avatar_path']),
array('check', 'default_avatar_opacity'),
 
./Themes/default/languages/Modifications.english.php
Find (at the end of the file): [Select]
?>
Add Before: [Select]
 
$txt['enable_default_avatar'] = 'Enable Default Avatar';
$txt['default_male_avatar_url'] = 'Image path for Default Avatar image for male members';
$txt['default_female_avatar_url'] = 'Image path for Default Avatar image for female members';
$txt['default_avatar_url'] = 'Image path for Default Avatar image';
$txt['default_avatar_path'] = '(If you haven't provide any url a default image will be shown)';
$txt['default_avatar_opacity'] = 'Makes default avatars transparent when user logs out';
 
File Operations
download mod ได้ที่ http://custom.simplemachines.org/mods/index.php?mod=2665 และรูปภาพ
Share |
เมื่อวันที่ : 2013-01-17 | อ่าน : 879 ครั้ง | ความเห็น : 0 ความเห็น
ชื่อผู้แสดงความคิดเห็น
รายละเอียด
108บล็อกเกอร์
บล็อกที่แสนจะเต็มไปด้วยชีวิตชีวา