Cookie Monster Posted January 11, 2016 Share Posted January 11, 2016 I found out that I wanted to have Recent Topics and Recent posts all in one, for a bit more sleek overview. I didn't want to have two blocks for the same purpopse. So this custom feed, will update the latest Topic with its post. So if somone creates a topic, and somone replies it will get updated and display the title of the topic but also who posted last. So i re-wrote the standard and used both to combine it in all in one enjoy and lets get crackingDiff level: 1 You only need to cut and paste Whats Required. IPS 4.x + (Works on 4.0 and 4.1) IPS Pages Firstly open AdminCP > Pages > Blocks Click "Create new Block" Select Plugin In the dropdown box select "Topic Feed" Now fill it in with these details. Name: Latest Description: Latest from the forum Template Key: latest2 Click on Feed Configuration Name: Latest on forums (You can call it whatever you want the block to be named) Honour Permissions: On The rest here is optional for how you want to display things for your users. Click on Content Under Template select in the dropdown box "Use as base for custom template" replace the code in the box with the following {{if !empty( $topics ) }} <h3 class='ipsWidget_title ipsType_reset'>{$title}</h3> {{if $orientation == 'vertical'}} <div class='ipsPad_half ipsWidget_inner'> <ul class='ipsDataList ipsDataList_reducedSpacing'> {{foreach $topics as $topic}} <li class='ipsDataItem{{if $topic->unread()}} ipsDataItem_unread{{endif}}{{if $topic->hidden()}} ipsModerated{{endif}}'> <div class='ipsDataItem_icon ipsPos_top'> {template="userPhoto" group="global" app="core" params="$topic->lastCommenter(), 'tiny'"} </div> <div class='ipsDataItem_main'> <div class="ipsCommentCount ipsPos_right {{if ( $topic->posts - 1 ) === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="replies_number" pluralize="$topic->posts - 1"}'>{expression="$topic->posts - 1"}</div> <a href="{$topic->url()->setQueryString( 'do', 'getLastComment' )}" title='{lang="view_this_topic" sprintf="$topic->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$topic->title"}</a> {{if $topic->mapped('featured') || $topic->hidden() === -1 || $topic->hidden() === 1}} <span> {{if $topic->hidden() === -1}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$topic->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span> {{elseif $topic->hidden() === 1}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span> {{endif}} {{if $topic->mapped('featured')}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span> {{endif}} </span> {{endif}} <br> <span class='ipsType_light ipsType_small'>{lang="byline_nodate" htmlsprintf="$topic->lastCommenter()->link()"} · {datetime="$topic->mapped('last_comment')"}</span> </div> </li> {{endforeach}} </ul> </div> {{else}} <div class='ipsWidget_inner'> <ul class='ipsDataList'> {{foreach $topics as $topic}} {template="row" group="global" app="forums" location="front" params="NULL, NULL, $topic, FALSE"} {{endforeach}} </ul> </div> {{endif}} {{endif}} Once saved give the permissions to who can view the block. Who to add the block to the sidebar on the forums Open the main forum Click on the > arrow to the left side Pages > Custom Block > Drag Box to the side or where you want it Click on Edit button on the block In the popup window select in the dropdown box the box you created (In this example its "Latest") Voila you got your custom block. 1 1 Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 11, 2016 Share Posted January 11, 2016 Sounds great! Do you maybe have a screenshot from the end result? I'm just curious how it looks before trying it out myself. Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 11, 2016 Author Share Posted January 11, 2016 2 hours ago, Bernard_H said: Sounds great! Do you maybe have a screenshot from the end result? I'm just curious how it looks before trying it out myself. This is how it will look. With posts (As you can see it only show latest reply) but also topics. As you can see, its who answered on it but also updates with the number as normal. 1 Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 12, 2016 Share Posted January 12, 2016 (edited) @Cookie Monster Hmm, Thnx but that isn't really what I was looking for. What I want is 2 tabs in 1 block. With the newest topics and post. I know there is a plug-in for this, but you can't place that widget in the side bar unfortunately. The plugin: http://webflake.sx/files/file/2734-bim40-forums-stats-102/ Edited January 12, 2016 by Bernard_H Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 12, 2016 Author Share Posted January 12, 2016 24 minutes ago, Bernard_H said: @Cookie Monster Hmm, Thnx but that isn't really what I was looking for. What I want is 2 tabs in 1 block. With the newest topics and post. I know there is a plug-in for this, but you can't place that widget in the side bar unfortunately. The plugin: http://webflake.sx/files/file/2734-bim40-forums-stats-102/ Well the difference is there isn't two blocks in my scrip its 1 line with both of them in one. Person posts a new topic. It will show up. Person replies to a that topic or another topic shows up in the same box :) Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 12, 2016 Share Posted January 12, 2016 (edited) 5 minutes ago, Cookie Monster said: Well the difference is there isn't two blocks in my scrip its 1 line with both of them in one. Person posts a new topic. It will show up. Person replies to a that topic or another topic shows up in the same box :) Yes I know. It's a really cool option, but not what I need unfortunately. Maybe you could tweak the script I post above so it becomes possible to add it in the side bar? The plugin also uses 1 block, but shows 2 tabs. 1 for recent post and 1 for recent topics. That's what I need for my forum Edited January 12, 2016 by Bernard_H Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 12, 2016 Author Share Posted January 12, 2016 5 minutes ago, Bernard_H said: Yes I know. It's a really cool option, but not what I need unfortunately. Maybe you could tweak the script I post above so it becomes possible to add it in the side bar? The plugin also uses 1 block, but shows 2 tabs. 1 for recent post and 1 for recent topics. That's what I need for my forum What version is your forum running ? Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 12, 2016 Share Posted January 12, 2016 2 minutes ago, Cookie Monster said: What version is your forum running ? 4.0.x Not sure what exact version. Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 12, 2016 Author Share Posted January 12, 2016 6 minutes ago, Bernard_H said: 4.0.x Not sure what exact version. I only got a 4.1 board to test it with. Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 12, 2016 Share Posted January 12, 2016 4 minutes ago, Cookie Monster said: I only got a 4.1 board to test it with. On this site you can see a example: http://ipsviet.com I think they used a plug-in. I don't have access to the download section from invision power board, but maybe you can find a free plug-in? I think it will work both on 4.0.x as 4.1 Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 12, 2016 Author Share Posted January 12, 2016 I did check with offical IPS, I do have the same plugin for IPS 4.1 :) Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 12, 2016 Share Posted January 12, 2016 22 minutes ago, Cookie Monster said: I did check with offical IPS, I do have the same plugin for IPS 4.1 :) Hehe, I found the plugin and installed in on my board. It works, but I don't like the look. I miss the option that new, unread content is bold and it don't show how much reply's the topics have. It feels like it isn't finished, to bad because it could be a nice upgrade to my forum. Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 12, 2016 Author Share Posted January 12, 2016 Well you can PM me if you want and need help with some customization or make a thread about it. Just explain it a bit more and add some images. 1 Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Bernard_H Posted January 12, 2016 Share Posted January 12, 2016 19 minutes ago, Cookie Monster said: Well you can PM me if you want and need help with some customization or make a thread about it. Just explain it a bit more and add some images. I made a example in paint. I hope you understand what I mean. - bold tekst are New topic's I haven't read. - pictures before title are profile pictures. - new topics on the left, new messages on the right. Quote Link to comment Share on other sites More sharing options...
Cookie Monster Posted January 12, 2016 Author Share Posted January 12, 2016 Well if you send me a PM with a test account with AdminCP and the link I can take a look and see if i can get it sorted for you. Quote Liked what i posted remember to feed me a cookie ->Or you can add a cookie to my Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.