Jump to content

Download: Hidden Profile Views


capbiker

Recommended Posts

File Name: Hidden Profile Views
File Submitter: capbiker
File Submitted: 09 Feb 2010
File Updated: 09 Feb 2010
File Category: Hooks and Plugins

This hook will enable you to select which member groups can view user's profiles while not appearing on Latest Visitors list.

V1.0.1 is a simple update from a suggestion from Michael. Within the settings page for this hook you can select the multiple member groups from a menu by holding down Ctrl and clicking on the required member groups. This will make it a lot more easier to update as required.

Click here to download this file

Link to comment

To make a setting where you can better select which groups can do something, here are some tips. In the "Setting Extra?" field for the setting, put this code:

#show_groups#

In the "Raw PHP code to eval before showing and saving?" field, put this:

if ( $save == 1 )

{

	if ( is_array( $_POST['caps_hidden_profiles_groups'] ) )

	{

		$_POST['caps_hidden_profiles_groups'] = implode( ",", $_POST['caps_hidden_profiles_groups'] );

	}

	else

	{

		$_POST['caps_hidden_profiles_groups'] = "";

	}


	$key = 'caps_hidden_profiles_groups';

}

if ( $show == 1 )

{

    $key='caps_hidden_profiles_groups[]';

}


Finally, for the "Setting Type?" field, use either 'Drop Down' if it's something where one group will be permitted to do something, or 'Multi-Select' if it's something where multiple groups will be permitted to do something, like for this mod.

This'll make it easier for people to choose which groups can do something than just entering a comma-separated list. :)

Link to comment

To make a setting where you can better select which groups can do something, here are some tips. In the "Setting Extra?" field for the setting, put this code:



#show_groups#

In the "Raw PHP code to eval before showing and saving?" field, put this:

if ( $save == 1 )

{

	if ( is_array( $_POST['caps_hidden_profiles_groups'] ) )

	{

		$_POST['caps_hidden_profiles_groups'] = implode( ",", $_POST['caps_hidden_profiles_groups'] );

	}

	else

	{

		$_POST['caps_hidden_profiles_groups'] = "";

	}


	$key = 'caps_hidden_profiles_groups';

}

if ( $show == 1 )

{

    $key='caps_hidden_profiles_groups[]';

}


Finally, for the "Setting Type?" field, use either 'Drop Down' if it's something where one group will be permitted to do something, or 'Multi-Select' if it's something where multiple groups will be permitted to do something, like for this mod.

This'll make it easier for people to choose which groups can do something than just entering a comma-separated list. :)



Oh I never know about the #show_groups# thing before. I am in the progress of updating this hook to use Michael's suggestion for selection member groups easier.

cap
Link to comment
  • 2 months later...

It's already done as the latest version is 1.0.1 and should have this feature already added to it.



cap




It's taken me ages to come back to it but I have finally had the time to install it... it works perfect.

Thank you very much.
Link to comment
  • 1 year later...
  • 5 months later...

Archived

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

  • Recently Browsing   0 members

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