Bump a Thread

Bump a Thread 1.2.0

Нет прав для скачивания
Вот как я сделал, вписал в thread_view после :
Код:
<div class="linkGroup SelectionCountContainer">
    <xen:if is="{$thread.canBump}">
<a href="{xen:link threads/bump, $thread}" class="item control Bump">{xen:phrase xfa_bump_thread_bump}</a>
</xen:if>

Все ровно встало. Смотрите скрин.

Но теперь у меня вопрос. Как сделать эту кнопку "Поднять тему" в рамочку отдельным стилем?
Если я меняю див класс: <div class="linkGroup SelectionCountContainer"> на другой, то кнопка смещается на верх.
Если я меняю что-то тут: class="item control Bump - то ничего не меняется.

Как правильно прописать чтобы использовать еще 1 класс для кнопки?
 

Вложения

  • 111.jpg
    111.jpg
    66.2 KB · Просмотры: 48
Я бы сказал, но нет желания и времени проделывать все манипуляции с дополнением.
 
Мне нужно видеть всё в живую, так проще.
 
Вот пожалуйста, весь thread_view
Код:
<xen:title>{xen:helper threadPrefix, $thread, escaped}{$thread.title}{xen:helper pagenumber, $page}</xen:title>
<xen:h1>{xen:helper threadPrefix, $thread}{$thread.title}</xen:h1>

<xen:description>
    {xen:phrase discussion_in_x_started_by_y_date_z,
        'forum=<a href="{xen:link forums, $forum}">{$forum.title}</a>',
        'name={xen:helper username, $thread}',
        'date=<a href="{xen:link threads, $thread}">{xen:datetime $thread.post_date, html}</a>'}
</xen:description>

<xen:navigation>
    <xen:breadcrumb source="$nodeBreadCrumbs" />
</xen:navigation>

<xen:container var="$head.canonical">
    <link rel="canonical" href="{xen:link 'canonical:threads', $thread, 'page={$page}'}" /></xen:container>
<xen:container var="$head.description">
    <meta name="description" content="{xen:helper snippet, $firstPost.message, 155}" /></xen:container>
<xen:container var="$head.openGraph"><xen:include template="open_graph_meta">
        <xen:set var="$url">{xen:link 'canonical:threads', $thread}</xen:set>
        <xen:set var="$title">{xen:helper threadPrefix, $thread, escaped}{$thread.title}</xen:set>
        <xen:set var="$description">{xen:helper snippet, $firstPost.message, 155}</xen:set>
        <xen:set var="$avatar">{xen:helper avatar, $thread, m, 0, 1}</xen:set>
    </xen:include></xen:container>
<xen:container var="$bodyClasses">{xen:helper nodeClasses, $nodeBreadCrumbs, $forum}</xen:container>
<xen:container var="$searchBar.thread"><xen:include template="search_bar_thread_only" /></xen:container>
<xen:container var="$searchBar.forum"><xen:include template="search_bar_forum_only" /></xen:container>

<xen:if is="{$canReply}">
    <xen:comment><xen:topctrl>
        <a href="{xen:link 'threads/reply', $thread}" class="callToAction"><span>{xen:phrase reply_to_thread}</span></a>
    </xen:topctrl></xen:comment>
</xen:if>

<xen:require css="thread_view.css" />

<xen:edithint template="message" />

<xen:if is="{$poll}">
    <xen:include template="poll_block">
        <xen:set var="$options">
            <xen:if is="{$poll.canVote}">
                <xen:include template="poll_block_vote" />
            <xen:else />
                <xen:include template="poll_block_result" />
            </xen:if>
        </xen:set>
    </xen:include>
</xen:if>

<xen:if is="{$showPostedNotice}">
    <div class="importantMessage">{xen:phrase message_submitted_displayed_pending_approval}</div>
</xen:if>

