Copied to clipboard

Flag this post as spam?

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


  • Martin Lingstuyl 202 posts 379 karma points
    May 09, 2011 @ 12:54
    Martin Lingstuyl
    0

    Hi,

     

    Great package that seems to fill in my need precisely. But i see its compiled against asp.net 4.
    Could you maybe compile one against asp.net 3.5 for me?

     

    hope to hear from you

    Martin

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 09, 2011 @ 13:00
    Jeroen Breuer
    0

    Hello,

    Do you get any errors if you try to install it? It's compiled againt .NET 4.0, but it should also work on .NET 3.5. I'll see if I can release a 3.5 version this weekend.

    Jeroen

  • Martin Lingstuyl 202 posts 379 karma points
    May 09, 2011 @ 15:06
    Martin Lingstuyl
    0

    Hi Jeroen,

     

    I tried to install it before I commented on this forum. I get a 'compiled on a newer runtime' error.

    Hope you can compile it this weekend. Looking forward to it.

     

    Martin

  • Martin Lingstuyl 202 posts 379 karma points
    May 16, 2011 @ 13:59
    Martin Lingstuyl
    0

    Hi jeroen,

    did you have time to compile the package already?

    hope so

     

    Martin

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 16, 2011 @ 14:39
    Jeroen Breuer
    0

    I had a busy weekend so I'm sorry. The package is very simple actually. All it does is run some sql code to add the extra section. If you run this code somewhere just once it should also work:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using umbraco.DataLayer;
    using umbraco.BusinessLogic;
    
    namespace DigibizDictionarySection
    {
        public partial class Installer : System.Web.UI.UserControl
        {
            protected static ISqlHelper SqlHelper
            {
                get { return umbraco.BusinessLogic.Application.SqlHelper; }
            }
    
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    try
                    {
                        //Get the new sort order value.
                        int newSortOrder = SqlHelper.ExecuteScalar<int>("Select max(sortOrder) from umbracoApp") + 1;
    
                        //Insert a new row in the umbracoApp table.
                        //This will create the extra section.
                        string insertUmbracoApp = @"
                            insert umbracoApp ([sortOrder], [appAlias], [appIcon], [appName], [appInitWithTreeAlias]) 
                            values (" + newSortOrder + ", N'language', N'.traytranslation', N'Language', NULL)";
                        SqlHelper.ExecuteNonQuery(insertUmbracoApp);
    
                        //Insert a new row in the umbracoAppTree table.
                        //This will open the dictionary item in the extra section.
                        string insertUmbracoAppTree = @"
                            insert umbracoAppTree ([treeSilent], [treeInitialize], [treeSortOrder], [appAlias], [treeAlias], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType], [action]) 
                            values (0, 1, 0, N'language', N'dictionary', N'Dictionary', N'.sprTreeFolder', N'.sprTreeFolder_o', N'umbraco', N'loadDictionary', N'openDictionary()')";
                        SqlHelper.ExecuteNonQuery(insertUmbracoAppTree);
    
                        //Insert a new row in the umbracoUser2App table.
                        //This will give the admin rights to the extra section.
                        string insertumbracoUser2App = @"
                            insert into umbracoUser2App([user], app)
                            values (0, N'language')";
                        SqlHelper.ExecuteNonQuery(insertumbracoUser2App);    
                    }
                    catch (Exception ex)
                    {
                        Log.Add(LogTypes.Error, -1, ex.Message + "<br/>" + ex.StackTrace);
                        LblMessage.Text = "An error occurred while installing this package. The error has been logged.";
                    }
                }
            }
        }
    }

    Jeroen

  • Martin Lingstuyl 202 posts 379 karma points
    May 16, 2011 @ 15:10
    Martin Lingstuyl
    0

    Thanks a lot, this is very helpful

    Martin

Please Sign in or register to post replies

Write your reply to:

Draft