Jump to content

Download: (Bim) Top New Posts in Mobile Skin

Featured Replies

Posted

File Name: (Bim) Top New Posts in Mobile Skin
File Submitter: Doremon
File Submitted: 06 Sep 2011
File Category: Hooks and Plugins

Show new posts or new topic in mobile skin.

%7Boption%7D

%7Boption%7D

di-5ZIG.jpg' alt='' class='ipsImage' wid" alt="" class="ipsImage" width="1000" height="362">



Click here to download this file

  • 1 month later...

Can I set if up to show only topics where user have permission to view?

  • 2 months later...

Groups that do not have permission can see the title

Hi there, onlyME. Since I'm using it on my board, decided to post here a tiny change in your script to fix the permission issue.

Find in your XML:

	   	 $bimforum = explode(',', $this->settings['bim_topnewposts_mobile_forum'] );


			   if( count( $bimforum ) )

			   {

				$iwhere = 'forum_id IN (' . implode(',', $bimforum ).  ')';

			  }

Change to:

	   	 $forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds();


			if( !is_array($forumIdsOk) OR !count($forumIdsOk) )

			{

				return '';

			}

			else

			{

				$iwhere = 'forum_id IN (' . implode(',', $forumIdsOk ).  ')';

			}

Now users will only see topics that they have permission to see and makes the setting Forums?. uselless... Unless you want to add a setting to EXCLUDE forums... so it's enough to add:

	   	 $bimforum = explode(',', $this->settings['bim_topnewposts_mobile_forum'] );


			   if( count( $bimforum ) )

			   {

				$iwhere2 = 'forum_id NOT IN (' . implode(',', $bimforum ).  ')';

			  }



You just need now to add $iwhere2 on 'where' query.

If author can upload this changes to original mod file and post as upgrade.
Thank you.

Archived

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

Recently Browsing 0

  • No registered users viewing this page.