<xen:set var="$threadStatusHtml">
    <xen:if hascontent="true">
        <dl class="threadAlerts secondaryContent">
            <dt>{xen:phrase thread_status}:</dt>
            <xen:contentcheck>
                <xen:if is="{$thread.discussion_state} == 'deleted'">
                    <dd class="deletedAlert">
                        <span class="icon Tooltip" title="{xen:phrase deleted}" data-tipclass="iconTip"></span>
                            {xen:phrase removed_from_public_view}</dd>
                <xen:elseif is="{$thread.discussion_state} == 'moderated'" />
                    <dd class="moderatedAlert">
                        <span class="icon Tooltip" title="{xen:phrase awaiting_moderation}" data-tipclass="iconTip"></span>
                            {xen:phrase awaiting_moderation_before_being_displayed_publicly}</dd>
                </xen:if>
   
                <xen:if is="!{$thread.discussion_open}">
                    <dd class="lockedAlert">
                        <span class="icon Tooltip" title="{xen:phrase locked}" data-tipclass="iconTip"></span>
                            {xen:phrase not_open_for_further_replies}</dd>
                </xen:if>
            </xen:contentcheck>
        </dl>
    </xen:if>
</xen:set>
{xen:raw $threadStatusHtml}

<xen:hook name="thread_view_pagenav_before" params="{xen:array 'thread={$thread}'}" />

<div class="pageNavLinkGroup">

    <div class="linkGroup SelectionCountContainer">
    <xen:if is="{$thread.canBump}">
<a href="{xen:link threads/bump, $thread}" class="item control Bump">{xen:phrase xfa_bump_thread_bump}</a>
</xen:if>
        <xen:if hascontent="true">
       
            <div class="Popup">
                <a rel="Menu">{xen:phrase thread_tools}</a>
                <div class="Menu">
                <xen:contentcheck>
                    <xen:if hascontent="true">
                    <div class="primaryContent menuHeader"><h3>{xen:phrase thread_tools}</h3></div>
                    <ul class="secondaryContent blockLinksList">
                        <xen:contentcheck>
                            <xen:if is="{$canEditThread}">
                                <li><a href="{xen:link 'threads/edit', $thread}" class="OverlayTrigger">{xen:phrase edit_thread}</a></li>
                            <xen:elseif is="{$canEditTitle}" />
                                <li><a href="{xen:link threads/edit-title, $thread}" class="OverlayTrigger">{xen:phrase edit_title}</a></li>
                            </xen:if>
                            <xen:if is="{$canDeleteThread}">
                                <li><a href="{xen:link 'threads/delete', $thread}" class="OverlayTrigger">{xen:phrase delete_thread}</a></li>
                            </xen:if>
                            <xen:if is="{$canMoveThread}">
                                <li><a href="{xen:link 'threads/move', $thread}" class="OverlayTrigger">{xen:phrase move_thread}</a></li>
                            </xen:if>
                            <xen:if is="{$canViewModeratorLog}">
                                <li><a href="{xen:link 'threads/moderator-actions', $thread}" class="OverlayTrigger">{xen:phrase moderator_actions}</a></li>
                            </xen:if>
                            <xen:if is="{$deletedPosts}">
                                <li><a href="{xen:link threads/show-posts, $thread, 'page={$page}'}" class="MessageLoader" data-messageSelector="#messageList .message.deleted.placeholder">{xen:phrase show_deleted_posts}</a></li>
                            </xen:if>
                            <xen:hook name="thread_view_tools_links" params="{xen:array 'thread={$thread}'}" />
                        </xen:contentcheck>
                    </ul>
                    </xen:if>
                    <xen:if hascontent="true">
                    <form action="{xen:link threads/quick-update, $thread}" method="post" class="AutoValidator">
                        <ul class="secondaryContent blockLinksList checkboxColumns">
                        <xen:contentcheck>
                            <xen:if is="{$canLockUnlockThread}">
                            <li><label><input type="checkbox" name="discussion_open" value="1" class="SubmitOnChange" {xen:checked $thread.discussion_open} />
                                {xen:phrase open_thread}</label>
                                <input type="hidden" name="set[discussion_open]" value="1" /></li></xen:if>
                            <xen:if is="{$canStickUnstickThread}">
                            <li><label><input type="checkbox" name="sticky" value="1" class="SubmitOnChange" {xen:checked $thread.sticky} />
                                {xen:phrase sticky}</label>
                                <input type="hidden" name="set[sticky]" value="1" /></li></xen:if>
                        </xen:contentcheck>
                        </ul>
                        <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
                    </form>
                    </xen:if>
                    <xen:if is="{$thread.canInlineMod}">
                    <form action="{xen:link inline-mod/thread/switch}" method="post" class="InlineModForm sectionFooter" id="threadViewThreadCheck"
                        data-cookieName="threads">
                        <label><input type="checkbox" name="threads[]" value="{$thread.thread_id}" class="InlineModCheck" /> {xen:phrase select_for_thread_moderation}</label>
                        <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
                    </form>
                    </xen:if>
                </xen:contentcheck>
                </div>
            </div>
        </xen:if>
        <xen:if is="{$canWatchThread}">
            <a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
        </xen:if>
    </div>

    <xen:pagenav link="threads" linkdata="{$thread}"
        page="{$page}" perpage="{$postsPerPage}" total="{$totalPosts}"
        unreadlink="{$unreadLink}" />
</div>

<xen:include template="ad_thread_view_above_messages" />

<xen:hook name="thread_view_form_before" params="{xen:array 'thread={$thread}'}" />

<form action="{xen:link 'inline-mod/post/switch'}" method="post"
    class="InlineModForm section"
    data-cookieName="posts"
    data-controls="#InlineModControls"
    data-imodOptions="#ModerationSelect option">

    <ol class="messageList" id="messageList">
        <xen:foreach loop="$posts" value="$post">
            <xen:if is="{$post.message_state} == 'deleted'">
                <xen:include template="post_deleted_placeholder" />
            <xen:else />
                <xen:include template="post" />
            </xen:if>
        </xen:foreach>
        <xen:edithint template="attached_files" />
    </ol>

    <xen:if is="{$inlineModOptions}">
        <div class="sectionFooter InlineMod Hide">
            <label for="ModerationSelect">{xen:phrase perform_action_with_selected_posts}...</label>

            <xen:include template="inline_mod_controls">
                <xen:set var="$text">{xen:phrase post_moderation}</xen:set>
                <xen:set var="$options">
                    <xen:if is="{$inlineModOptions.delete}"><option value="delete">{xen:phrase delete_posts}...</option></xen:if>
                    <xen:if is="{$inlineModOptions.undelete}"><option value="undelete">{xen:phrase undelete_posts}</option></xen:if>
                    <xen:if is="{$inlineModOptions.approve}"><option value="approve">{xen:phrase approve_posts}</option></xen:if>
                    <xen:if is="{$inlineModOptions.unapprove}"><option value="unapprove">{xen:phrase unapprove_posts}</option></xen:if>
                    <xen:if is="{$inlineModOptions.move}"><option value="move">{xen:phrase move_posts}...</option></xen:if>
                    <xen:if is="{$inlineModOptions.copy}"><option value="copy">{xen:phrase copy_posts}...</option></xen:if>
                    <xen:if is="{$inlineModOptions.merge}"><option value="merge">{xen:phrase merge_posts}...</option></xen:if>
                    <option value="deselect">{xen:phrase deselect_posts}</option>
                </xen:set>
                <xen:set var="$checkboxTitle">{xen:phrase select_deselect_all_posts_on_this_page}</xen:set>
                <xen:set var="$selectedItemsPhrase">{xen:phrase selected_posts}</xen:set>
            </xen:include>
        </div>
    </xen:if>

    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />

</form>

<xen:if hascontent="true">
    <div class="pageNavLinkGroup">
        <xen:contentcheck>
            <xen:if is="{$canQuickReply}">
                <xen:if is="{$postsRemaining}">
                    <div class="linkGroup">
                        <xen:if is="{$postsRemaining} == 1">
                            <a href="{xen:link threads, $thread, 'page={xen:calc "{$page} + 1"}'}" class="postsRemaining">{xen:phrase 1_more_message}...</a>
                        <xen:else />
                            <a href="{xen:link threads, $thread, 'page={xen:calc "{$page} + 1"}'}" class="postsRemaining">{xen:phrase x_more_messages, 'count={xen:number $postsRemaining}'}...</a>
                        </xen:if>
                    </div>
                </xen:if>
            <xen:else />
                <div class="linkGroup">
                    <xen:if is="{$canReply}">
                        <a href="{xen:link 'threads/reply', $thread}" class="callToAction"><span>{xen:phrase reply_to_thread}</span></a>
                    <xen:elseif is="{$visitor.user_id}" />
                        <span class="element">({xen:phrase no_permission_to_reply})</span>
                    <xen:else />
                        <label for="LoginControl"><a href="{xen:link login}" class="concealed element">({xen:phrase log_in_or_sign_up_to_reply})</a></label>
                    </xen:if>
                </div>
            </xen:if>
            <div class="linkGroup"{xen:if '!{$ignoredNames}', ' style="display: none"'}><a href="javascript:" class="muted JsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a></div>

            <xen:pagenav link="threads" linkdata="{$thread}"
                page="{$page}" perpage="{$postsPerPage}" total="{$totalPosts}"
                unreadlink="{$unreadLink}"
            />
        </xen:contentcheck>
    </div>
</xen:if>

<xen:include template="ad_thread_view_below_messages" />

<xen:hook name="thread_view_qr_before" params="{xen:array 'thread={$thread}'}" />

<xen:if is="{$canQuickReply}">
    <xen:include template="quick_reply">
        <xen:set var="$formAction">{xen:link 'threads/add-reply', $thread}</xen:set>
        <xen:set var="$lastDate">{$lastPost.post_date}</xen:set>
        <xen:set var="$lastKnownDate">{$thread.last_post_date}</xen:set>
        <xen:set var="$showMoreOptions">1</xen:set>
        <xen:set var="$multiQuoteAction">{xen:link 'threads/multi-quote', $thread, 'formId=#QuickReply'}</xen:set>
    </xen:include>
</xen:if>

<xen:hook name="thread_view_qr_after" params="{xen:array 'thread={$thread}'}" />

{xen:raw $threadStatusHtml}

<xen:include template="share_page">
    <xen:set var="$url">{xen:link 'canonical:threads', $thread}</xen:set>
</xen:include>

А как я в живую вам покажу то )
 
Благодарю конечно, но я подразумевал тестовый аккаунт, с возможностью видеть данную кнопку, так как шаблон я и сам могу посмотреть.
 
логин: 7able7
пароль: qazx1234567
тестовая тема:
 
Последнее редактирование модератором:
Примерно так, добавьте в EXTRA.css, такой код.
Код:
.Bump {
    border: 1px solid;
    border-radius: 5px;
    padding: 3px !important;
}
bump_as_thread.png
 
  • Мне нравится
