1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Add a sidebar to your thread posts without taking up the entire right and side of the page.

  1. RobinHood

    RobinHood Well-Known Member

    robinhood submitted a new resource:

    How to insert a sidebar inline with the first post of a thread (version 1.0) - Add a sidebar to your thread posts without taking up the entire right and side of the page.

    Read more about this resource...
     
    ArnyVee likes this.
  2. mrb1972

    mrb1972 Active Member

    Do you think this would also work on the "forum_view" page?
     
  3. RobinHood

    RobinHood Well-Known Member

    Yep, I'm pretty sure it will. Haven't had a chance to test it yet though as I'm still contemplating if I'm going to but ads there on my site. I'll give it a go when I finish dinner.
     
  4. RobinHood

    RobinHood Well-Known Member

    robinhood updated How to insert a sidebar inline with the first post of a thread with a new update entry:

    Extra instructions to insert sidebar into forum view

    Read the rest of this update entry...
     
    Mouth likes this.
  5. mrb1972

    mrb1972 Active Member

    Can this also be modified for the "Whats New" page, that would be good too
     
  6. badlands

    badlands Member

    Hi there - awesome! I was looking exactly for this for the forum_view. Unfortunately the code does not work with my style and slightly changed forum_view template. Could you help how to include the code?

    Problem: The sidebar box is always shown above the forum view list. The code is different from the standard version for the -marked text:

    Code:
    <xen:title>{$forum.title}{xen:helper pagenumber, $page}</xen:title>
    <xen:h1>{$forum.title}</xen:h1>
     
    <xen:if is="{$forum.description} AND @threadListDescriptions">
        <xen:description class="baseHtml">{xen:raw $forum.description}</xen:description>
    </xen:if>
     
    <xen:navigation>
        <xen:breadcrumb source="$nodeBreadCrumbs" />
    </xen:navigation>
     
    <xen:container var="$head.canonical">
        <link rel="canonical" href="{xen:link 'canonical:forums', $forum, 'page={$page}'}" /></xen:container>
     
    <xen:container var="$head.rss">
        <link rel="alternate" type="application/rss+xml" title="{xen:phrase rss_feed_for_x, 'title={$forum.title}'}" href="{xen:link forums/index.rss, $forum}" /></xen:container>
     
    <xen:container var="$quickNavSelected">node-{$forum.node_id}</xen:container>
    <xen:container var="$bodyClasses">{xen:helper nodeClasses, $nodeBreadCrumbs, $forum}</xen:container>
    <xen:container var="$searchBar.forum"><xen:include template="search_bar_forum_only" /></xen:container>
     
    <xen:if is="{$canPostThread}">
        <xen:set var="$newDiscussionButton"><a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a></xen:set>
        <xen:if is="!{$renderedNodes}">
            <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
        </xen:if>
    </xen:if>
     
    <xen:if is="{$showPostedNotice}">
        <div class="importantMessage">{xen:phrase message_submitted_displayed_pending_approval}</div>
    </xen:if>
     
     
    <xen:if is="{$renderedNodes}">
        <xen:include template="ad_forum_view_above_node_list" />
        <xen:include template="node_list" />
    </xen:if>
     
     
    <xen:hook name="forum_view_pagenav_before" params="{xen:array 'forum={$forum}'}" />
     
    <xen:include template="ad_forum_view_above_thread_list" />
     
    <div class="pageNavLinkGroup">
        <div class="linkGroup SelectionCountContainer">
        <xen:comment><xen:include template="forum_view_legacy_controls" /></xen:comment>
        </div>
        <xen:pagenav link="forums" linkdata="{$forum}" linkparams="{$pageNavParams}" page="{$page}" perpage="{$threadsPerPage}" total="{$totalThreads}" />
    </div>
     
    <xen:hook name="forum_view_threads_before" params="{xen:array 'forum={$forum}'}" />
     
    [B]<div id="fore">[/B]
    [B]<div class="discussionList section sectionMain">[/B]
    [B]    <xen:include template="thread_list" />[/B]
    [B]</div>[/B]
    [B]<div class="fore_close"> &nbsp; </div>[/B]
    [B]</div>[/B]
     
     
    [B]<div class="pageNavLinkGroup">[/B]
    [B]    <div class="linkGroup">[/B]
    [B]        <xen:if is="{$canPostThread}">[/B]
    [B]            <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>[/B]
    [B]        <xen:elseif is="{$visitor.user_id}" />[/B]
    [B]            ({xen:phrase no_permission_to_post})[/B]
    [B]        <xen:else />[/B]
    [B]            <label for="LoginControl"><a href="{xen:link login}" class="concealed">({xen:phrase log_in_or_sign_up_to_post})</a></label>[/B]
    [B]        </xen:if>[/B]
    [B]    </div>[/B]
        <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>
     

Share This Page