YAFLogo

Jacobson
  • Jacobson
  • 57.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Hi,
Is there any way to hide the member list link from my users.?I want it only to be displayed when log in as admin.Is there any way..?? And one more thing is it possible that my moderators dont have the privilage of suspending an user. It would have been nice if I could select what all privilages my moderator should possess. Can it be done?

Thanks & Regards..
Sponsor

shrage
  • shrage
  • 57.8% (Neutral)
  • YAF Forumling
14 years ago
The only way to hide the member link is by customizing the the YAF sources, i did it for my forum.
logan
  • logan
  • 100% (Exalted)
  • YAF Leader
14 years ago
In ver.1.9.3 rc2 you can uncheck in hostsettings - permissions tab - Forbidden

1.9.1.8 ForumPages.cs #590 -- Recompile

  // BEGIN HEADER
			StringBuilder header = new StringBuilder();

			// get the theme header -- usually used for javascript
			string themeHeader = GetThemeContents( "THEME", "HEADER", null, true );

			if ( themeHeader != null && themeHeader.Length > 0 )
			{
				header.Append(themeHeader);
			} 

			header.AppendFormat( "<table width=100% cellspacing=0 class=content cellpadding=0><tr>" );

			if ( User != null && User.IsAuthenticated )
			{
				header.AppendFormat( "<td style=\"padding:5px\" class=post align=left><b>{0}</b></td>", String.Format( GetText( "TOOLBAR", "LOGGED_IN_AS" ) + " ", Server.HtmlEncode( PageUserName ) ) );
				header.AppendFormat( "<td style=\"padding:5px\" align=right valign=middle class=post>" );
				if ( !IsGuest )
					header.AppendFormat( String.Format( "	<a target='_top' href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.cp_inbox ), GetText( "CP_INBOX", "TITLE" ) ) );

				/* TODO: help is currently useless...
				if ( IsAdmin )
					header.AppendFormat( String.Format( "	<a target='_top' href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.help_index ), GetText( "TOOLBAR", "HELP" ) ) );
				*/

				header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.search ), GetText( "TOOLBAR", "SEARCH" ) ) );
				if ( IsAdmin )
					header.AppendFormat( String.Format( "	<a target='_top' href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.admin_admin ), GetText( "TOOLBAR", "ADMIN" ) ) );
				if ( IsModerator || IsForumModerator )
					header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.moderate_index ), GetText( "TOOLBAR", "MODERATE" ) ) );
				header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.active ), GetText( "TOOLBAR", "ACTIVETOPICS" ) ) );
				if ( !IsGuest )
					header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.cp_profile ), GetText( "TOOLBAR", "MYPROFILE" ) ) );
				//ADMIN ONLY//
                if ( IsAdmin )
                header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a> |", Forum.GetLink( Pages.members ), GetText( "TOOLBAR", "MEMBERS" ) ) );
				if ( User.CanLogin )
					header.AppendFormat( String.Format( "  <a href=\"{0}\" onclick=\"return confirm('Are you sure you want to logout?');\">{1}</a>", Forum.GetLink( Pages.logout ), GetText( "TOOLBAR", "LOGOUT" ) ) );
			}
			else
			{
				header.AppendFormat( String.Format( "<td style=\"padding:5px\" class=post align=left><b>{0}</b></td>", GetText( "TOOLBAR", "WELCOME_GUEST" ) ) );

				header.AppendFormat( "<td style=\"padding:5px\" align=right valign=middle class=post>" );
				header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a> | ", Forum.GetLink( Pages.search ), GetText( "TOOLBAR", "SEARCH" ) ) );
				header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a>  ", Forum.GetLink( Pages.active ), GetText( "TOOLBAR", "ACTIVETOPICS" ) ) );
				//header.AppendFormat( String.Format( "	<a href=\"{0}\">{1}</a>", Forum.GetLink( Pages.members ), GetText( "TOOLBAR", "MEMBERS" ) ) );
				if ( User != null && User.CanLogin )
				{
					if ( TransPage != "LOGIN" )
						header.AppendFormat( String.Format( " | <a href=\"{0}\">{1}</a>", Forum.GetLink( Pages.login, "ReturnUrl={0}", Server.UrlEncode( Utils.GetSafeRawUrl() ) ), GetText( "TOOLBAR", "LOGIN" ) ) );
					if ( !BoardSettings.DisableRegistrations )
						header.AppendFormat( String.Format( " | <a href=\"{0}\">{1}</a>", Forum.GetLink( Pages.rules ), GetText( "TOOLBAR", "REGISTER" ) ) );
				}
			}
			header.AppendFormat( "</td></tr></table>" );
			header.AppendFormat( "<br />" );
			if ( ForumControl.Header != null )
				ForumControl.Header.Info = header.ToString();
			else
				m_headerInfo = header.ToString();
			// END HEADER

test
Jacobson
  • Jacobson
  • 57.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
too good...Thanks a lot guys...
doxa123
  • doxa123
  • 100% (Exalted)
  • YAF All-the-Time YAF Version: 3.1.14
13 years ago
is it same on 1.9.5 Final ?

can we hide links from guests ?
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button