Search the Community
Showing results for tags 'ipb 4.x'.
-
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")