Important notice

Please note that this blog is discontinued here. All the posts are also coppied to my new blog at http://boris.gomiunik.net.
Important: Due to large amount of comment spam further commenting has been disabled here. If you wish to send me a comment, plase look up the same post on my new blog and leave comment there. Thanks!

9/07/2008

Making "Post" and "Get" forms from SharePoint’s pages

Recen project we were working on needed some forms to be posted to certain services. Knowing that SharePoint's pages are one big form and you can't nest another form inside another this starts becoming a problem.

But I remembered a while ago I was watching how the guys over at MSN spaces did it with the "Blog this" functionality. So based on this I've made similar script and methodology so you can create "forms" that make POST or GET from within SharePoint's Pages. The script is not fully automated, since it directly works only in IE, but with minor additions specific to your form, you can get it working easily in other browsers also.

Read all about it over at my new blog

.

9/03/2008

Group items in a data view with the ability to nest items

In case you've missed it I've written a new article over at my new blog, which shows step-by-step process to group items. The difference between this method and the method the SharePoint Designer uses is - you can use nested elements (like nested lists, nested divs, etc.), which is fantastic for some navigation items, etc.)

See how to group items a bit differently over at my new blog

Oznake ponudnika Technorati: ,,,

8/26/2008

Test move of my blog + a new post on the new one

I've been trying to move for a while. Still while this service is great, I've decided to migrate my blog to another platform. (No, still not SharePoint - that comes next :)). But now you can find my blog (currently) on a new address:

http://boris.gomiunik.net

I've added lots of stuff to that blog - like the support pages for my ERTE project (which I'll be expanding), code highlighting (at least in some posts and for future posts), etc. And there is also wider space for my screenshots and code snippets.

You don't have to update the RSS, if you're subscribed to FeedBurner, If not, please update your subscribtion to http://feeds.feedburner.com/webborg.

If you check the new site, there is already an interesting post awaiting for you about a different way of sorting and grouping which enables nested items.

Hope this move will work, otherwise we'll meet back here on webBorg :)

8/14/2008

SharePoint Conference in Slovenia

B4Contact, the company where I work, is preparing an event that will take in my home town, Murska Sobota:



Display bigger map
 
Apart of knowing this beautiful part of our planet the event will open opportunities for cooperation between Microsoft partners from Slovenia and neighboring countries as Italy, Croatia, Hungary, Austria and other European countries.
 
It will be also a good opportunity to see which solutions are available for SharePoint!
 
I will have a presentation there, of course, but I will not tell you about it yet.

Here comes another nice part: If you think you could be a speaker, please let me know by adding a comment. I would love to get to know in person some of you!

More details will follow

7/30/2008

Deployment of ERTE

There were some questions about how to deploy the ERTE solution that I've prepared on Codeplex (for inserting embeddable content to SharePoint Enhanced Rich Text Field). So I've prepared a video on how to deploy it.
 


Oznake ponudnika Technorati: ,,,

7/24/2008

Couple of useful JavaScript global variables in SharePoint

If you're using custom JavaScripts with SharePoint some global JavaScript variables may come in handy.

These variables work if you're using SharePoint's default or any other custom master page.

L_Menu_BaseUrl - the base URL of the site / subsite. Very useful when you need to determine the absolute path of the site in JavaScript. Example: document.location = L_Menu_BaseUrl + 'lists/calendar/allitems.aspx' //redirects to Calendar list

L_Menu_LCID - the LCID of the site you're in. Useful if you need to determine the language of the site. The list of Locale IDs can be found here. I'm using the LCID for localizations in ERTE project. See the example of checking LCID below:

.
L_Menu_SiteTheme - the name of the theme applied to the site.

There is one more useful variable, but this one can't be used on custom master pages that you created. This one is used in the SharePoint's default pages:

_spUserId - the ID of the logged in user.

Oznake ponudnika Technorati: ,

7/23/2008

New Release of ERTE for SharePoint now supports localizations.

The new version is released. If you've downloaded the first release, just download the new one from CodePlex and replace the .js file in the /_catalogs/masterpage gallery in your site collection. The project is still under Beta, so if you find some bugs please let me know.


The new version now supports localizations. The current version is published with English (LCID 1033) and Slovene (LCID 1060) translations. If the script can't find localization for your language, it will use english by default.

To add your own localization, add under "//Localization arrays" the translated following line:

var erte1033 = new Array("Please inputtt details","Alt Text","This will be displayed in RSS feeds","Embed Code","Paste your Embed code here","Insert","Close"); //english

and change the LCID and language at the end. If you don't know the LCID of your SharePoint site, open it in Internet Explorer, in the address bar type javascript:alert(L_Menu_LCID) and press enter. The alert window will tell you the LCID. The final translated version (example for Slovene language) will look like this:

var erte1060 = new Array("Vnesite parametre","Besedilo","Besedilo bo izpisano v RSS-viru","Embed koda","Prilepite Embed kodo v polje","Vstavi","Zapri"); //slovene

If you've localized the texts, I'd be happy to add them to the new release, so we could have as full version as possible. Please publish the translation under comments on my CodePlex HomePage.

Oznake ponudnika Technorati: ,,,,,

7/11/2008

Just released: Enhanced Rich Text Field Extended

I was already writing and showing how to embed Flash animations in a SharePoint Blog or any Enhanced Rich Text Field.

Watching MIke Gannotti's video about what I was already presenting he had a good point, the solution is not so user-friendly.

So I changed the methodology a bit. Now the simple-to-deploy solution offers the following features:

1. Embed almost any HTML code snippet
2. Additional button in the Rich Text Toolbar to help you embed

3. A User Interface for pasting the code snippet

No server-side code is included. To see more and download the JavaScript please visit

http://www.codeplex.com/erte

The deployment instructions are on the homepage and in the release zip file.

Oznake ponudnika Technorati: ,,,,

6/27/2008

Where have I disappeared?

It's been a while since I was blogging here. I haven't disappeared from the face of the earth. I've made quite some progress and discoveries, so keep tuned in the future.

Mainly I've been working on some projects..

1. The Biggest one: SharePoint Simple CMS
Enables you to have a beautiful web design over your WSS site and really easy-to-edit contents of websites. Jose has already prepared some videos.

 

Thanks also to Mike Gannotti for a nice review.

2. The other - personal:
Even though he's small... he's quite a big project :)

In the SharePoint I've come up with quite some tricks, so stay tuned.

5/08/2008

Learn SilverLight on Lynda

A quickie: If you want to learn to create SilverLight applications, Lynda has published free video training for it. The whole course is available for free.

Click here to start learning.

Oznake ponudnika Technorati: ,,

4/15/2008

Screencast: Embedding Flash videos in SharePoint Blogs

I was already writing about the problem of SharePoint filtering out the embed code for Flash content and a workaround to this issue.
 

There were some questions in the comments and also maybe the instructions weren't quite clear, so I've made a screencast showing the entire process.
 

