форум vBSupport.ru > vBulletin > vBulletin 3.8.x > Вопросы по vBulletin 3.8
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
compik
Простоузер
Default Как изменить размер поля на главной странице
0

Подскажите пожалуйста, как можно изменить размер поля "Последнее сообщение" на главной странице форума?



Нашел похожую тему на форуме, но видимо там версия старая, не подходит.

В шаблонах forumhome_forumbit_level 1/2 post/nopost вообще не нашел размеров.
Нужный код вроде нашел в шаблоне FORUMHOME, поставил 85%/15% но ничего не изменилось.



Подскажите пожалуйста, может где-то в другом месте нужно смотреть/править? Заранее спасибо.
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
OnlyTouch
Продвинутый
 
OnlyTouch's Avatar
Default
1

Quote:
Originally Posted by compik View Post
Подскажите пожалуйста, может где-то в другом месте нужно смотреть/править?
Управление стилями-> ваш стиль -> Размеры -> Отступ от ячейки таблицы (в пикселях)
Но изменения коснутся всех таблиц форума.
 
 
Elsa
Гость
Default

compik, настройками не изменишь, только правкой шаблона. Где-то обсуждали на форуме, но очень давно. Сделай так:


1. Открой шаблон forumhome_lastpostby и сохрани его содержимое в файлике, это будет резервная копия.
2. Удали всё из шаблона.
3. Скопируй туда код:

Code:
<if condition="$show['lastpostinfo']">
<table width="250"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left">
    <div style="clear:both">
        <if condition="$show['icon']"><img class="inlineimg" src="$icon[iconpath]" alt="$icon[title]" border="0" /></if>
        <span class="smallfont"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$lastpostinfo[lastthreadid]" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a></span>
    </div>
                <div>
        <span class="smallfont"><phrase 1="member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase><span style="color:#ACB6C0"> ( </span>$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if> <span style="color:#ACB6C0">)</span></span>
    </div>
    </td>
    <td>
    <div align="right" valign="middle">
        <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
    </div>
    </td>
  </tr>
</table>
<else />
<div class="smallfont" align="$stylevar[right]">
    $lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
    <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>
4. Во второй строчке можешь заменить ширину таблицы 250 на другую, какую захочешь.
 
 
WEBCAT
Простоузер
Default
1

@compik, чтобы изменить ширину колонки (поля) требуется переопределить стиль. Вместо
width="85%"
напиши
style="width:85%;"
Если не поможет, то полностью "убъёт" старый стиль эта запись
style="width:85% !important;"

Ширину других колонок тоже требуется изменить, чтобы их суммарная ширина равнялась ширине таблицы (width="100%").
 
 
compik
Простоузер
Default
0

Всем спасибо за ответы.

@Elsa, особенно вам большое спасибо.
За основу взял ваш код, он немного не совпадал с оригиналом как по коду, так и по отображению. Я немного поправил данный код, выглядит сейчас все как и хотелось.

Вот сам код, может кому-то еще нужно будет.
Знающим людям попросил бы посмотреть код, нет ли никаких ошибок или чего-то неправильного.

Code:
<if condition="$show['lastpostinfo']">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="smallfont" align="left" style="clear:both">

<span style="white-space:nowrap">
<if condition="$show['icon']"><img class="inlineimg" src="$icon[iconpath]" alt="$icon[title]" border="0" /></if>
<if condition="$lastpostinfo['prefix']">
$lastpostinfo[prefix]
</span>
<if condition="is_browser('safari')"><!--bug#24775-->&nbsp;</if>
<span style="white-space:nowrap">
</if>
<a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$lastpostinfo[lastthreadid]" style="white-space:nowrap" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a></span>

</td>
</tr>

<tr>
<td class="smallfont" align="left" style="clear:both">

<span style="white-space:nowrap<if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>">
<phrase 1="member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase>
</span>

</td>
</tr>	

<tr>	
<td class="smallfont" align="right" valign="middle">

<span align="$stylevar[right]" style="white-space:nowrap">
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
<a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</span>
	
	
<else />
<span class="smallfont" align="$stylevar[right]">
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
<a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</span>
</if>

</td>
</tr>
</table>
 
 
compik
Простоузер
Default
0

Кстати, сразу не заметил, но с использованием данного кода возникают проблемы в мобильной версии. С телефона или планшета все отображается не совсем "красиво".
Как можно решить данную проблему?
 
 
kerk
k0t
 
kerk's Avatar
Default
0

только переделкой стиля под адаптивный, т.е. "и вашим и нашим"
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 03:37 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...