Enlarging images with CSS

Instead of calling a javascript, I’ve created a quick example script that uses CSS. 

Here’s the code I’ve added to the content editor web part (through the source editor):

//CSS to enlarge image on mouseover

<style type="text/css">

.enlargeleft:hover {float: left;}
a.enlargeleft:hover img {height: 120px;}
.enlarge:hover {}
a.enlarge:hover img {height: 120px;}

</style>

// hyperlink to example image calling the CSS class

<a href="#" class="enlargeleft">
<IMG height=65 hspace=6 src="<URL TO IMAGE>" align=left vspace=1 border=0>
</a>

This works by calling the class enlargeleft and should easily be scalable to any number of images within a page.

I’ve set the thumbnail image with a height of 65 pixels, and through the CSS the settings for the height are increased to 120 pixel.  You can obviously customise these to suit any given image.

Also, by adding "#" in the blank hyperlink, there is no waiting for the page to reload, just in case somebody accidentally clicks the image.  Naturally this can be replaced by a regular hyperlink if required.

<style type="text/css">

.growleft:hover {float: left;}
a.growleft:hover img {height: 120px;}
.grow:hover {}
a.grow:hover img {height: 120px;}

</style>

<a href="#" class="growleft">
<IMG height=65 hspace=6 src="<URL TO IMAGE>" align=left vspace=1 border=0>
</a>

How to extract embedded Media files From Office Documents by Changing the Extension

 

Have you ever needed to get at one or more images out of a Microsoft Word .DOC or .DOCX file? You’ll need Word 2007 or later—or another .DOCX compatible program.  If it’s a .DOC file, open it in Word and save as a .DOCX file.

I couldn’t believe this little tip, but it certainly worked for me…. Make a duplicate of the file and rename the extension from .DOCX to .ZIP. Open the zip archive and you should see several folders. You’re looking for the ‘media’ folder which in this should be under the ‘word’ folder.  There are your files readily available to export and user elsewhere.

According to some internet bloggers, this trick will also work for other MS Office file types, but i’ve not tried it myself.

SharePoint Content Deployment – Draft versions of content appearing in live

A user logged an issue with me today where they believed a draft version of a page was available on our live sharepoint publishing portal site, despite the page not being published.

While the user could access the page I could not and the page did not appear in the navigation even for the user.

I ran a couple of tests and have deduced that the creator of a page retains owner permissions to that page when it is deployed to live.

This means that they can view the page in live even when not the page has not been approved. However, SharePoint is correctly removing the page from the navigation as it is only draft.

Something to be aware of.

How to build a team approvals calendar with workflow in SharePoint

Calendar Event / Leave Request Approval Process

I’ve created a custom workflow that will enable managers from any number of teams to approve calendar events and most importantly holiday leave requests within a group of teams within a specific department.

Regular events have been set to be automatically approved, whereas leave requests will get distributed to the relevant line manager for approval.

Team members will be able to choose their request type (Event / Leave) and select which team they represent. The workflow will then trigger an email containing 3 step actions for the manager to follow.

Once the manager has approved or rejected the request, a reply is transmitted to the creator of the request with notification of the result.

How to create a content approval lookalike workflow using SharePoint Designer

Before we open up SharePoint Designer 2007, we need to create a ‘Task’ list and a ‘Team Site Calendar’ list within our SharePoint collaboration environment.

Team Site Calendar List Configuration

· Extend standard calendar list to include team choice, request status and request type columns

· Hide the ‘Request Status’ from forms view, we don’

· Build workflow for site to facilitate content approval based on differing options

Workflow Setup

· Open up SharePoint Designer 2007 and load the site where we can find the ‘Team Site Calendar’ (File > Open Site)

· Once the site is open, add a new Workflow by click File > New > Workflow and run through the Wizard.

· Provide a name for your workflow and set it to automatically start when new items are created and existing ones change.

STEP 1 – SUBMIT REQUEST TO MANAGER FOR APPROVAL

clip_image002

CONDITIONS

This workflow will handle multiple teams and multiple types of request. In the conditions for each team you wish to add into the workflow, set a condition of:

· If Team equals ‘Teamname’ and Request Type equals ‘Leave Request’

ACTIONS

· Now click on Actions and select ‘Collect Data from a User’

· You will now need to provide three things to the workflow.

o The data that needs to be collected

o The user that needs to provide the response, in this case the line manager

o A variable to collect

DATA

· First click on the data link and a new wizard will pop up:

clip_image004

clip_image006

We need to collect 2 things from the approving line manager:

  • Can the employee go on holiday or not?
  • Any extra comments

For each team required, click on the add button to add these two questions on the page:

clip_image008

First question is the status where we are going to use a choice field so that the manager can choose between Approve or Reject:

clip_image010

clip_image012

Click Finish and add another field to make it possible for the manager to add some comments:

clip_image014

clip_image016

Once you’ve added these two fields click on the Finish button to complete the data part of the action.

USER

The next step we need to do is identify who the line manager is so a task can be assigned to that person. Click ‘this user’ and select the relevant person from your corporate directory:

clip_image018

Variable to collect:

What we’ve actually done is, we’ve created a task for the human resource manager (me) to approve or reject the holiday.

Because we want to use the outcome of this task we need to save the ID of the task that we’ve created. This is is the variable that we want to collect.

We are going to store the ID of the task in a new variable which we call HolidayRequestTaskID:

Once we’ve completed the first action we need to save the response from the line manage. This means capturing and change in request status and any comments made by the line manager.

To save these responses we need to create 2 variables and store the responses in these variables.

Find the Action ‘Set Workflow variable’. If you don’t find it click on ‘More Actions…’.

clip_image020

clip_image022

Set Variable: Holiday Approved Comments

clip_image024

STEP 2 – SUBMIT RESPONSE TO REQUESTOR

Use the following workflow:

clip_image026