Friday, February 3, 2012
Using the Umbraco Object in a Umbraco 5 Template
If you don't do this you will get an error like CS0234: The type or namespace name 'Field' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)
Umbraco 5 Hanging on Install IIS7
Unfortunately I got stopped at the first step, created a new database, created a new site IIS 7 and browsed to the new site. The install just hang with the wait cursor just going round and round. After going insane for a few hours I discovered the fix was disbale Link Scanner in AVG. You can disable this by opening the AVG user interface goto tools > advanced settings > link scanned then unticking the 3 options. Hope this gets you on your way. Hoping to bring you lots more Umbraco 5 blog posts in the weeks and months to come.
Thursday, October 6, 2011
My First Facebook Application
It basically does the following
- You enter your babies date of birth (Due date calculator) found here.
- OHbaby! sends you a week by week account of what your baby is up to.
We are using Quartz.net to schedule the job which seems to be working pretty well so far (When we get 1000's of user we'll see how it goes)
So far I am pretty happy with how its going. Posting messages to Facebook seem to be working pretty well thanks to the Facebook C# SDK.
Check out the application at http://apps.facebook.com/pregnancyweekbyweek/ to see the flow.
Sunday, September 11, 2011
Jquery Validate Form Submit Before Opening Popup Window
Sometimes you want to open a form submit in a new window. Think facebook extended permissions popup window. To achieve this you would do something like the following.
<script type="text/javascript">
$(document).ready(function () {
if ($('#myform').valid()) {
window.open('', 'formpopup', 'width=800,height=600,resizeable,scrollbars');
this.target = 'formpopup';
});
});
</script>
However you wouldn’t want to open the popup window unless the form being submitted in valid.
If you are using jquery.validate then its pretty easy to update the above javascript to this:
<script type="text/javascript">
$(document).ready(function () {
$('#myform').submit(function () {
if ($('#myform').valid()) {
window.open('', 'formpopup', 'width=800,height=600,resizeable,scrollbars');
this.target = 'formpopup';
}
});
});
</script>
Hope this helps someone.
Thursday, September 8, 2011
Go All Blacks | OHbaby! New Zealand
Go All Blacks | OHbaby! New Zealand
Thursday, April 8, 2010
Only allow approved members to Login + Umbraco
In my MemberType I have a True/False datatype called Active.
On my MemberLogin user control page my asp.net member login control looks like
<asp:Login ID="lgMember" OnLoggingIn="Login1_LoggedIn" CssClass="login" VisibleWhenLoggedIn="false" DestinationPageUrl="/Members.aspx"
LabelStyle-VerticalAlign="middle" LabelStyle-CssClass="LoginLabel" TextBoxStyle-Width="100px" UserNameLabelText="Login"
PasswordLabelText="Password" TitleText="" DisplayRememberMe="false" runat="server" />
In the codebehind my Login1_LoggedIn event looks like.
protected void Login1_LoggedIn(object sender, EventArgs e)
{
//get member
Member m = Member.GetMemberByName(((Login)sender).UserName.ToString(), false).First();
if (m.getProperty("Active").Value.ToString() != "1")
{
FormsAuthentication.SignOut();
HttpContext.Current.Response.Redirect(umbraco.library.NiceUrl(1091));
}
}
This will redirect the user to a page explaining their membership hasn't been enabled yet.
Friday, April 2, 2010
nopCommerce and Umbraco
I have two major passions when it comes to .net open source projects and they are Umbraco and nopCommerce. What I am planning on doing is building a nopCommerce package for Umbraco. There are plenty of good commerce packages already for Umbraco and I have nothing against these packages I just love nopCommerce and would like to be able to use it within the Umbraco framework. I don’t think is going to be a quick task and will probably need to be spanned over many months. I’m going to try and blog what I do so other .Net applications might be able to use some of the challenges I encounter and how they might go about resolving them. Please check back here regularly to check on my progress. Will also try and get a package up into codeplex. Wish me luck!