Реакции: Hope
Вписал, посмотрите, все без изменений :(
 
Доступ к шаблонам в админке дайте, посмотрю, что не так.
 
Супер! Огромное спасибо!!!
 
Сделал, в итоге код выглядит так.
Код:
/* Добавляем рамку, для кнопки апа в верхнем меню темы */
.Bump {
    color:red;
    border: 1px solid;
    border-radius: 5px;
    padding: 3px !important;
}
/* End Добавляем рамку, для кнопки апа в верхнем меню темы */
/* Убираем рамку, для кнопки апа в первом посте темы */
.message .privateControls .Bump {
    border: 0px none ;
    border-radius: 0px;
    padding: 0px !important;
}
/* End Убираем рамку, для кнопки апа в первом посте темы */
 
Многие пользователи не замечают кнопку и продолжают апать темы бессмысленными постами.
Вот по этому я хотел сделать подобный эффект как тут в footer-е у кнопок "регистрация" и "войти"
Можно сделать подобный эффект? Если да, то подскажите пожалуйста как. Не получается у меня
 
Черновой вариант, остальное сейчас подгоним.
Код:
/* Добавляем стилизацию, для кнопки апа в верхнем меню темы */
@-webkit-keyframes colorPulse {
from { background-color: #bc330d; -webkit-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -webkit-box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; -webkit-box-shadow: 0 0 9px #333; }
        }
@-moz-keyframes colorPulse {
from { background-color: #bc330d; -moz-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -moz-box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; -moz-box-shadow: 0 0 9px #333; }
        }
@-o-keyframes colorPulse {
from { background-color: #bc330d; -o-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -o-box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; -o-box-shadow: 0 0 9px #333; }
        }
@keyframes colorPulse {
from { background-color: #bc330d; box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; box-shadow: 0 0 9px #333; }
        }
.Bump {
border: 1px solid;
border-radius: 5px;
padding: 3px !important;
background: transparent !important;
-webkit-animation-name: colorPulse;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-moz-animation-name: colorPulse;
-moz-animation-duration: 2s;
-moz-animation-iteration-count: infinite;
-o-animation-name: colorPulse;
-o-animation-duration: 2s;
-o-animation-iteration-count: infinite;
animation-name: colorPulse;
animation-duration: 2s;
animation-iteration-count: infinite;
background: none repeat scroll 0% 0% #750606 !important;
}
Bump:hover {
  background: #e33100 !important;
}
/* End Добавляем стилизацию, для кнопки апа в верхнем меню темы */
/* Убираем стилизацию, для кнопки апа в первом посте темы */
.message .privateControls .Bump {
    border: 0px none ;
    border-radius: 0px;
    padding: 0px !important;
}
/* End Убираем стилизацию, для кнопки апа в первом посте темы */

Итоговый.
Код:
/* Добавляем стилизацию, для кнопки апа в верхнем меню темы */
@-webkit-keyframes colorPulse {
from { background-color: #bc330d; -webkit-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -webkit-box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; -webkit-box-shadow: 0 0 9px #333; }
        }
@-moz-keyframes colorPulse {
from { background-color: #bc330d; -moz-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -moz-box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; -moz-box-shadow: 0 0 9px #333; }
        }
@-o-keyframes colorPulse {
from { background-color: #bc330d; -o-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -o-box-shadow: 0 0 18px #e33100; }
          to { background-color: #bc330d; -o-box-shadow: 0 0 9px #333; }
        }
@keyframes colorPulse {
from { background-color: #bc330d; box-shadow: 0 0 9px #333; }
          50% { background-color: #E0E0E0 ; box-shadow: 0 0 18px #E0E0E0 ; }
          to { background-color: #E0E0E0 ; box-shadow: 0 0 9px #B8B8B8  ; }
        }
.Bump {
border: 1px solid;
border-radius: 5px;
padding: 3px !important;
background: transparent !important;
-webkit-animation-name: colorPulse;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-moz-animation-name: colorPulse;
-moz-animation-duration: 2s;
-moz-animation-iteration-count: infinite;
-o-animation-name: colorPulse;
-o-animation-duration: 2s;
-o-animation-iteration-count: infinite;
animation-name: colorPulse;
animation-duration: 2s;
animation-iteration-count: infinite;
background: none repeat scroll 0% 0% #E0E0E0;
}
Bump:hover {
  background: #E0E0E0  !important;
}
/* End Добавляем стилизацию, для кнопки апа в верхнем меню темы */
/* Убираем стилизацию, для кнопки апа в первом посте темы */
.message .privateControls .Bump {
    border: 0px none ;
    border-radius: 0px;
    padding: 0px !important;
    animation-duration: 0s;
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
}
/* End Убираем стилизацию, для кнопки апа в первом посте темы */
 
Похоже что нашел баг. Создал 10 тем в разное время, а Апать их нильзя одинаковое количество времени? Т.е. все темы привязываются к одному времени....
Точней так, если я создал тему 5 часов назад, то к примеру смогу поднять через 10 минут уже, но вот иду теперь и создаю еще одну или больше тем, а их я смогу апнуть также через 10 минут, как и тут тему 5 часовой давности.. Хотя новые я только что создал...
Получается "Ап" этот не может различать темы... привязывается ко всем сразу
 
Последнее редактирование:
не работает на XF 1.4.0 RC2, при удалении возникает ошибка
 
Всё возможно, так как последняя версия дополнения 1.2.0.
 
  • Мне нравится
Реакции: Hope
Купить-купить!
 
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу