Posts in Category: Development

LDAP Thrashing rescued by SLES 9

For about 3 weekends now I've been thrashing with getting OpenLDAP setup and working on my Suse 9.3 machine so I could test some work contributed by TJ Fontaine for supporting LDAP authentication. I read a lot of great tutorials but I always ran into some trouble. I did manage to get OpenLDAP running and was able to query it but I had problems getting the YaST and Samba integration working. I would run net getlocalsid and it would say it couldn't get either secret but I figured ok at least I can query it but I needed some users with the right schema elements especially a mail attribute. I was using the Samba shema which has a mail property but when I would try and set that using ldapmodify and a .ldif file it would give errors like that wasn't a valid attribute. I think the trouble had something to do with Samba being setup before I configured LDAP and then trying to change the Samba setup to use LDAP it got funky. I decided to try Edd Dumbill's tutorial on my laptop running the latest greatest Ubuntu breezy but it could not find all the needed packages to follow his instructions. I tried updating my sources.list file to see if some of the other repositories had the libraries but for some reason I could not connect reliably to any of the Ubuntu or Debian repositories. Not sure if this is just traffic problems due to the popularity of Ubuntu and the new release or what. I'm sure a linux super guru could have worked past these issues but for a long time Windows guy trying to learn as he goes its been quite a struggle with obstacles at every step. I do plan to give it another try soon with SUSE 10 for my own learning benefit but for now I just needed the shortest path to getting a working LDAP implementation so I can get back to working on mojoPortal.

Then it hit me (just like in the Novell ads ;D) maybe SLES 9 has an easier setup for LDAP, there must be some value added above and beyond what comes in the free version so I downloaded the 30 day eval version last night and installed it this morning. Sure enough you can configure LDAP as part of the install process. Unless I missed something this was not in the Suse 9.3 install. Anyway 30 minutes later I have a working LDAP server and 15 minutes after that I was able to login against it(in mojoPortal) using TJ's changes! Whoohoo!

Now I can get to the parts I need to do like implementing the other 2 data layers to support the new fields and creating upgrade scripts and other things to integrate TJ's changes. I have 30 days before my eval of SLES 9 runs out so I better get working! After that I need to test against Active Directory, in theory it should work the same way. TJ's implementation uses the Novell.Directory.Ldap library that comes with mono. I put this dll into the bin folder of my app on my Windows development machine and was able to compile against it and run under the .NET framework so it will work for mojoPortal installations under Windows or mono.

Major Skinning changes landing in svn today

Update: I've commited the changes to svn and still testing and tweaking but as you can see I've updated this site with one of Jasmin's new skins.

I'll be committing major changes to svn today that affect the skinning system of mojoportal.  This will require a little re-work for those of you who already have your own custom skins. I have already done this re-work for all the included skins so if you are using one of those you don't have to do anything.

Jasmin Savard contributed a complete re-organization of the stylesheet classes that is much better than what we had before and allows for much more intricate styling, he also contributed 2 very nice skins that show what is possible with this new style organization.

I have changed the way skins are stored in the file system to make it easier to work with skins and create new ones. Now all skins will have their own folder and the name of the folder will be the skin name you see in the SiteSettings dropdown for skins. Inside this folder will be the skin file which must be named layout.ascx and the stylesheet which must be named style.css. Any supporting images can also be put in this folder.

To convert your existing custom skin just create a folder as mentioned above and put your files in it with the appropriate names. You will also need to re-visit the stylesheet and compare the classes in the new built in skins with the ones in your stylesheet and update your stylesheet with the new classes.

I will hopefully deploy the new model to this site later today after some additional testing and after I commit these changes to svn.

On another note, those of you using the latest release of mojoPortal on Windows should be aware of a bug in NeatUpload that was found to corrupt some file uploads. This does not affect users who are running on mono, only on Windows. The bug has been fixed in NeatUpload and will be included in the next release coming soon. In the meantime you can either comment out the upload module in your Web.config file or go get the updated NeatUpload code, compile and replace the Brettle.Web.NeatUpload.dll file in your bin folder beneath the web site root.

FCKeditor 2.0 Final Release

I just upgraded the source code in svn to use the new final release of FCKeditor. Those of you using the mojoPortal source code from svn can get it now. After I've had a chance to do some more testing I'll make a new release. I've upgraded this site to use it as well so I can test. So far so good.

Update:
I'm having a few issues with the new FCKeditor and trying to work through them. Its not allowing me to browse the server or upload files on mono. It works in IIS, I think there is a case sensitivty issue somewhere but haven't found it yet.

Also the css for the editor is displaying funky but appears ok when it renders outside the editor.

Using the VS.NET Web Page Designer with mojoPortal

For a long time my use of MasterPages has prevented the use of the VS.NET designer in setting up page layout.  Its never really bothered me because I'm an old school html guy and really never use the designer anyway so I didn't look into it too hard.  Since then several people have asked and expressed their wish for it to work in the VS.NET designer.  Well big thanks go out to Jan Hussaarts for figuring out why it didn't work and how to easily fix it.

It wasn't a problem with MasterPages itself, it was code I added to make it get the skin setting from the SiteSettings object stored in the HttpContext. The problem was that at design time there is no HttpContext so all it needed was a check to see if HttpContext is null before using it and now it works in the designer!

Its commited to svn for those of you working with the VS.NET Solution.

Release 20050620

I just made a new release that includes the cool new SmartDropdown I mentioned in my previous posts. I don't normally make a new release only 2 days after the previous release but this feature did not require any changes to the structure of the database so its an easy upgrade from 20050618. As always be sure and back up both your web site and your db if you are using the site. Update all the web files. If upgrading from previous versions run the appropriate upgrade scripts first and if using MS SQL or PostgreSQL run the stored procedure script again to update all the procedures.  Of course if you are fairly new to mojoPortal a clean install of the latest version is the easy way to go.

I also wanted to go ahead and roll out this feature because the next things I'm going to work on are fairly significant features and I didn't want to delay the current feature too long.

Next on my list are Site Search which I'm going to try and implement with Lucene.NET and logging which I plan to implement with Log4Net

Woa! I just went to the Lucene.NET site to get the link for this post and it says they have stopped open source development. Looks like they've gone commercial. Wonder if I can use the version of Lucene.NET I already have in mojoPortal without getting into any trouble? I hadn't been to the site in a while, looks like they made the decision last September.

Any license gurus out there? If they previously released it under Apache License, Version 2.0 can I continue to use that version in mojoPortal or can they retroactively change the license? I could use some advice before I invest my time trying to get it working.

Update: Thanks Michel, I was confused, it is DotLucene that I planned to use all along and it is still open source. I went to the the Lucene.NET page by accident and got confused.