Jacobson
  • Posts: 12
  • Joined: 14/03/2009
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
  • Posts: 13
  • Joined: 15/03/2009
The only way to hide the member link is by customizing the the YAF sources, i did it for my forum.
logan
  • Posts: 309
  • Joined: 15/03/2008
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
  • Posts: 12
  • Joined: 14/03/2009
too good...Thanks a lot guys...
doxa123
  • Posts: 171
  • Joined: 28/09/2009
is it same on 1.9.5 Final ?

can we hide links from guests ?
Running YAF.NET v2.0 Final at: http://www.dilliduduk.com 
.net 4.5.1 & MVC 5 Razor Support Hosting: http://hosting.7renk.net 
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    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

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved