menu_bgservdownloadthemesdirforumhome
Smf عربى



المحرر موضوع: كيفة إستبداء "النص" الخاص بالازرار الى "صورة زر"  (زيارة 3714 مرات)

0 الأعضاء و 1 ضيف يشاهدون هذا الموضوع.

غير متصل islam2hamy

  • فريق الإدارة
  • *
  • مشاركة: 952
  • الشعبية: +23/-0
  • الجنس: ذكر
  • أهلا بك فى موقع smf عربى
    • مشاهدة الملف الشخصي
كيفة إستبداء "النص" الخاص بالازرار الى "صورة زر"
« في: 24 , أغسطس, 2009 - 08:48:06 صباحاً »
بسم الله الرحمن الرحيم

سوف نتعلم فى هذا الدرس كيفية إستبداء "النص" الخاص بالازرار الى "صورة زر"
إى إستبدال كلمة "موضوع جديد" الى هذه الصورة "" على سبيل المثال

1 - بالنسبة للنسخة 1.1.x

قم بفتح الملف "index.template.php"

إبحث عن :


شفرة: [اختيار]
$settings['use_buttons'] = true;
إستبدله بـ :

شفرة: [اختيار]
$settings['use_buttons'] = false;
إبحث عن :

شفرة: [اختيار]
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

إستبدله بـ :

شفرة: [اختيار]
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}


2 - بالنسبة للنسخة 2.0

قم بفتح الملف "index.template.php"

إبحث عن :

شفرة: [اختيار]
$settings['use_buttons'] = true;
إستبدله بـ :

شفرة: [اختيار]
$settings['use_buttons'] = false;
إبحث عن :

شفرة: [اختيار]
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

إستبدله بـ :

شفرة: [اختيار]
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $custom_td = '')
{
global $settings, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' . $value['url'] . '"' . (isset($value['content']) ? $value['content'] : (isset($value['active']) ? ' class="active"' : '') . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']])) . '</a>';

if (empty($button_strip))
return '';

echo '
<div ', $custom_td, '>', implode($context['menu_separator'], $buttons) , '</div>';
}


ملحوظه: لا تنس نسخ المجلد الخاص بالازرار الى مجلد الاستايل الذى تستخدمه
مبروك الأن الازرار تعمل  ;D



غير متصل Evolutionist

  • فريق الترجمة
  • *
  • مشاركة: 57
  • الشعبية: +15/-0
  • الجنس: ذكر
    • مشاهدة الملف الشخصي
رد: كيفة إستبداء "النص" الخاص بالازرار الى "صورة زر"
« رد #1 في: 05 , أكتوبر, 2009 - 08:23:57 مسائاً »
درس رائع وشرح بسيط ومفهوم ... بارك الله فيك ..

غير متصل islam2hamy

  • فريق الإدارة
  • *
  • مشاركة: 952
  • الشعبية: +23/-0
  • الجنس: ذكر
  • أهلا بك فى موقع smf عربى
    • مشاهدة الملف الشخصي
رد: كيفة إستبداء "النص" الخاص بالازرار الى "صورة زر"
« رد #2 في: 05 , أكتوبر, 2009 - 10:30:22 مسائاً »
و فيك بارك الله