Jump to content

9.как убрать иконки на кнопках


Recommended Posts

KoVaLsKy

Заменить все кнопки в шаблонах VamShop весьма просто.

В шаблонах до версии 1.66 (включительно) можно было просто перерисовать все кнопки в папке templates - шаблон - buttons - russian.

Но, начиная с версии 1.67, кнопки в шаблонах VamShop формируются и прорисовываются скриптом. Причем, в кнопках появились мелкие иконки рядом с самой надписью.

Это не всегда нужно, и иногда и вообще не нужно.

Что делать, чтобы удалить иконки в шаблонах VamShop?

Чтобы не было иконок в кнопках шаблонов VamShop (в 1.67 версии и далее), оказывается, можно просто удалить файлы этих иконок вimages - icons - buttons.

А можно просто немного подправить файлы:

/inc/vam_image_button.inc.php

<?php

function vam_image_button($image, $alt = '', $parameters = '') {

if (!empty($image) && file_exists(DIR_FS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image)) {

$content = '<span>'. $alt.'</span>';

} else {

$content = '<span>'. $alt.'</span>';

}

return $content;

}

?>

/inc/vam_image_submit.inc.php

<?php

function vam_image_submit($image, $alt = '', $parameters = '') {

if (!empty($image) && file_exists(DIR_FS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image)) {

$image_submit = '<span><button type="submit"';

if (vam_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>' . $alt . '</button></span>';

} else {

$image_submit = '<span><button type="submit"';

if (vam_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>' . $alt . '</button></span>';

}

return $image_submit;

}

?>

Сами заготовки для кнопок находятся в папке templates - шаблон - img - vamcart - buttons. Это файлы form_buttons.gif и form_buttons.png. Их и нужно перерисовывать, чтобы изменить фон кнопок.

А отступы в кнопках нажно регулировать в файле стилей templates - шаблон - stylesheet.css в разделе /* Buttons */

взято отсюда http://clipartmag.ru/buttons-vamshop.html

Link to post
Share on other sites
  • 2 months later...

Для неопытных пользователей кнопки всё-таки лучше удалять или переименовывать. Если кнопка не найдена, то запроса к серверу не будет и 404-й ошибки не будет. И не придётся php-файлы курочить.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...