Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ulrich Wagner Gade Ebsen 127 posts 277 karma points
    May 02, 2011 @ 12:24
    Ulrich Wagner Gade Ebsen
    0

    Admin view

    Hi

    This is a very handy package.. ;)

    Is it possible to let admin se all items regardless of what is specified in the config file? ... like in the Tab Hider package...

    /ulrich

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    May 03, 2011 @ 09:55
    Tim
    0

    Thank you!

    :)

    It isn't at the moment, but I can add something to make that possible fairly easily. It might be about a week before I get a chance to add that though! I'm extending it to do media items as well, so I'll release that at the same time.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    May 03, 2011 @ 11:17
    Tim
    0

    Hi Ulrich,

    I've added the ability to to ignore the rules for members of the Administrator group, and I've also added the ability to make the rules affect the media section as well. You can download version 1.1 from the project page now, update to the project page and blog post coming shortly!

    :)

  • Ulrich Wagner Gade Ebsen 127 posts 277 karma points
    May 03, 2011 @ 11:35
    Ulrich Wagner Gade Ebsen
    0

    Hi Tim,

    That is absolutely fantastic.. ;)

    Thanks.. ;)

    /ulrich

     

  • Wouter 49 posts 76 karma points
    Oct 26, 2012 @ 09:53
    Wouter
    0

    Hi, first of all, thank you for this super duper package! Currently using it with umbraco 4.8 and I'm having no problems what so ever, thumbs up! Anyway, I was thinking perhaps it's better to move the ignoreForAdmin and useInMediaSection settings to the web.config? This way it would be possible for us programmers to set it through code an write custom stuff for it...ex: ConfigurationManager.AppSettings["ignoreForAdmin"];

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Oct 29, 2012 @ 10:18
    Tim
    1

    Hi Wouter,

    I tend to keep my package's settings out of the web.config, as that means they can potentially get overwritten during an Umbraco upgrade! You could access the config file using .Net's XML features if you wanted. It wouldn't take me long to add some API stuff to this so that you could access/set settings and rules programatically if you wanted? e.g. something like AttackMonkey.CustomMenus.Rules.Add(); If it's not super urgent, I could knock something up in the next couple of weeks?

  • Wouter 49 posts 76 karma points
    Oct 30, 2012 @ 10:29
    Wouter
    1

    Hi Tim. Thank you for your repsonse, it's not that I need it right now or anything, it works fine just now. Just something that came to mind :)

    Anyhow, if you create a custom configuration file you won't need to worry that it get's overwritten when upgrading Umbraco. It's best practice to put configuration settings in the app settings section. When settings are put here, server admin's can change them through the IIS GUI. When I create a website based on umbraco I change load's of stuff in the web.config anyway, so when upgrading a website I always need to check the changes with a merge tool. For example, I add app-settings, connectionstrings, custom handlers/modules, endpoints for webservices, add the maxAllowedContentLength (request timeout) and set it to 104857600 (IIS7=bytes), etc...

    When you are afraid your appSettings get overwritten when upgrading umbraco, there are a couple of things you can do to avoid having to merge or add them again.

    First you can use web.config transformation files. When publishing a site the web.config file will be created with the transformation file that matches with the build configuration. When creating a new site you usually start with de .debug and .release files (you can add more if you want). More information about this you can find on: http://msdn.microsoft.com/en-us/library/dd465326(VS.100).aspx. Also a great tool to extend this is SlowCheetah: http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5.

    Second, you can create a custom configuration file. In the configSections collection of the web.configuration registrer your library:
    <section name="MySection" type="MyLibrary.Configuration.MyClass, MyLibrary.Configuration"/> 
    Then, after the closing tag of the configSections collection add the element that points to your configuration file:
    <MySectionconfigSource="config\MySection.config" />
    In MySection.config you can create your custom appSettings collection. This way, when upgrading umbraco, all you need to do is re-add your custom section in the web.config file. A nice tool for creating configuration files by the way is Configuration Sections Designer plug-in: http://csd.codeplex.com/. This will generate your C# code and .xsd for you (not running in VS 2012 yet..).

Please Sign in or register to post replies

Write your reply to:

Draft