Jump to content

Protected Forum - No More?


RazorSEdge

Recommended Posts

Posted

Is the removal of "protected forum" and post counts for forums that guests can view, but not see topics an intended change?  On 3.4.x guests or groups with perms set to see forum but not see topics would still see post counts and instead of last post info on the right they would see "protected forum".  On 4, post counts are gone and instead of protected forum it now says "no posts here yet" which is VERY misleading.

If this is an intended change, could I get some assistance from someone on how to get it back to showing post counts and "protected forum"?  As seen in the post below, it makes my board look dead, dead, dead.  We need the specific forums visible, but posts not, but we also don't want to look like a ghost ship either.

protectedforum.thumb.PNG.70fbb3452ec57d5

This is in guest view.  Blue needs to have post count, red should say protected forum.  

Posted

.

 

2015-04-29_12-23-27.thumb.png.c69619e56e

 

I have a fix for this ..

You can try it easily .. you can always use the "revert" button to restore to original ..

Templates > Forums > front > index > forumRow ..

Find this section .. Starts with an IF statement till the ENDIF .. there are different tweaks in between .. that's why I opt to replace all of that .. easy to explain :)

 

		{{if !$forum->redirect_on}}
			<div class="ipsDataItem_stats ipsDataItem_statsLarge">
				{{if $lastPost}}
					<dl>
						{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}
						<dt class="ipsDataItem_stats_number">{number="$count"}</dt>
						<dd class="ipsDataItem_stats_type ipsType_light">{lang="posts_no_number" pluralize="$count"}</dd>
					</dl>
				{{endif}}
				{{if \IPS\forums\Topic::modPermission( 'unhide', NULL, $forum ) AND ( $forum->queued_topics OR $forum->queued_posts )}}
					<strong class='ipsType_warning ipsType_medium'>
						<i class='fa fa-warning'></i>
						{{if $forum->queued_topics}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_topics' ) )->csrf()}' data-ipsTooltip title='{lang="queued_topics_badge" pluralize="$forum->queued_topics"}' class='ipsType_blendLinks'>{$forum->queued_topics}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
						/
						{{if $forum->queued_posts}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_posts' ) )->csrf()}' data-ipsTooltip title='{lang="queued_posts_badge" pluralize="$forum->queued_posts"}' class='ipsType_blendLinks'>{$forum->queued_posts}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
					</strong>
				{{endif}}
			</div>
			<ul class="ipsDataItem_lastPoster ipsDataItem_withPhoto">
				{{if $lastPost}}
					<li>{template="userPhoto" app="core" group="global" params="$lastPost['author'], 'tiny'"}</li>
					<li><a href="{$lastPost['topic_url']->setQueryString( 'do', 'getNewComment' )}" class='ipsType_break ipsContained' title='{$lastPost['topic_title']}'>{truncate="$lastPost['topic_title']" length="30"}</a></li>
					<li>{lang="byline_nodate" htmlsprintf="$lastPost['author']->link()"}</li>
					<li class="ipsType_light"><a href='{$lastPost['topic_url']->setQueryString( 'do', 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>{datetime="$lastPost['date']"}</a></li>
				{{else}}
					<li class='ipsType_light ipsResponsive_showDesktop'>{{if $forum->password}}{lang="no_forum_posts_password"}{{else}}{lang="no_forum_posts"}{{endif}}</li>
				{{endif}}
			</ul>	
		{{endif}}

 

Replace it with this :

 

		{{if !$forum->redirect_on}}
			{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}
			<div class="ipsDataItem_stats ipsDataItem_statsLarge">
				{{if $count>0}}
					<dl>
						<dt class="ipsDataItem_stats_number">{number="$count"}</dt>
						<dd class="ipsDataItem_stats_type ipsType_light">{lang="posts_no_number" pluralize="$count"}</dd>
					</dl>
				{{endif}}
				{{if \IPS\forums\Topic::modPermission( 'unhide', NULL, $forum ) AND ( $forum->queued_topics OR $forum->queued_posts )}}
					<strong class='ipsType_warning ipsType_medium'>
						<i class='fa fa-warning'></i>
						{{if $forum->queued_topics}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_topics' ) )->csrf()}' data-ipsTooltip title='{lang="queued_topics_badge" pluralize="$forum->queued_topics"}' class='ipsType_blendLinks'>{$forum->queued_topics}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
						/
						{{if $forum->queued_posts}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_posts' ) )->csrf()}' data-ipsTooltip title='{lang="queued_posts_badge" pluralize="$forum->queued_posts"}' class='ipsType_blendLinks'>{$forum->queued_posts}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
					</strong>
				{{endif}}
			</div>
			<ul class="ipsDataItem_lastPoster ipsDataItem_withPhoto">
				{{if $lastPost}}
					<li>{template="userPhoto" app="core" group="global" params="$lastPost['author'], 'tiny'"}</li>
					<li><a href="{$lastPost['topic_url']->setQueryString( 'do', 'getNewComment' )}" class='ipsType_break ipsContained' title='{$lastPost['topic_title']}'>{truncate="$lastPost['topic_title']" length="30"}</a></li>
					<li>{lang="byline_nodate" htmlsprintf="$lastPost['author']->link()"}</li>
					<li class="ipsType_light"><a href='{$lastPost['topic_url']->setQueryString( 'do', 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>{datetime="$lastPost['date']"}</a></li>
				{{else}}
					<li class='ipsType_light ipsResponsive_showDesktop'>
                    	{{if $forum->password}}{lang="no_forum_posts_password"}{{else}}{{if $count>0}}Protected{{else}}{lang="no_forum_posts"}{{endif}}{{endif}}
              		</li>
				{{endif}}
			</ul>	
		{{endif}}

 

 

.

Posted

.

 

2015-04-29_12-23-27.thumb.png.c69619e56e

 

I have a fix for this ..

You can try it easily .. you can always use the "revert" button to restore to original ..

Templates > Forums > front > index > forumRow ..

Find this section .. Starts with an IF statement till the ENDIF .. there are different tweaks in between .. that's why I opt to replace all of that .. easy to explain :)

 

		{{if !$forum->redirect_on}}
			<div class="ipsDataItem_stats ipsDataItem_statsLarge">
				{{if $lastPost}}
					<dl>
						{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}
						<dt class="ipsDataItem_stats_number">{number="$count"}</dt>
						<dd class="ipsDataItem_stats_type ipsType_light">{lang="posts_no_number" pluralize="$count"}</dd>
					</dl>
				{{endif}}
				{{if \IPS\forums\Topic::modPermission( 'unhide', NULL, $forum ) AND ( $forum->queued_topics OR $forum->queued_posts )}}
					<strong class='ipsType_warning ipsType_medium'>
						<i class='fa fa-warning'></i>
						{{if $forum->queued_topics}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_topics' ) )->csrf()}' data-ipsTooltip title='{lang="queued_topics_badge" pluralize="$forum->queued_topics"}' class='ipsType_blendLinks'>{$forum->queued_topics}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
						/
						{{if $forum->queued_posts}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_posts' ) )->csrf()}' data-ipsTooltip title='{lang="queued_posts_badge" pluralize="$forum->queued_posts"}' class='ipsType_blendLinks'>{$forum->queued_posts}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
					</strong>
				{{endif}}
			</div>
			<ul class="ipsDataItem_lastPoster ipsDataItem_withPhoto">
				{{if $lastPost}}
					<li>{template="userPhoto" app="core" group="global" params="$lastPost['author'], 'tiny'"}</li>
					<li><a href="{$lastPost['topic_url']->setQueryString( 'do', 'getNewComment' )}" class='ipsType_break ipsContained' title='{$lastPost['topic_title']}'>{truncate="$lastPost['topic_title']" length="30"}</a></li>
					<li>{lang="byline_nodate" htmlsprintf="$lastPost['author']->link()"}</li>
					<li class="ipsType_light"><a href='{$lastPost['topic_url']->setQueryString( 'do', 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>{datetime="$lastPost['date']"}</a></li>
				{{else}}
					<li class='ipsType_light ipsResponsive_showDesktop'>{{if $forum->password}}{lang="no_forum_posts_password"}{{else}}{lang="no_forum_posts"}{{endif}}</li>
				{{endif}}
			</ul>	
		{{endif}}

 

Replace it with this :

 

		{{if !$forum->redirect_on}}
			{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}
			<div class="ipsDataItem_stats ipsDataItem_statsLarge">
				{{if $count>0}}
					<dl>
						<dt class="ipsDataItem_stats_number">{number="$count"}</dt>
						<dd class="ipsDataItem_stats_type ipsType_light">{lang="posts_no_number" pluralize="$count"}</dd>
					</dl>
				{{endif}}
				{{if \IPS\forums\Topic::modPermission( 'unhide', NULL, $forum ) AND ( $forum->queued_topics OR $forum->queued_posts )}}
					<strong class='ipsType_warning ipsType_medium'>
						<i class='fa fa-warning'></i>
						{{if $forum->queued_topics}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_topics' ) )->csrf()}' data-ipsTooltip title='{lang="queued_topics_badge" pluralize="$forum->queued_topics"}' class='ipsType_blendLinks'>{$forum->queued_topics}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
						/
						{{if $forum->queued_posts}}
							<a href='{$forum->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'topic_type' => 'queued_posts' ) )->csrf()}' data-ipsTooltip title='{lang="queued_posts_badge" pluralize="$forum->queued_posts"}' class='ipsType_blendLinks'>{$forum->queued_posts}</a>
						{{else}}
							<span class='ipsType_light'>0</span>
						{{endif}}
					</strong>
				{{endif}}
			</div>
			<ul class="ipsDataItem_lastPoster ipsDataItem_withPhoto">
				{{if $lastPost}}
					<li>{template="userPhoto" app="core" group="global" params="$lastPost['author'], 'tiny'"}</li>
					<li><a href="{$lastPost['topic_url']->setQueryString( 'do', 'getNewComment' )}" class='ipsType_break ipsContained' title='{$lastPost['topic_title']}'>{truncate="$lastPost['topic_title']" length="30"}</a></li>
					<li>{lang="byline_nodate" htmlsprintf="$lastPost['author']->link()"}</li>
					<li class="ipsType_light"><a href='{$lastPost['topic_url']->setQueryString( 'do', 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>{datetime="$lastPost['date']"}</a></li>
				{{else}}
					<li class='ipsType_light ipsResponsive_showDesktop'>
                    	{{if $forum->password}}{lang="no_forum_posts_password"}{{else}}{{if $count>0}}Protected{{else}}{lang="no_forum_posts"}{{endif}}{{endif}}
              		</li>
				{{endif}}
			</ul>	
		{{endif}}

 

 

.

​Thank you!  Now the board shows activity while keeping things protected again!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...