ozadars Posted August 2, 2015 Posted August 2, 2015 Hello,I used similar sidebar blocks before on the forum, now I am using the IPB blocks instead of an external one. One of the most important differences, that most of my members also noticed is, the new sidebar blocks show the name of the owner of topic and the date of when the topic was started. However, I think the idea of creating a sidebar block with the most active, recent or popular topics is to show the users that your forum is active. For this reason, I think it makes more sense to show the name and the date of the last reply to that post. Its not only my request but also many of members of my forum suggested that it was much more useful to see that information. Best,Selim
Chosen1 Posted August 7, 2015 Posted August 7, 2015 I used pages to create my own block so that I could change the info to last reply instead of topic starter. Let me know if you have pages and I'll post what I did to update the block.
ozadars Posted August 7, 2015 Author Posted August 7, 2015 Yes, I have pages. Would be great if you could share!
Chosen1 Posted August 8, 2015 Posted August 8, 2015 In the ACP go to Pages > Blocks.Click "Create New Block."Make sure Type = Plugin is selected.From the plugin dropdown select "Topic Feed", which is under Forum. Then click "Next".Under the details tab give it any name and template key that you want.In the Feed configuration tab give it whatever title you want. Change any other settings based on preference. The main one is "Number to Show."At the bottom of the page change drop for "Use this template as-is" to "Use as base for a custom template." That will open up the content window where you'll see the default template which isOn line 10 you'll see the following: {template="userPhoto" group="global" app="core" params="$topic->author(), 'tiny'"}Replace that with: {template="userPhoto" group="global" app="core" params="$topic->lastCommenter(), 'tiny'"}Then on line 28 you'll see the following:<span class='ipsType_light ipsType_small'>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"} · {lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts( $topic->mapped('date') )->html()"}</span>Replace that with:<span class='ipsType_light ipsType_small'>{lang="byline_nodate" htmlsprintf="$topic->lastCommenter()->link()"} · {datetime="$topic->mapped('last_comment')"}</span>Hit save and you your site. Open up manage blocks and drag "Custom Blocks." which is under pages to the desired location. Click "Edit" and select whatever you named the block. It will be listed under Plugins.That should get the sidebar working with the info for the last commenter instead of the topic starter. Let me know if you have any questions or problems.
Shattered Rift Posted September 11, 2016 Posted September 11, 2016 I realize that I'm bumping an old topic, but the one piece this is missing is what to change the following to: {lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts( $topic->mapped('date') Right now, this is pulling both the language for the start date and the time the topic was created rather than the language/time the last post was made.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.