Plugin config order and language file strings within the plugin (1 Viewer)

Lightning303

MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Germany Germany
    Country flag
    I now combined them all as you suggested aswell as removed the redundant declarations.
    However the menu items are still ordered alphabetically.
    I've checked the code and found the reason: https://github.com/MediaPortal/Medi...ents/Configuration/ConfigurationModel.cs#L480.

    Here a WorkflowAction is created, using the label as sort criteria.

    What should we do? I would extend the config section metadata with a custom "sort" attribute, so you can define it inside plugin.xml. If it's null or empty default sorting will be title as now. Would this be what you need?
    So i would be able to change my plugin.xml to something like this?

    Code:
      <Register Location="/Configuration/Settings/Plugins/AtmoLight">
        <ConfigSection
            Id="General"
            Sort=1
            Text="[AtmoLight.General]"/>
        <ConfigSection
            Id="AtmoWin"
            Sort=2
            Text="[AtmoLight.AtmoWin]"/>
        <ConfigSection
            Id="Hue"
            Sort=3
            Text="[AtmoLight.Hue]"/>
        <ConfigSection
            Id="Hyperion"
            Sort=4
            Text="[AtmoLight.Hyperion]"/>
        <ConfigSection
            Id="Effects"
            Sort=5
            Text="[AtmoLight.Effects]"/>
        <ConfigSection
            Id="Buttons"
            Sort=6
            Text="[AtmoLight.Buttons]"/>
        <ConfigSection
            Id="Advanced"
            Sort=7
            Text="[AtmoLight.Advanced]"/>
      </Register>
    If so, yeah thats what i would need/like to do.

    Thanks!
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    Please try this new branch:
    [21:53] <MP2-GitBot> [MediaPortal-2] morpheusxx created FEAT_ConfigSort (+1 new commit): http://git.io/hBtstQ
    [21:53] <MP2-GitBot> MediaPortal-2/FEAT_ConfigSort 4e4e3a1 morpheusxx: Added "Sort" attribute for configuration items

    The "Sort" is a string which you can fill as you like:
    <ConfigSection
    Id="Advanced"
    Sort="Atmo-07"
    Text="[AtmoLight.Advanced]"/>
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    Another point to consider: if you have so many options, it would be more comfortable if you provide an own model + dialog which can offer more input at once.

    Examples are:
    • Weather setup dialog
    • Trakt.tv setup dialog
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Germany Germany
    Country flag
    Please try this new branch:
    [21:53] <MP2-GitBot> [MediaPortal-2] morpheusxx created FEAT_ConfigSort (+1 new commit): http://git.io/hBtstQ
    [21:53] <MP2-GitBot> MediaPortal-2/FEAT_ConfigSort 4e4e3a1 morpheusxx: Added "Sort" attribute for configuration items

    The "Sort" is a string which you can fill as you like:
    <ConfigSection
    Id="Advanced"
    Sort="Atmo-07"
    Text="[AtmoLight.Advanced]"/>
    Thanks!
    This works perfectly. :) Im a happy camper.


    Another point to consider: if you have so many options, it would be more comfortable if you provide an own model + dialog which can offer more input at once.
    Examples are:
    Weather setup dialog
    Trakt.tv setup dialog
    I will have a look at that, however i think the config interface that MP2 provides is really good and suits my needs perfectly.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 4
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

























    Top Bottom