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?
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.
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.";
}
}
}
}
}
asp.net 3.5
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
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
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
Hi jeroen,
did you have time to compile the package already?
hope so
Martin
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:
Jeroen
Thanks a lot, this is very helpful
Martin
is working on a reply...