XF 1.5 reply button at top of thread list?

You must edit the thread_view template and add your code below this code.

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

And add float:right style to make it dsiplay where you want, like so.

HTML:
<span style="float:right">your code</span>
 
If you want it to look like the More Options link, add this code:

HTML:
<div style="float:right">
<xen:if is="{$canReply}">
    <a href="{xen:link 'threads/reply', $thread}"><input type="submit" class="button DisableOnSubmit" value="{xen:phrase more_options}..." name="more_options" /></a>
</xen:if>
</div>

If you want the link to displayed as a simple reply button, follow the documentation above.
 
If you want it to look like the More Options link, add this code:

<div style="float:right">
<xen:if is="{$canReply}">
<a href="{xen:link 'threads/reply', $thread}"><input type="submit" class="button DisableOnSubmit" value="{xen:phrase more_options}..." name="more_options" /></a>
</xen:if>
</div>
sorry, your code has a smiley in it, can you clarify the code? thanks!
 
that's very close, but I's like it above that, pretty much the same level as the title line. Thanks so far :)

View attachment 128406

You are welcome sir :)

Did you add it after the part that I mentioned in my previous post? Did you wrap it up inside the div style with float right?

Taking another look at your screenshot, it appears that you are using a custom style, and it might have changed things for that template. Because in a default style, it should have displayed above the selected posts link.
 
yes it's custom style. Here is the top part of the template code if that sheds any light:

Code:
<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:if {$xenOptions.selectQuotable}, ' SelectQuotable'}</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:require css="thread_view.css" />
<div style="float:right">
<xen:if is="{$canReply}">
  <a href="{xen:link 'threads/reply', $thread}"><input type="submit" class="button DisableOnSubmit" value="Reply" name="more_options" /></a>
</xen:if>
</div>
<xen:set var="$threadTagsHtml"><xen:if is="{$xenOptions.enableTagging} AND ({$canEditTags} OR {$thread.tagsList})">
   <xen:include template="helper_tag_list">
     <xen:map from="$thread.tagsList" to="$tags" />
     <xen:set var="$editUrl">{xen:if $canEditTags, {xen:link threads/tags, $thread}}</xen:set>
   </xen:include>
</xen:if></xen:set>
 
I can not tell by that code only. The thread_view.css template might have been modified, or other stuff too.

This is how it appears with the default style.

screenshot.webp

I think it would be much better if you made a post at that style ' topic for this.
 
Back
Top Bottom