Sorry for the bad sound quality. I've had trouble with microphone, so thanks to Audacity I didn't need to record again. Below you can see the video screencast published on YouTube (Strange, MSN Video didn't want to process it). If you want to see the video in better quality (not sound) and with Table of Contents, click here (17 mb streaming flash, 9 minutes).
 

Oznake ponudnika Technorati: ,,,

4/11/2008

Edit your photos online

If you need a quick fix on one of your photos or images, and you don't want to install any additional software on your computer, you can use the online PhotoShop Express. Check Jose's review and links to the solution. It's free and it's very good.

But there is another online service for modifying your pictures that I believe is also very good: It's called Picnik. You can find it on www.picnik.com.

There are some really nice features:

1. You don't have to signup or register to upload and edit picture
2. Lots of basic tools like Auto fix, Rotate, Straighten, Crop, Resize, Fix exposure, Sharpen, Red-eye removal, ...
3. Lots of effects for your photos

4. You can put texts, shapes, frames on the images
5. You can edit curves and color levels (for premium version only)
6. lots and lots of other stuff
7. If you want to experiment with the tool, it has some sample images for you to try the tools
8. It can connect to Flickr, Picasa, FaceBook and other online photo services, or you just upload your photo

Below is a sample that I made in just a couple of minutes using auto fix, exposure fix, rotate-straighten, added shape, text, some radial effect and drop shadow border and resized image:


I recommend you to visit the site and try it yourself.

Oznake ponudnika Technorati: ,,,,

4/07/2008

The quick way to preload images

If you use background images for hover effects with CSS (for example links hover effects) in IE you don't get a nice effect, because the "mouseover" image is always loading, creating a "gap". So it's good to have the "mouseover" images preloaded. There are numerous of ways to preload images, but usually what I'm doing is loading those images in a hidden layer. For example: if you have a css:

a.menu { background: transparent url('menu_off.gif') no-repeat left top }
a.menu:hover { background-image: url('menu_on.gif') }

you'll want to have the images menu_off.gif and menu_on.gif preloaded. The way I'm doing it is by adding to the top of my webpage right after the <body> tag the following code

<div style="display:none; visibility:hidden; position:absolute; left: -3000px;">
  <img src="menu_off.gif"/>
  <img src="menu_on.gif"/>
</div>

This will put the two images loaded in a hidden layer and thus keeping them preloaded. And because this layer is right at the beginning of the page, you'll have the images preloaded first. 

Oznake ponudnika Technorati: ,,

4/04/2008

Add functions and events to SharePoint form fields

Do you sometimes wish to make some special form validation or other javascript actions on SharePoint form fields (like for example onchange, onfocus, onblur, etc?). You can add special functions on events to the SharePoint form fields using JavaScript. All you need to do is

1. Write your JavaScript function
2. Use the getField function I was writing about to refference the SharePoint Fiedl
3. write the following code:

getField('[field_type]','[field_title]').[event] = function() {[function_name]};

Let me demonstrate in an example below. I have a SharePoint List with a field "Menu" that is a lookup field to Title list "Menu". I've created another field "Menu_id" that is a lookup to the same list, but instead of Title it should select the ID. These two fields need to select the same item from the list Menu.

 

Now we'll prepare a one-way synchronization. We'll want those two fields synchronized when selecting the item from the "Menu" dropdown. So we'll add an "onchange" event to the "Menu" select field.

1. Add a Content Editor Web part to the page using this method

2. Edit the Source of the content editor web part add the script code, insert the getField function, write your function and use function above. The full code is below

<script type="text/javascript">
function getField(fieldType,fieldTitle) {
    var docTags = document.getElementsByTagName(fieldType);
    for (var i=0; i < docTags.length; i++) {
        if (docTags[i].title == fieldTitle) {
            return docTags[i]
        }
    }
}

function syncDropDowns() {
selectedId = getField('select','Menu').options[getField('select','Menu').selectedIndex].value;
for (i=0; i<getField('select','Menu_id').options.length; i++) {
  if(getField('select','Menu_id').options[i].value == selectedId) getField('select','Menu_id').options[i].selected='selected';
}
}

getField('select','Menu').onchange = function() {syncDropDowns()};

</script>

This is an example made with CEWP and in the SharePoint. The same works also in the Data View Webpart.

Oznake ponudnika Technorati: ,

3/17/2008

Reordering items in data view

A links list in SharePoint has an interesting functionality - to change the order of items.

I've tried and this functionality can be applied to all the lists and used in a data view. Let's go in order.

To reorder the list go to _layouts/reorder.aspx?list={list_guid} in the same site. If you don't know the list guid, go to list settings and replace listedit.aspx with reorder.aspx. You'll go to the interface to reorder items in that list:

 
The change will not be visible in SharePoint's AllItems.aspx page.
 

To sort items in the data view according to ordering you just made:

With data view inserted to the page the first thing we need to do is add the order field to the data view fields. To do this click the list name in the task pane Data Source Details
 

Next click button Fields, find and select Order in the left column and click Add.
 

Click OK to confirm the changes and close the Data Source Properties dialog by clicking OK again. Now you select data view Sorting (in Common Data View Tasks select Sort and Group) and you can choose Order. If you can't find Order in the dialog box, click the last option (Add Sort Expression) and click Add.
 

In the next dialog box, you can select Order from the fields.
 

Now confirm all the selections by clicking OK to close all dialog boxes.

That's not all. Now it's sorted according to order number, but the XSLT is taking this like a text. So we have to fix this. In source code, find <xsl:sort select="@Order" and add a data-type="number" parameter to it.
 

That's it. Now you have items sorted according to the ordering you've made.

What I usually like to add to the data view is a link to reorder items. Just add a footer and in the footer add a hyperlink to the reorder page (the one mentioned at the beginning).

Oznake ponudnika Technorati: ,,

3/11/2008

Are you a web designer? Want to get sponsored?

I'm happy to announce that in our company we're making effort to contribute to open source and design community. We're looking to sponsor web designs that will be free to use.

If you are interested, you can find more information on Web Designers Sharing Point.

There are already some members in the community, the latest one is Andreas Viklund.

As the result there are already two templates available free to download:

1.Internet Studio

Download - Check sample

2. Small Corporation
 
Download - Check sample

There will be more to come. If you wish to participate and get sponsored, please visit the blog and contact Jose.

Oznake ponudnika Technorati: ,,

3/08/2008

SharePoint site and multiple domains - alternate access mappings is the way

This is an update to one of my older posts - SharePoint 3 is bound to host headers - I was explaining the problem how the SharePoint binds itself to one host header and a simple trick to avoid this. There is a better way to add another host header to the web application:

On the Server in SharePoint 3.0 Central Administration select Operations tab and select Alternate Access Mappings under Global Configuration.
 

 
Now change the web application you want to edit public URLs for by using the dropdown on the right hand of the page
 

Next click Edit Public URLs
 

And now enter full URLs (including http:// or https://. You can add up to 5 URLs to which the web application will respond


 

At the end also add the host headers to the Website in the Internet Information Services manager.

Note that this works on the web application level. If you have site collections with custom URLs you can't configure multiple URLs for each of these (or if someone know the way, I'd appreciate if you left me a comment).

Oznake ponudnika Technorati: ,

3/05/2008

Great site with a lot of free tools

It's useless to talk and search out all the good free software, when this guy is making an amazing job. Almost daily you can find here new and useful freeware tools. I found it by coincidence, but it's absolutely worth linking to it.

Visit Freeware Genius

Don't miss also the site's featured article: Reinstall Windows and outfit your system with all Freeware programs.

Oznake ponudnika Technorati: ,

3/04/2008

Navigating through SharePoint Site using URL

I like to access lists, document libraries directly instead of visiting site or subsite and then clicking my way around. SharePoint has very logically structured URLs. Here are some of the most common:

To access: Type url http://[URL]+
Lists /lists/[List name]*
List New Item form [list URL] + NewForm.aspx
List item details (display) [list URL] + DispForm.aspx?ID=[item ID]
List item edit [list URL] + EditForm.aspx?ID=[item ID]
Document Libraries /[Document Library Name]*
Document library upload [DocLib url] + /Forms/Upload.aspx
Document library item details [DocLib url] + /Forms/DispForm.aspx?ID=[item ID]
Document library item edit properties [DocLib url] + /Forms/EditForm.aspx?ID=[item ID]
Special SharePoint pages http://[URL]+/_layouts+
View all site content viewlsts.aspx
Recycle Bin... recyclebin.aspx
Site Collection's recycle bin adminrecyclebin.aspx
Create create.aspx
Site Settings settings.aspx
New Subweb newsbweb.aspx

* in cases of Lists and document libraries only spaces get preserved (and translated in %20 in url). Special characters are excluded (for example: list Special Čheck url would be http://[sute url]/lists/Special%20heck/

These things are quite obvious. What I'm trying to point out is if you're accessing certain lists/document libraries/settings often, it's not a bad idea to start paying attention to URLs.
Oznake ponudnika Technorati:

3/03/2008

How SharePoint stores field names

In my one of my previous posts I've received a good comment from Mike that got me talking quite a lot about SharePoint List / Document Library Field Names. So it's better to dedicate a post to it. First I'll explain some exceptions and then show how to quickly get a sharepoint field name.

You can't change SharePoint field name

Once you create a field, you can't change the "SharePoint" name for it. Im using this sometimes when creating lists. I'll create a field called FirstName and then rename it to First Name. Like that I have no complications with spaces or any unstandard characters. So now (compared to previous post) I can filter with FilterField1=FirstName. 

 

Title field

No matter which list you create (except survey), there will always be one Title field no matter how we have it named. We can recognize this title field as the one that is linked to the item (with edit menu)

No matter what you rename this field to, this field will always be "SharePoint" named Title.

Field names for Out-of-the-box lists

Lists that are already included in the templates (like for example Contacts) have different "SharePoint" names than "Display" names. For example: In a Contacts list we can see a field called Fax Number, but "SharePoint" name for it is WorkFax. How to discover real names? Skip to the end of this post and read more.

Spaces and special characters in field names

Spaces in field names get converted to _x0020_. 0020 represents the Unicode character code. If you'd like to know any other, I've found this very good web character convertion tool. Just enter character into Characters field and you'll find the code in Hexadecimal code points but make it a 4 digit number (for example 20 for space should be 0020).

When using those special characters in URL, the underscore (_) gets converted to %5F

So how the heck to know SharePoint field names?

You COULD mess around with all the specialities and translations and conversions that I've mentioned untill now, but there's an easier way:(two actually):

1. Sort the List / Document Library and check in URL for SortField parameter value.
 


2. Go to List / Document Library Settings, click on the name of the column to modify it and in URL find the last parameter value
 

 

And ofcourse if you need to use the field name in other places than URL (like in SharePoint designer), don't forget to convert %5F to underscore.

P.S. - Yes, I know there is also a way to see SharePoint Field Names in SharePoint Designer (mouseover a field name in Data Source Details), but in this post I wanted to focus on work without it.

Oznake ponudnika Technorati: