Atlanta .NET Regular Guys

Community Blog for two guys in Atlanta that focus on Microsoft and Community.

Quick About

This is the community blog for Brendon Schwartz and Matt Ranlett.  If you want to see their technical posts visit http://www.sharepointguys.com

Back To DevCow

Recent Posts

Tags

Email Notifications

    Archives

    December 2007 - Posts

    Correct way to add Site Copyright line in Graffiti CMS

    It is very easy to add the copyright information to the page in a Graffiti CMS view, but the default new theme template adds the following

    Add copyright information:

    $data.Site.Copyright

    You should update your templates with the following lines that will only display if you have copyright information, otherwise if the copyright information is empty it will display $data.Site.Copyright.

    Better line:

    $!data.Site.Copyright

    Promotion and a raise - thank you very much

    Intellinet formally announced raises today.  Nelson and I got promoted to Principal Consultant and Arthur was bumped up to Solution Architect status.  I'm happy.  I also got a nice little nudge in pay to go with that promotion.

    Good timing too - Kim's going to be out of work for a while...

    Posted: 12-21-2007 4:22 PM by Matt Ranlett | with no comments
    Filed under:
    Add Login link to home page with Graffiti CMS

    After installing Graffiti CMS I found it difficult for end users to know where to log in.  Go ahead don't read the document called Readme.htm and see if you can find out where to log in.  Well after learning a little bit about Graffiti CMS I found out how easy it would be for me to add it.

    Start by clicking Personalize on your current theme and add the follow lines of code to your HTML.  You can obviously change it as you see fit.

    #if($macros.IsNull($user.ProperName))
            <b>You are not Logged in!</b> <br />
            Do you want to <a href="/graffiti-admin" mce_href="/graffiti-admin">Log in</a>
    #else
            $user.ProperName
    #end

    Here is how it looks and so simple.

    Login Script In Action

    Adding common images to your Graffiti CMS site

    A very common action that many web site developers do is create a folder called ~/images that holds common images for the site.  For instance this could be files like CSS background images or your sites logo.  To do this in Graffiti CMS it is very simple, let's look how.

    Step 1: Log into the control panel

    Step 2: Click on Site Options, then select the Utilities box, then select File Browser

    Step 3: In the File Browser click Create Folder and enter the name images, then press ok

    Create Folder Graffiti CMS

    Step 4: Click on the /images folder and select Add Files

    Add Files Graffiti CMS

    Step 5: From there you upload the files you want with the common Windows Explorer Dialogs.

     

    Like they promised with the product, amazingly simple and easy to use.

    I Love Graffiti CMS

    The guys at Telligent have out done themselves again.  If you haven't started to look into Graffiti CMS you really should at least try it out.  Give yourself 30 - 45 minutes and you are good to go.  I can't wait until all of the documentation is ready too.

    http://graffiticms.com/

    ScreenShot007

    Thanks for another great product guys.

    Internet Explorer 8 and Microsoft CRM 4.0 (Titan)

    This week has been a busy week and it is only half way over. 

    The IE team announced today that they had the first check in of code for Internet Explorer 8 passing the Acid2 test. http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx

    I hope this will mean better standards compliance with the next version of SharePoint, as they already have a start with Accessibility Kit for SharePoint (AKS).  Many people have already added master pages, CSS, and standards compliant functionality, but it would be nice to have it as an option out of the box.

    A couple days ago Microsoft released Microsoft CRM 4.0 (Titan) - http://www.microsoft.com/Presspass/press/2007/dec07/12-17CRM40PR.mspx

    With this release of Microsoft CRM 4.0, I am looking forward to increased integration with SharePoint.  I think that companies will continue to see the value of this version of Microsoft CRM and continue adoption.  I have started working with the new version and will let you know of any exciting SharePoint/CRM points.

    Snowy NYC

    I'm in New York City - center of the universe.  It's a week or two before Christmas.  This means that the windows are all decorated, millions of tourists jam the streets and subways, etc.  Recently I took the opportunity to be one of them.

    Time Square panorama courtesy of the Windows Live Photo Gallery

    Time Square Panorama

     

    Pretty window decorations:

    Saks 5th Ave. window   Botanical Garden window from some building

     

    Rockerfeller Center                          Radio City Music Hall

    Rockerfeller Center and big tree    CIMG0025

    Posted: 12-19-2007 4:14 PM by Matt Ranlett | with 2 comment(s)
    Filed under:
    Shawn released www.geekdinners.com

    Shawn Wildermuth (the ADO guy) has just released the first version of http://www.geekdinners.com.  He has been running the Atlanta area Geek Dinners for some time now and it is great to see the site really coming together.  I think this will help people find the events and get to them very easily. 

    www.geekdinner.com

    The best part about the site is that other cities will benefit from the work that Shawn is doing.  There will be a feature to host your own Geek Dinner.

    Check out his full post and what he used to create the site: GeekDinners.com is Live!

    Thanks for all you do Shawn!

    Subway breakdown sets me back over an hour

    subwayphoto

    A subway with broken doors set me back over an hour this morning.  More than making me wait, it made me stand in some extremely crowded conditions with this nasty guy coughing all over the place right in front of me.  It makes me understand why people push and shove their way around - after an hour of standing there I just wanted to get off the stupid train.

    And to top it off, I think my Zune is starting to malfunction.  I don't know if it's the cable or the Zune itself, but I've been having bizarre battery problems.  The device is 80% charged, but reports itself as out of battery.  I plug it in and after 15 seconds of charging, it comes back to life at 80% charged.  I wasn't having any of these problems until I upgraded the firmware on the device.  Crappy.

    Posted: 12-18-2007 9:45 AM by Matt Ranlett | with 2 comment(s)
    Filed under:
    Going a little too far with stage fright of Web 2.0

    I really respect Jakob Nielsen on most of his suggestions about web sites and intranets, but today his newsletter came in with the title "Web 2.0 Can Be Dangerous" http://www.useit.com/alertbox/web-2.html.  This seems like a broad statement for a broad term "Web 2.0".  I am afraid this could give the who read his material the wrong idea about Web 2.0.

    Claim: Don't use AJAX
    Mr. Nielsen's biggest argument for AJAX or rich content sites is that people don't know how to design them and create them yet.  Isn't that the point with new technology?  Sometimes you will do an amazing job and sometimes we learn from our mistakes.  Maybe some of you remember the web sites from the early days, most people used the scrolling marque.  That didn't seem to work and today everyone knows in most cases not to use it.  We learned and improved the way people interacted with web sites from the early days of web sites.  If we would have stopped and gone back to basic pages, sites like http://www.amazon.com/ would be a little boring.

    Claim: Communities are too small and Mashups confuse people
    There were no real arguments about social networking either for or against.  He did talk about discussion groups/boards and how they don't work well on the web.  I think this is a problem with the web site and the purpose of the site and not the technology.  The same comments on Mashups were that the technology isn't ready yet and that you should still write your own services.  It seems like the concern he has is a major fear of the hosted model or relying on people for services.  This is the direction the industry is going and I think it is better to understand it then to try not to use it.

    Wrap up: Use Web 2.0 when it fits
    So his final point is that using a little Web 2.0 doesn't hurt, very different than his title that got you to read his article.  I think this is the biggest problem with the article.  You can't just use Web 2.0, Web 2.0 means a lot to many people.  The funny part here is that he says you have to have all your Web 1.0 requirements working.  Well at some point in time people were saying Web 1.0 might not have much ROI and that you should have your pre Web 1.0 requirements working first.  The web is an evolution, you have to evolve with it.  That means you might not always make the right choices, but you will have to change with the times.  Yes a static site will still work, in fact that is what I usually start with, but if you want a real site it must be interactive and have updated data/functionality.

    My advice is to learn what Web 2.0 is (http://en.wikipedia.org/wiki/Web_2), learn the terminology for yourself, learn how it can be used.  Then decide what you shouldn't use for now.  Don't stay away from Web 2.0 before you know really know what it is.

    Sleepless SharePoint Programming contest

    image 

    Sleepless - the Ultimate Office Dev Weekend

    Site Collection Template will not add to central admin

    If you are trying to upload a Custom Site Template on your central administration site using the commands:

    stsadm -o addtemplate -filename "devcowcustomv1.stp" -title "custom site template"

    or

    stsadm -o enumtemplates

    You might get the error message "This web service does not support custom web templates." if the user you are running the command with does not have permissions to write to the database.  This can happen if you have a machine for the central administration and a machine for the database.

    SharePoint Delegate Controls in SharePoint 2007 - Best Practices

    SharePoint Delegate Controls: What EVERY SharePoint developer should know, but most do not.

    Every time I talk to someone about SharePoint 2007 development, I ask them if they know about SharePoint delegate controls.  Almost all of them have said no at first. LEARN THEM!

    I feel this is one of the most important features of SharePoint 2007 if you are doing any type of customization or skinning.

    A delegate control is user control that has a predefine space on a page that can be changed by turn on or off a feature.  The stock example used is, if you want to change the search area you could upload a feature with a user control to replace it with your own.  Delegate controls are based on numbered sequences with the lowest being displayed.  Yours just has to be the lowest.

    Looking on the web there are some good resources to get you started

    A couple rules of thumb that I use, but some have no real technical reason. These are just some best practices for delegate controls:

    1. When designing your page, create delegate controls for functionality that might change over time. (i.e. the search box like Microsoft did)
    2. Don't over use delegate controls. You will find once you understand them you will want to use them everywhere.
    3. Number 3 is my most important rule, you should have 3 delegate controls on every page.
    4. Don't put too many delegate controls in a single feature, remember they all deploy together. (light up/turn off together)
    5. Keep good track of the sequence and don't put the number too low.  You don't want to have trouble overriding the feature in the future.

    Most people always give me a hard time about number 3 because there are no technical reasons to have 3 delegate controls on a page.  The reason I think this rule holds true is because on most pages you will have a search area (1 delegate control), navigation data source (2 delegate controls), and then you might have your own for the functions of your application (3 delegate controls).  Every application will be different, but I think you will find that in your application you will have 3 or more delegate controls per page.

    Here are some areas that could use some improvement going forward with delegate controls.

    1. A user interface page in the site settings to manage delegate controls for the site.
    2. The ability to create a delegate control container on the fly out of the box.
    3. Adding a new control ID to a site from the user interface. (i.e. <Control Id="ControlArea" Sequence="25" ControlSrc="~/_ControlTemplates/AddedControl.ascx" />)
    4. Have the ability to change the sequence number of the loaded delegate controls on the fly though the user interface.
    5. Be able to change a delegate control sequence per site within the user interface.
    SharePoint Escape Characters Extended

    I just read a blog post that has the description of SharePoint escape characters for URLs.  It is a great start and I thought I would add on a little.  I think that some of them might be incorrect so I wanted to put some examples up online.

    Jacob's post with the escape code format

    http://www.jacobshireman.com/blog/?p=5

    These escape codes are really just URL encoding values, which are just the hexadecimal value formatted differently. Here are how they would be represented.

    ASCII Value SharePoint Escaped value URL-encoded Hex Decimal HTML
    space _x0020_ %20 20 32 &#32; or &nbsp;
    & _x0026_ %26 26 38 &#38; or &amp;
    ' _x0027_ %27 27 39 &#39;
    - _x002d_ %2d 2D 45 &#45;
    _ _x005f_ %5f 5F 95 &#95;
    { _x007b_ %7b 7B 123 &#123;
    } _x007d_ %7d 7D 125 &#125;

    Here is when you would use these:

    Type Format String When to Use
    ASCII Value   Used in text strings
    SharePoint Escaped value _x00 + <hex value> + _ Used in URLs that you are passing the value as a parameter.  An example might be in the fields of a list
    URL-encoded % + <hex value> Used in the query string, for example in a browser
    HTML &# + <dec value> + ; Used in HTML, ASP, ASP.NET code files that will be displayed by a browser. This only applies to standard ASCII values.

    Here are the examples of when you would use them:

    Type Example
    SharePoint Escaped value
    http://sharepoint.devcow.com/_layouts/FldEditEx.aspx?List={BA251860-97D5-45D8-9621-BD19EACDCE3F}&Field=Product_x0020_Code
    URL-encoded
    http://sharepoint.devcow.com/Lists/Project%20Details/AllItems.aspx
    HTML

    <div>This is a space (&#160;)</div>
    <div>This is a space (&#32;)</div>
    <div>This is a space (&nbsp;)</div>

    Sometimes you will use the SharePoint Escaped value and the URL-encoded value together. 

    The above SharePoint escaped value example would become: http://sharepoint.devcow.com/_layouts/FldEditEx.aspx?List=%7BBA251860%2D97D5%2D45D8%2D9621%2DBD19EACDCE3F%7D&Field=Product%5Fx0020%5FCode

    I think you get the idea and can encode or decode any of the strings, URLs, or combinations in SharePoint with your decoder rings now.

    Here is a list of HTML URL-encoding characters: http://www.w3schools.com/tags/ref_urlencode.asp

    Here is a reference of the Hex number and HTML value: http://www.asciitable.com/

    Here is a reference to the HTML character entities: http://www.w3schools.com/html/html_entities.asp

    Error Type Not loading when building custom web services in SharePoint 2007

    If you have followed the steps in the MSDN article http://msdn2.microsoft.com/en-us/library/ms464040.aspx or used the blog post http://blogs.ittoolbox.com/km/sharepoint/archives/creating-a-custom-web-service-for-sharepoint-13553 you may have run into an error that looked like the follow:

    Could not load type 'DevCow.SharePoint.WebServices.HelloBrendon' from assembly 'DevCow.SharePoint.WebServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bf7fa58d7195484e'

    Error Message

    You might find it strange that nothing is in the eventlog or the SharePoint log, so for a new person or even skilled person this would give them no idea of what to change.

    There could be a couple of reasons.

    1. The class might not be in the assembly.  To fix this just add the right reference to the class.
    2. I couldn't find the real problem, sorry there is no magic fix yet.

    Here is what I did to fix number 2

    1. I added this the AssemblyInfo.cs file

      using System.Security;

      [assembly: AllowPartiallyTrustedCallers()]
    2. Rebuilt the Class file.
    3. Ran IISReset.
    4. Redeployed my files to the server.
    5. Navigated to the file http://sharepoint.devcow.com/_layouts/DevCowSampleWebService.asmx
    6. Removed the added code from AssemblyInfo.cs
    7. Rebuilt the Class file
    8. Ran IISReset.
    9. Redeployed my files to the server
    10. Navigated to the file http://sharepoint.devcow.com/_layouts/DevCowSampleWebService.asmx and it still worked.

    I am sorry that I don't have more helpful information for this problem, I know it can be frustrating if you do have the error.

    Now I am having trouble recreating the problem, but I know I saw it.  If you are having trouble please email me to try to figure this problem out.

    More Posts Next page »