Prefix Forum Listing

Prefix Forum Listing 1.2.5

No permission to download
I redid the template for myself and thought I would share since I think it's a little better using lists. Plus it adds an "All" button so members can get back to seeing all of the nodes contents if they wish. I know there is a filter list below this but not everyone notices it on every style. It's nice to have it right there with the prefixes. More intuitive IMO.

HTML:
<xen:if is="{$prefixes}">
  <xen:require css="listPrefixes.css" />
   <div class="discussionListFilters secondaryContent">
     <div>
     <xen:if is="{$xenOptions.pfl_text}">
      <h3>{xen:raw {$xenOptions.pfl_text}}</h3>
     </xen:if>
     </div>
     <div class="prefixList">
     <ul>
         <li>
        &nbsp;
               <a href="{xen:link forums, $forum}" class="prefixLink" title="Restore the thread view to forum default">
                 <span class="sitePrefix allPrefix">All</span>
               </a> 
         </li>
      <xen:foreach loop="$prefixes" value="$prefix">
      <li>
        &nbsp;
  <a href="{xen:link forums, $forum, 'prefix_id={$prefix.prefix_id}'}" class="prefixLink" title="{xen:phrase pfl_show_only_prefix_x,'prefix={xen:helper threadPrefix, $prefix, escaped, ''}'}">{xen:helper threadPrefix, $prefix, html, ''}
        <xen:if is="{$xenOptions.pfl_showTotalThreads}">
          {xen:if '{$prefix.totalThreads} >= {$xenOptions.pfl_minToShow}', '({$prefix.totalThreads})'}
         </xen:if>
  </a>
       </li>
      </xen:foreach>
     </ul>
     </div>
   </div>
</xen:if>

The class="sitePrefix allPrefix" is my css code for styling the prefixes. You would obviously place your own in here.

The following css for the list structure can go in Extra.css or listPrefixes.css. Alter as needed for your style.

Code:
.prefixList {

    overflow: auto;
    height: 100%;
    position:relative;
    margin-top:5px;
    padding-left:2px;
    padding-right:2px;
}

.prefixList ul{
    display: block;
    list-style: none outside none;
    overflow: auto;
    white-space: nowrap;
}

.prefixList ul li{
    display: block;
    float: left;
    margin-right: 2px;
}

This works fine for me. Your mileage may vary.
 
Last edited:
I removed <span>({$totalThreads})</span> Since it just recounts the threads when you click each prefix and only shows that ammount of that prefix. So it's useless.
 
Been messing with it a bit more.

If you want to have the thread count be in the tool tip pop up instead of next to the prefix then change the contents of the phrase pfl_show_only_prefix_x

from

Code:
Show only threads prefixed by {prefix}.

to

Code:
Show only the ({total}) threads prefixed by {prefix}.

And then replace in template pfl_prefixes_list

HTML:
title="{xen:phrase pfl_show_only_prefix_x,'prefix={xen:helper threadPrefix, $prefix, escaped, ''}'}"

With

HTML:
title="{xen:phrase pfl_show_only_prefix_x,'prefix={xen:helper threadPrefix, $prefix, escaped, ''}','total={$prefix.totalThreads}'}"

Then just turn off the showing of the count as this will show it in the tooltip without that setting. It looks much better IMO than having the prefix list divided unevenly by varying amounts of data.

Enjoy
 
Hi, anybody else having problems with a high number of different prefixes?
I have 10 prefixes in total on some forums, but only 7 are displayed ...

Any ideas? Thanks :)

EDIT: I realized that all 10 prefixes are displayed when using the forum as guest. As a registered user / admin i only can see 7 prefixes...
 
You can try my another add-on which also lists prefixes, but under the forum name. BTW, I did not tested on XenForo 1.2.x. If you have any problem, just let me know and I'll fix!

That looks good but I like the button/ribbon look rather than plain text. Both addons seem to do the same thing. Wouldn't it be better for you to release them both as one addon with the option to show prefixes in different areas.
 
That looks good but I like the button/ribbon look rather than plain text. Both addons seem to do the same thing. Wouldn't it be better for you to release them both as one addon with the option to show prefixes in different areas.

Well, maybe. The other add-on was a request. Let me see what I can do! :)
 
Fuhrmann updated Thread Prefix Listing with a new update entry:

Version 1.2.3

To upgrade just copy the new folder and overwrite the old folder and upgrade the add-on using the new .xml in the .zip file. I would like to thanks @Veer for testing this addon, @cclaerhout for contribute to the code and @Code Monkey for the ideas in the discussion thread.

Fixes:
- Fix to work with XenForo 1.2.* and 1.3 Beta
- Fix some bugs on sorting prefixes
- Fix permissions

New:
- Added an option to show a link before all the prefixes and select the text to show. The...

Read the rest of this update entry...
 
Top Bottom