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!

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: ,