Wednesday, July 21, 2010
SP2010 Powershell Access Denied
If your using power shell to do anything (in my case upgrade user experience) and you get access denied even though you’re an administrator in as many places as you can think of. Add your account to shell admin using add-spshelladmin.
Thursday, March 20, 2008
I need to webpart
You may have noticed that you cant have 2 working "i need to webparts" on the same page. In order to solve this problem i edited the xslt and modified the javascript function name that was called to my own custom function name. I then added my own function to the master page to handle multiple webparts. If storing in the masterpage is not an option you could make a new/edit a js file in the 12 hive or add the script inline in the xslt.(however the script will be printed for every webpart that appears on the page. This does not cause an issue as the browser will use the last function defined). In order to make the changes quickly to all the webparts and to have more control in the future i stored the xslt in a top level document library then added the url to the xsl link property in the webparts i wanted to use this new script. i also exported and saved the new "i need to webpart"(with xsl link) to the webpart gallery for reuse later on.
Picture library with thumbnail fails to covert to xslt data view
Today i had an issue hen i tried to convert a picture library view to an xslt view to add some custom actions. As soon as i converted the webpart i received an error: "Invalid XSLT stylesheet Error: invalid character". Once i opened the xslt i found that the thumbnail template had not been exported correctly and had malformed xml. Inorder to resolve the issue i simply replaced the thumbnail template with the following....
Friday, February 15, 2008
Conditional Format Javascript MOSS
I have been able to test the javascript from an earlier post in MOSS and am happy to tell you it still works. I was able to use it to simulate traffic light kpi in a list. depending on the field value I loaded different images from the images folder.
Monday, June 25, 2007
IE Hangs when opening Address Book from sharepoint
This is only an issue if you are using dual displays. The problem is: if you open your address book from the second monitor IE stops responding and you are not prompted to allow IE access to your address book. The simpile solution is move your browser window on to your main display and reopen the address book. Problem solved. Issue occured using Office 2003 with IE 6 or 7. havent tested with office 2007 yet.
Tuesday, May 1, 2007
APAC Sharepoint Conference
I am now officially booked in for the Conference http://www.microsoftsharepoint.com see you there.
Tuesday, April 24, 2007
Conditional Formatting on a Sharepoint List View
When using the sharepoint list view there is no way to have conditional formatting unless you convert it to a XSLT view within frontpage. Unfortunately when you do this you loose some features which you had eg. count. There are some issues with the filter functionality in the xslt web part. I have written some javascript which allows you to do conditional formatting on the client side. Just add it to a content editor web part after the view.
I will paste the javascript here shortly
As Promised
The script relies on the fact that the list view web part always outputs its html table in the same predictable format. You may need to make some changes to suit your application
I will paste the javascript here shortly
As Promised
<script>
/*******************
Copyright (c) 2007 Tim Leyden
This script can be used freely as long as all
copyright messages are intact.
********************************/
function format(textconfieldname, textcondition,formatfieldname,openformattag,closeformattag,tableid,islookupfield){
var cfindex; //the cell index of condition field
var ffindex; // the cell index of format field
var array = document.getElementsByTagName('th');
for (i=0;i<array.length;i++){
if(array[i].innerText != null){
//alert(array[i].cellIndex +" "+ array[i].innerText.substr(array[i].innerText.length-textconfieldname.length,textconfieldname.length));
if(array[i].innerText.substr(array[i].innerText.length-textconfieldname.length,textconfieldname.length) == textconfieldname){
cfindex = array[i].cellIndex;
}
if (array[i].innerText.substr(array[i].innerText.length-formatfieldname.length,formatfieldname.length) == formatfieldname){
ffindex = array[i].cellIndex;
}
}
}
var table = document.getElementById(tableid);
var rows = table.rows;
for (i=0;i<rows.length;i++){
var cells = rows[i].cells;
if (cells[cfindex]!=null){
if (cells[cfindex].innerHTML == textcondition){
var name = cells[ffindex].innerHTML;
if(islookupfield){
name = name.replace (/self>(.*)(<\/A>)/,"self>"+openformattag+"$1"+closeformattag+"</a>");
cells[ffindex].innerHTML = name;
}else{
cells[ffindex].innerHTML = openformattag+name+closeformattag;
}
}
}
}
}
/*
example
params "field to check","value",field to format,"before tag","after tag","Html table id(this stays the same unless you change views","bool is it a lookupfield"
format("VIP","Yes","Phone Number","","","{BEEFD7E9- HTML TABLE ID(use view source to retrieve)-F03FDA1BA528}",false);
this will format the phone number as bold for all people who have the VIP field set to yes
*/
</script>
The script relies on the fact that the list view web part always outputs its html table in the same predictable format. You may need to make some changes to suit your application
Subscribe to:
Posts (Atom)