[EAE Add-ons] Thread preview widget

[EAE Add-ons] Thread preview widget 1.2

No permission to download

tonmo

Well-known member
This is very great. I'm using it in conjunction with this. A couple of changes I made:
-- I modified your templates (post and thread) to include some static positioning content (from my own widget) that I need to have at the top of my page, over your widget. I just inserted the widget-key include at the top of the template.
-- I modified the same templates to use the standard header instead of the minor header (invoked only if you include a title in your widget). So I replaced this:

Code:
<div class="block block--articles block--messages block--previews" {{ widget_data($widget) }}>
    <div class="block-container">
        <xf:if is="$title">
            <div class="block-filterBar">
                <h3 class="block-minorHeader">
                    {$title}
                </h3>
            </div>
        </xf:if>

with this:

Code:
<div class="block block block--articles block--messages    block--previews" {{ widget_data($widget) }}>
    <div class="block-container">
        <xf:if is="$title">
            
                <h3 class="block-header">
                    {$title}
                </h3>
            
        </xf:if>
 

Lawrence

Well-known member
Thank you, I'm happy that you like it. Your usage of this add-on is why it was created. If it is ok with you can you post a link or a screen shot (if not, it's ok)? I'm interested in the different ways this add-on is used.
 
  • Like
Reactions: Lee

tonmo

Well-known member
Sure, here you go; that info block at the top (over your widget) is what I added to your template (via a widget include). (Not showing my nav/header here because it looks wonky when resizing the screen, which I had to do to grab the screenshot).

1608908133798.png
 
Last edited:

btmgreg

Active member
Feature request for roadmap -

Add other pagination options in addition to next/previous. Maybe the same structure as thread pagination on xf. Though if needed to be kept more minimal, this would be cool

Home - Forward > Backwards > End

Numbers wouldn't be necessary, as why would anyone need to know a certain page? Idk.

Again, fantastic work Lawrence. I'm spiffying up my homepage tonight. I'll share a screenshot if I'm happy with it!
 

Lawrence

Well-known member
Thank you. With respect to the previous and next buttons, I chose to go with them as I could not come up with a valid reason why pagination would be required for a landing/home page. I can see a potential member wanting to load more to learn about the forum, but I can't see anyone wanting to head to page 14 for example.

I like your idea for the four buttons though, :)
 

btmgreg

Active member
As I wrote the idea initially, I was writing and thought.. Just the 4 buttons would do really. I was going through the pages and thought If I want to go back home then I need to scroll up. If I want to go to the end, I need to keep clicking forward.

Thanks for the reply. Happy Christmas and a new year to you
 

Lee

Well-known member
Hi Lawrence, firstly thank you for the last update - it is an excellent one.

I have a small feature request, would it be possible to expand this to show threads only assigned with a specific prefix?

Thank you for considering.
 

btmgreg

Active member
I actually had a dream, I think - about this addon. Talk about having things on your mind!

Would there be scope to add a pinned feature? I don't actually know if such a feature exists in the article views themselves - I've tried searching but turned up no results.

Ideally, if you've marked a thread as 'pinned' - then the thread would remain in the top-level wide layout. All other news would fill the appropriate gaps and paginate as normal. I guess you could call this feature a featured thread?

Sorry. I keep thinking of more ideas for this addon. You should charge! :ROFLMAO: :p
 

btmgreg

Active member
Hi Lawrence, firstly thank you for the last update - it is an excellent one.

I have a small feature request, would it be possible to expand this to show threads only assigned with a specific prefix?

Thank you for considering.
This would be great. But with this feature, also keeping the feature to enable or disable the display OF the prefix with the title. I prefer not to display it, as a think it looks cleaner giving more room for the title itself.
 

Lee

Well-known member
I actually had a dream, I think - about this addon. Talk about having things on your mind!

Would there be scope to add a pinned feature? I don't actually know if such a feature exists in the article views themselves - I've tried searching but turned up no results.

Ideally, if you've marked a thread as 'pinned' - then the thread would remain in the top-level wide layout. All other news would fill the appropriate gaps and paginate as normal. I guess you could call this feature a featured thread?

Sorry. I keep thinking of more ideas for this addon. You should charge! :ROFLMAO: :p
If you pin an article in the respective node it already remains pinned in place on this addon, that was rolled out in the last update. :)
 

Lawrence

Well-known member
I have a small feature request, would it be possible to expand this to show threads only assigned with a specific prefix?

Good day, Lee, :) I haven't really looked into prefixes, but I can't see why not.

Would there be scope to add a pinned feature?

Do you mean that a pinned article will always show on top of each page when using the Next and Previous buttons? Or something like featured threads that appear above the list of articles? Either way, that would be a significant update, but will consider it.
 

doublespaces

Well-known member
If you want to use this a standard widget and don't need it to be automatically added to a page node, just go into the widget and uncheck (turn off) "[EAE] Page view: Above content" and make the code change. At that point you should be able to check (turn on) widget positions for CinVin Home or TH's Featured Threads or the stock XF positions.

Note: Making the code edit will result in a modified file warning in the ACP which can be ignored and you'll need to redo the edit when you update the addon in the future.

For anyone savvy, you can get rid of this warning yourself by downloading that modified file, generating a sha256 has and updating the file that stores all those hashes, I think its called hashes.json or something like that. The warning will go away and will come back when you update or reinstall the addon unless you also update it in the install package and install the addon that way.

@Lawrence

Is it possible to do one of the following?:

1. Support Search Forums
2. Allow including threads for specific forums which have specific tags

Search forums allow you to bring in threads which have certain tags or prefixes. So I disallow the 'featured' text in tags and then use it myself on threads which I want to show up in the featured search forum. If I could dump the usage of the search forum and just use this instead that may be preferred.

Since you're already going the custom route, could we recognize a thread having a 'featured date' of some kind and sorting by that would make articles appear in a more sensible way, depending on how long it took them to become featured, or contain the relevant information which got it featured.

This would require some sort of 'marking' system to say a thread is featured at this moment, this probably becomes a can of worms.
 
Last edited:

Lawrence

Well-known member
For anyone savvy, you can get rid of this warning yourself by downloading that modified file, generating a sha256 has and updating the file that stores all those hashes, I think its called hashes.json or something like that. The warning will go away and will come back when you update or reinstall the addon unless you also update it in the install package and install the addon that way.
With the latest update, this should not be required anymore (unless the add-on is being used in a way that I have no idea about).
1. Support Search Forums
I can't see this happening because search forums only contains threads from other forums, pulling the first or last post of a thread in a search forum will end up pulling it from the original forum that contains it anyways.
2. Allow including threads for specific forums which have specific tags
I haven't looked into this and I believe it was mentioned before, so I'll look into it when I have some time, but I'm not sure when.
 

doublespaces

Well-known member
What about a 'featured' date for a thread? The given options are really not the best for a portal having the same topics re-surface to the top each time a thread gets a reply is not very typical for news sites.
 

Lee

Well-known member
What about a 'featured' date for a thread? The given options are really not the best for a portal having the same topics re-surface to the top each time a thread gets a reply is not very typical for news sites.
Order the threads by "Thread date" in the widget - this orders them by date the content was created rather than the last post date.
 

btmgreg

Active member
Feature request - Thread/article view count displayed next to the amount of replies/posts.

Would look great, I think!
 

gib

Active member
Excellent widget, many thanks for doing it.

Any way to edit the template, so that it shows the first post snippet, rather than the last post snippet for each thread ?
 
Last edited:
Top