مساعدة في ادراج اضافات في التسجيل

Started by saded, October 15, 2012, 05:47:08 AM

Previous topic - Next topic

saded

ممكن مساعدتي في اضافة تاريخ الازدياد و كذلك البلد و المكان كما في الصور التالية




بالنسبة لتاريخ الازدياد ، قمت باضافة الكود
global $context, $txt, $modSettings;
if (cache_get_data('intuitive_age', 120) != null)
{
$years = cache_get_data('intuitive_age', 120);
}
else
{
$years = array();
$base_year = 1904;
$current_year = date('Y');
$count = $base_year;
$age = 0;
$ages = array();
while ($count < $current_year)
{
++$count;
$years[] = $count;
}
$years = array_reverse($years);
foreach ($years as $year)
{
$ages[$year] = ++$age;
$year = array();
$year[$age] = $year;
}
cache_put_data('intuitive_age', $years, 120);
}
$days = array(
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31,
);

// Just show the pretty box!
echo '
<dl class="register_form">
<dt>
<strong>', $txt['dob'], ':</strong>
</dt>
<dd>
<select name="bday1" id="bday1" style="padding: 4px;">
<option value="00"', isset($context['member']['birth_date']['month']) && ($context['member']['birth_date']['month'] == '' || $context['member']['birth_date']['month'] == '00') ? ' selected="selected"' : '', '>', $txt['calendar_month'], '&nbsp;</option>';
foreach ($txt['months_short'] as $key => $month)
{
echo '<option value="', $key, '"', !empty($context['member']['birth_date']['month']) && $context['member']['birth_date']['month'] == $key ? ' selected="selected"' : '', '>', $month, '&nbsp;</option>';
}
echo '</select>
<select name="bday2" id="bday2" style="padding: 4px;">
<option value="00"', isset($context['member']['birth_date']['day']) && ($context['member']['birth_date']['day'] == '' || $context['member']['birth_date']['day'] == '00') ? ' selected="selected"' : '', '>', $txt['calendar_day'], '&nbsp;</option>';
foreach ($days as $day)
{
echo '<option value="', $day, '"', !empty($context['member']['birth_date']['day']) && $context['member']['birth_date']['day'] == $day ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
}
echo '</select>';
if (!empty($years))
{
echo '<select name="bday3" id="bday2" style="padding: 4px;">
<option value="0000"', isset($context['member']['birth_date']['year']) && ($context['member']['birth_date']['year'] == '' || $context['member']['birth_date']['year'] == '0000') ? ' selected="selected"' : '', '>', $txt['calendar_year'], '&nbsp;</option>';
foreach ($years as $key => $year)
{
echo '<option value="', $year, '"', !empty($context['member']['birth_date']['year']) && $context['member']['birth_date']['year'] == $year ? ' selected="selected"' : '', '', !empty($modSettings['coppaAge']) && $modSettings['coppaAge'] >= $year && $modSettings['coppaType'] == 0 ? ' disabled="disabled"' : '', '>', $year, '&nbsp;</option>';
}
echo '</select>';
}
else
{
echo '<input type="text" name="bday3" size="4" maxlength="4" value"', $context['member']['birth_date']['year'], '" class="input_text" />';
}
echo '
</dd>
</dl>';


وهذا طبعا في ملف
Register.template.php
وبعد
// If OpenID is enabled, give the user a choice between password and OpenID.
if (!empty($modSettings['enableOpenID']))

فظهرت النتيجة كما في الصورة


فظهرت معها كما هو موضوح في الصورة : استخذام موثوق وفيها خدمة الهوية
لا اعرف كيف ظهرت معها
ممكن مساعدة في ادراج هذه الاضافات على شكل مربع اختيار







BaghdadGhost

للتخلص من السطر الذي ظهر لك الذهاب الى

الادارة ---- تحكم الاعضاء --- معالجة التسجيل --- اعدادات

من ثم رفع مؤشر الصح من على المربع الصغير اما العبارة

Quoteالسماح للأعضاء بتسجيل حساب جديد باستخدام OpenID

لايجاد النص (تاريخ الميلاد) المفقود من العملية

ضع

$txt['dob'] = 'تاريخ الميلاد';

قبل

?>

نهاية الملف

./Themes/default/languages/Modifications.arabic-utf8


saded

بالنسبة الى السماح للأعضاء بتسجيل حساب جديد باستخدام
OpenID 
لا يوجد تأشير عليها اصلا

اما بالنسبة لاضافة

Code: [Select]
$txt['dob'] = 'تاريخ الميلاد';
تم التنفيذ

saded

وبالنسبة للدول و المدينة ، هل يمكنني عمل قائمة للاختيار؟

BaghdadGhost

Quote from: saded on October 16, 2012, 03:23:54 PM
وبالنسبة للدول و المدينة ، هل يمكنني عمل قائمة للاختيار؟

جرب هذا المود

http://custom.simplemachines.org/mods/index.php?mod=417


saded


BaghdadGhost

يتم التفعيل من

الادارة --- اعدادات التعديلات

تفعيل علم البلد يتطلب من العضو اختيار بلد التواجد؟ اضهار العلم مع الردود

saded

لا اجد في تعليماتإعدادات التعديلات
الا اخرى و تظهر فيها

اخرى

Enable Adk Avatar User State

BaghdadGhost

هل انت متاكد من ان عملية التنصيب حدثت من دون اي مشكله؟

هل ظهرت لك ملاحظة اثناء التنصيب

هل يوجد اي تفارير خطا في سجل الاخطاء

saded


BaghdadGhost

هل يوجد اي تفارير خطا في سجل الاخطاء

saded

الملفات كلها مثبتة لكن لم انتبه من قبل ما اذا كان هناك خطا في تقرير

Advertisement: