Перейти к содержанию
IPSGuru.ru - Сообщество веб администраторов

Вид прекреплённых файлов


Рекомендуемые сообщения

  • Администраторы

1111.png

  • АЦ - Внешний вид - Стиль - Темы - Show_attachment
  • Заменить весь этот код основным

Версия 1.

Загрузка файла При нажатии на кнопку и на названия файла.

<div class="attachment-box">
  <div class="attachment-url">
    <a href="{parse url="app=core&module=attach&section=attach&attach_id={$data['attach_id']}" base="current"}" title="{$this->lang->words['attach_dl']}"><img src="{$this->settings['public_dir']}<if test="hasmime:|:$data['mime_image']">{$data['mime_image']}<else />style_extra/mime_types/unknown.gif</if>" alt="{$this->lang->words['attached_file']}" /></a> <a href="{parse url="app=core&module=attach&section=attach&attach_id={$data['attach_id']}" base="current"}" title="{$this->lang->words['attach_dl']}"><strong>{$data['attach_file']}</strong></a>
  </div>

  <span class="attachment-button">
    <a href="{parse url="app=core&module=attach&section=attach&attach_id={$data['attach_id']}" base="current"}" title="{$this->lang->words['attach_dl']}">{$this->lang->words['attach_dl']}</a>
  </span>

  <div class="attachment-meta">
    <strong>{$this->lang->words['attach_size']}</strong> {$data['file_size']}  <strong>{$this->lang->words['attach_ahits']}</strong> {$data['attach_hits']}
  </div>
</div>

Версия 2. 

Загрузка файла При нажатии на кнопку.

<div class="attachment-box">
  <div class="attachment-url">
    <a href="{parse url="app=core&module=attach&section=attach&attach_id={$data['attach_id']}" base="current"}" title="{$this->lang->words['attach_dl']}"></a><img src="{$this->settings['public_dir']}<if test="hasmime:|:$data['mime_image']">{$data['mime_image']}<else />style_extra/mime_types/unknown.gif</if>" alt="{$this->lang->words['attached_file']}" /></a> <strong>{$data['attach_file']}</strong>
  </div>

  <span class="attachment-button">
    <a href="{parse url="app=core&module=attach&section=attach&attach_id={$data['attach_id']}" base="current"}" title="{$this->lang->words['attach_dl']}">{$this->lang->words['attach_dl']}</a>
  </span>

  <div class="attachment-meta">
    <strong>{$this->lang->words['attach_size']}</strong> {$data['file_size']}  <strong>{$this->lang->words['attach_ahits']}</strong> {$data['attach_hits']}
  </div>
</div>
  • Далее создаем CSS файл extra.css и вставляем этот код
#attach_wrap li.attachment {
  display: block;
}

.attachment-box {
  margin: 0 auto;
  max-width: 300px;
  border: 4px solid #34495e;
  background: #D1D6D9;
  text-align: center;
}

.attachment-button a {
  display: inline-block;
  margin: 5px 0;
  padding: 4px;
  border: 1px solid #34495e;
  border-radius: 2px;
  background-color: #f0f2f4;
  background-image: -webkit-linear-gradient(top,#f0f2f4 0,#b9def0 100%);
  background-image: linear-gradient(to bottom,#f0f2f4 0,#b9def0 100%);
  color: #31708f;
  text-transform: uppercase;
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eaebee', endColorstr='#ffb9def0', GradientType=0);
}

.attachment-button a:hover {
  background-color: #b9def0;
  background-image: -webkit-linear-gradient(top,#5779BC 0,#b9def0 100%);
  background-image: linear-gradient(to bottom,#5779BC 0,#b9def0 100%);
}

.attachment-url {
  padding: 5px 0;
  background: #55606A;
}

.attachment-meta {
  padding: 5px 0;
  background: #55606A;
  color: #f4f6fb;
  font-size: 11px;
}

 

Ссылка на комментарий

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйтесь. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
  • Последние посетители   0 пользователей онлайн

    • Ни одного зарегистрированного пользователя не просматривает данную страницу
×
×
  • Создать...