Resource icon

Unmaintained How to insert a sidebar inline with the first post of a thread

To insert the same sidebar inline with the first thread listed in the forum view head to:

ACP -> Appearance -> Templates and find the forum_view template.

Find the following code:

Code:
<div class="discussionList section sectionMain">
    <xen:include template="thread_list" />
</div>
 
<div class="pageNavLinkGroup">
    <div class="linkGroup">
        <xen:if is="{$canPostThread}">
            <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>
        <xen:elseif is="{$visitor.user_id}" />
            ({xen:phrase no_permission_to_post})
        <xen:else />
            <label for="LoginControl"><a href="{xen:link login}" class="concealed">({xen:phrase log_in_or_sign_up_to_post})</a></label>
        </xen:if>
    </div>
    <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="forums" linkdata="{$forum}" linkparams="{$pageNavParams}" page="{$page}" perpage="{$threadsPerPage}" total="{$totalThreads}" />
</div>

And replace it with:

Code:
<div class="sidebarWrapper">
    <div class="sidebar sponsors">
        <div class="section">
            <div class="secondaryContent">
                <h3>Site Sponsors</h3>
                    <div id="siteSponsors">             
                        <div align="center"><img src="http://fakeimg.pl/160x600/">
                        </div>             
                    </div>
            </div>
        </div>
    </div>
    <div class="threadDiscussionList">
        <div class="discussionList section sectionMain">
            <xen:include template="thread_list" />
        </div>
         
        <div class="pageNavLinkGroup">
            <div class="linkGroup">
                <xen:if is="{$canPostThread}">
                    <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>
                <xen:elseif is="{$visitor.user_id}" />
                    ({xen:phrase no_permission_to_post})
                <xen:else />
                    <label for="LoginControl"><a href="{xen:link login}" class="concealed">({xen:phrase log_in_or_sign_up_to_post})</a></label>
                </xen:if>
            </div>
            <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="forums" linkdata="{$forum}" linkparams="{$pageNavParams}" page="{$page}" perpage="{$threadsPerPage}" total="{$totalThreads}" />
        </div>     
    </div>
</div>

You don't need to edit Extra.css if you've already followed the first part of this guide.

Before:
thread view before.webp


After:
thread view after.webp
Top Bottom