Recent Posts 2 by Siropu

Recent Posts 2 by Siropu [Paid] 2.0.10

No permission to buy (€9.99)
You can by creating a HTML widget and calling the widgets directly:

HTML:
<h2 class="block-tabHeader tabs tabs--standalone hScroller" data-xf-init="tabs h-scroller" role="tablist">
    <span class="hScroller-scroll">
        <a class="tabs-tab is-active" role="tab" aria-controls="srptrct1">Tab 1</a>
        <a class="tabs-tab" role="tab" aria-controls="srptrct2">Tab 2</a>
    </span>
</h2>

<ul class="tabPanes">
    <li class="is-active" role="tabpanel" id="srptrct1">
          <xf:widget key="siropu_recent_posts_1" />
     </li>
     <li role="tabpanel" id="srptrct2">
          <xf:widget key="siropu_recent_posts_2" />
     </li>
</ul>
First, unset the positions in each widget.
Replace siropu_recent_posts_1 and siropu_recent_posts_2 with the actual key of each widget.
 
You can by creating a HTML widget and calling the widgets directly:

HTML:
<h2 class="block-tabHeader tabs tabs--standalone hScroller" data-xf-init="tabs h-scroller" role="tablist">
    <span class="hScroller-scroll">
        <a class="tabs-tab is-active" role="tab" aria-controls="srptrct1">Tab 1</a>
        <a class="tabs-tab" role="tab" aria-controls="srptrct2">Tab 2</a>
    </span>
</h2>

<ul class="tabPanes">
    <li class="is-active" role="tabpanel" id="srptrct1">
          <xf:widget key="siropu_recent_posts_1" />
     </li>
     <li role="tabpanel" id="srptrct2">
          <xf:widget key="siropu_recent_posts_2" />
     </li>
</ul>
First, unset the positions in each widget.
Replace siropu_recent_posts_1 and siropu_recent_posts_2 with the actual key of each widget.
Thanks!
 
Go to ACP > Appearance > Widgets > Recent posts

Uncheck the default positon.
Call the widget in the template like so: <xf:widget key="siropu_recent_posts" />
 
Does this add on allow setting max updates per forum? I have a staff forum that is really active and dominates the new posts widget and causes other content to be hidden.
 
My feedback:

I use the widget on a new page;
i have disabnled the most things.
I have changed the source to "FirstPost", instead of last post; this should be an option, i think.

Also i miss this features:

Use bbcodes; at least break the \n.
Exclude urls or option to link them.
Show attachments if included or at least one.

I will manage this for my own, but i guess this could be nice features for others also.
 
Last edited:
And maybe you want to order the code, please? :)
Is there a way to stop the cache while testing or change the cache time?
 
Wow! I have checked the query for the content of the widget. There are really a lot of left joins in it.
Maybe it would be better to write an own method to fetch the content?

It is really a monster in my test-web; the result table has maybe two meters on my 27'' ...

Your code is like that:

Code:
lalal
  lala
kaka
     lala

instead of

lalal
lala
kaka
lala

I dont know how to say it in english; it is not well formated. Not important for the most people, but just not nice.
 
Add-on uses a similar query as the native XF widget and what meters is the execution time which is fast. Is it slow for you?
 
The posts are displayed as a thread in forum view which shows if you are watching the thread or if the thread is read or not so data is required for that. Also displaying last poster and last post.
 
Yes, sure.
And also a lot of other addons include their stuff in this query.

And i was wrong. When i put the query to pma; it is really slow.
In XF i dont feel it, because it is cached.

At the moment i stuck with FirstPost. Do you have any idea how i can change from lastPost to FirstPost?

Code:
        if ($this->options['post_excerpt'])
        {
            $threadFinder->with('FirstPost');
        }

get the same result than 'LastPost'

Ok, solved it in the template with FirstPost instead LastPost
 
Last edited:
Do you have an idea for me, please, how to show the attchments?

This is my post now. I tried the code from somewhere else. All bboces are done, also my custom ones, but not the attachments.

{{ bb_code($thread.FirstPost.message,'post','$thread.FirstPost') }}
 
Top Bottom