كيفة إستبداء "النص" الخاص بالازرار الى "صورة زر"

Started by islam2hamy, January 05, 2010, 02:55:35 AM

Previous topic - Next topic

islam2hamy

بسم الله الرحمن الرحيم

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

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

Arabic Translator - Web Designer
My Mods / My Themes  //  GfxLand





Advertisement: