XenForo News Feed (adding recent activity to a different place)

Cryptaline

Active member
On each page refresh Recent activity is hidden (first screen)
I want to dispay it always. (second screen)

Question is, which template I'm missing.

Right now I'm using templates from news_feed_page_global:
<xen:include template="news_feed">
<xen:set var="$noContentHtml">{xen:phrase news_feed_is_currently_empty}</xen:set>
</xen:include>
<xen:include template="news_feed_end">
<xen:set var="$itemLoaderUrl">{xen:link recent-activity}</xen:set>
</xen:include>

and it looks like this (right-top corner):
social-top.webp

and thats how i want to display it:


social-top.webp
 

Attachments

  • social-top.webp
    social-top.webp
    129.7 KB · Views: 4
I'm using page_container to dispay news feed on all pages.
This looks like this:

cusom header body hook then I'm adding this code to the place where i want to display it & body templates after:

<!--eden galaxy -->
<div id="e_g"><div class="g_newsfeed"><div class="activity">

<xen:require js="js/xenforo/news_feed.js" />
<div class="newsFeed">


<xen:include template="news_feed_end">
<xen:set var="$itemLoaderUrl">{xen:link recent-activity}</xen:set>
</xen:include>

<xen:include template="preview_tooltip" />
</div>


</div></div>
I know i need to add smth above news_feed_end to show all recent activity without clicking on a "news_feed_end" but can not find template whic will help to do so :coffee:
 
Changing code to:


<xen:require css="events.css" />
<xen:require css="news_feed.css" />
<xen:require js="js/xenforo/news_feed.js" />

<div class="newsFeed">

<xen:include template=" news_feed " />

<xen:include template="news_feed_end">
<xen:set var="$itemLoaderUrl">{xen:link recent-activity}</xen:set>
</xen:include>

<xen:include template="preview_tooltip" />
</div>

gives only result which you can see on the first screen. By some reason it wont to show <xen:include template=" news_feed " /> content which looks like this:

<xen:require css="events.css" />
<xen:require css="news_feed.css" />
<xen:require js="js/xenforo/news_feed.js" />

<xen:if is="{$newsFeed}">
<ol class="eventList">
<xen:foreach loop="$newsFeed" value="$item">
<xen:include template="news_feed_item">
<xen:set var="$itemTemplate">{xen:raw $item.template}</xen:set>
<xen:set var="$itemDate">{$item.event_date}</xen:set>
</xen:include>
</xen:foreach>
</ol>
<xen:else />
{xen:raw $noContentHtml}
</xen:if>
I will really apreciate any adea/tip why it's showing only


<xen:include template="news_feed_end">
<xen:set var="$itemLoaderUrl">{xen:link recent-activity}</xen:set>
</xen:include>
and don't want to show
<xen:include template=" news_feed " />
 
Because the news feed items are not available to the container. You need to create a listener for the container_public_params event to add the news items as one of the params. That will allow you to display the news_feed in the container.
 
Top Bottom