-
نشان دادن سن کاربر در پستها براي 1.1.7
اموزش
ابتدا فايل زير را باز کنيد:
Sources/Load.php
اين کدو پيدا کنيد:
کد:
);
}
}
return true;
}
اين کدو جاي گزينش کنيد:
کد:
);
}
}
// ===== Begin modification - Display Age and Location next to posts =====
if (!empty($profile['birthdate']) && $profile['birthdate'] !== '0001-01-01')
{
list ($birth_year, $birth_month, $birth_day) = sscanf($profile['birthdate'], '%d-%d-%d');
$datearray = getdate(forum_time());
$memberContext[$user] += array(
'age' => $birth_year <= 4 ? $txt[470] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1)
);
}
// ===== End modification =====
return true;
}
Display.template.phpقالبتونو باز کنيد
پيدا کنيد:
کد:
echo '
<li>', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
بعدش اين اضافه کنيد:
کد:
loadLanguage('Profile');
// Show the member's age
if (isset($message['member']['age']))
echo '
<li>', $txt[420], ': ', $message['member']['age'], '</li>';
anguages/index.persian.php باز کنيد
پيدا کنيد:
اينو بعدش قرار بدين:
کد:
$txt[420] = 'سن';
منبع:
[مهمان/کاربر گرامی برای دیدن لینک ها ابتدا باید عضو سایت شوید و لاگین کنید برای ثبت نام اینجا کلیک کنید]
جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.
-
-
11-23-2008 01:33 PM
# ADS
تبلیغات در جوملا فارسی
علاقه مندی ها (Bookmarks)