Monday, October 27, 2008

Creating a small neat Sharepoint Calendar

The Sharepoint calendar in calender view sucks, it is way too big

Found a good solution here:
>

Basically drop a calendar control into web zone, add a contend editor control with it and add this to it :







Wednesday, October 15, 2008

Get the links webpart to open in a new window

Tried to use the links web part as it was on my intranet, turns out does not by default open up in a new window!

Found an easy solution rather than some suggestions to modify schemas and the like (yuck!)





1. Open the site in sharepoint designer.
2. Select the Links webpart and convert it into XSLT Data View
3. Then, select any one of the link in Links webpart and right click you will find Hyperlinks Properties option, Click on that
4. It will open Edit Hyperlink dialogue. Click on the Target Frame button which is located right side of the dialogue box.
5. Here, now it opens one more dialogue box naming Target Frame. Select the New Window option from common tragets list and click OK.

Friday, October 3, 2008

Getting google search box on your sharepoint site

Found an easy way to get the google search box on the home page of my site
http://www.heathersolomon.com/blog/archive/2005/07/18/1023.aspx

I followed the directions but made a few slip ups, my path is different (I'm using WSS not MOSS i guess). This is how I got it working for me :

Steps:

1. Create the directory and call it external in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
2. Create a text file called google.html in this external directory and put the following code in it

The following code was placed in blogger by this great utility
http://francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html




<center>
<FORM method=GET action="http://www.google.com/search"
target="_blank">
<A HREF="http://www.google.com/" target="_blank">
<IMG SRC="http://www.google.com/logos/Logo_25wht.gif" border="0"
align="middle"></A><br>
<INPUT TYPE=text name=q size=17 maxlength=225 value=""><br>
<INPUT type=submit name=btnG VALUE="Search" style="font-
size:5px font-family:Verdana"><br>

<select name="sitesearch" style="font-
size:5px font-family:Verdana" >
<option value=""></option>
<option value="www.test.com">test</option>
</select>
</FORM>
</center>



3. On your home page drop in a Page Viewer web part and set it to point at a web page and
put the link as /sites/Portal/_layouts/external.html or whatever your equivalent is.
I intially put in my full path htt://servername/sites/portal/_layouts/external.html and it changed it to a relative path itself which is much preferable.

4. To alter the size of the google box mess around with the google.html file input box size and the height and width of the web part itself , ideally we do not want scroll bars either side. Also set it so there is no title on the web part.

Customising the look and feel....this site



has a good overview for changing look and feel of the google box

Thursday, October 2, 2008

Random Thumbnails from picture library for intranet front page

MOSS comes with "This week in pictures", WSS alas does not.

I came across this free bit of code for implementing random or sorted thumbnails for my WSS 3.0 intranets front page.

http://www.codeproject.com/KB/sharepoint/WssPictureThumbnails.aspx

Download the web part http://www.codeproject.com/KB/sharepoint/WssPictureThumbnails/WssPictureThumbnails.zip

unzip it

stsadm -o addsolution -filename QuesttechSolution.wsp

Go SharePoint Central Administration/Operations/Global Configuration-Solution Management and deploy the solution to selected web applications. In the site collection where the solution is deployed, activate the Site Collection feature "Questech Systems Web Parts". After that, the Picture Thumbnails web part (listed under Questech Systems) should be available for you to add to pages.


To get it working I needed to add the three javascripts in the package in my front page , litebox-1.0.js, moo.fx.js and prototype.js (put them in seperate tages and put the contents of the two css files in with header of the masterpage for the site(looking at the article and my experience just putting the contents in core.css did not work? , think they should be put in a custom.css file later)

*** IMPORTANT: Make sure blank.gif, closelabel.gif, loading.gif, nextlabel.gif, prevlabel.gif are copied to /images for the website


***IMPORTANT, PUT CSS CLASS TO PT IN THE CSS CLASS BOX IN THE WEB PART ***


***Important: to get the thumbnails bigger look at what you are using in the picture library, e.g by default thumbnails are 160 w 160 h, if use change the CSS for PT from 80w 80 h there will be none of the thumbnail clipped off! Of course if u change value of thumbnails coming in then need to change below to match!

.PT li a{ width:160px; height:160px; border:solid 1px #fff; display:block; text-indent:-5000px; font:0/0 Arial;}

Monday, September 29, 2008

Sharepoint Designer 'Error reading file' on opening default.apsx file

Opened default.aspx to edit it and got 'error reading file', could only open in text mode or notepad.
Did some reseach on google and found this ..

http://msdevelopers.blogspot.com/2007/04/error-reading-file-with-sharepoint.html.

I look in the file and was a massive blank area between the two sections of code, 70,000 lines.
Solution I found was to cut the bottom bit of code and paste so all the code is together, just highlight and cut the combined code and past it into a newly created aspx file. Rename old file and name new file default.apsx.

Also did this
BACKUP LOG SharePoint_Config WITH TRUNCATE_ONLY
USE SharePoint_ConfigGODBCC SHRINKFILE (SharePoint_Config_Log, EMPTYFILE)GO

afterwards as might have been contributing to the problem.

Thursday, September 18, 2008

Customising the Announcments Web

A pain with the standard announcments web part is that you cannot just click on the title and go straight to the attachement or web page that you need.

Solution

Create a new column called 'Link' , make this a hyperlink
This has two columns to edit for each item , the address itself either http: , ftp etc and the text description. You can leave the text description blank.
If you are using an attachement , upload it then in edit view right click the mouse and copy shortcut and paste the path in the hyperlink column for Link.
If you are linking to an internal or external web page just paste the link.

Amend the title field
Click on the title field in the announcments web part, edit hyperlink and replace in the address
mailto:%7BURL_Display?ID={@ID} with this {substring-before(@WebPageLink, ', ')} - leave the text description of the hyperlink as @Title.

You will now find you can click on title and it will take you straight to eithe the attachement or web page AND you can still click down and view or edit item !

*** Note you cannot store a relative URL in a list item column , has to be fully qualified **** a pain if you move servers since you will need to edit all the links in the announcments list ****

Friday, September 5, 2008

WSS Alter thumbnail size in picture gallery with Sharepoint Manager 2007 and Change background Color of thumbnail and border

The default size for thumbnails picture libraries is contained in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PictureLibrary\PicLib\schema.xlm.

Find ThumbnailSize="160" WebImageWidth="480" WebImageHeight="640
and change it here. This will be used for any NEW picture library you have created.

For an exisiting picture library you have already created download Sharepoint 2007 Manager, a good tool for looking at the inards of Sharepoint WSS or MOSS 2007.

Open it up aqnd go to your site collection, lists and find say Marketing Picture Library (or whatever you called your library). There is a thumbnail property of 120 , I set it to 80.
You can change WebImageHeight and WebImageWidth for resizing the WebPreview if you want.

Go file Save Change to Sharepoint

Refresh your picture library and it is now resized!

Change Background Color of the thumbnail
The dark grey is a bit too much , you can change it via CSS (a whole other story)
*** Note CSS for the site should have its own custom css file as upgrades can wreck changes ****
There are two items that need tweaking:

img.thumbnail
Color behind thumbnail in the Picture Preview area of the left navigation area in a picture library.
.
.ms-imglibthumbnail
Background for thumbnails in Thumbnails view. Border color should be the same as for img.thumbnail style above. Ensure has border that is solid, 1px and #E7E3E7

Edit these in core.css in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\STYLES

img.thumbnail{border:solid #E7E3E7 3px;}tr.ms-imglibselectedrow,tr.ms-highlight{background-color:#f2f2f2;}
.ms-imglibthumbnail{background-color:#F7F7F7;border:solid #E7E3E7 1px;}