3/11/2010
Do you have text links in different parts of your web page and want them to be a different color depending on the background? Here is an easy way to change them. Put the link(S) you want to change inside a DIV tag. For this example, we'll name our div top-links:
<div id="top-links"><a href="www.yoursite.com/default.aspx">Example Link One</a></div>
Then add the attributes for the 3 link states to your CSS file, link, hover (or rollover) and visited:
#top-links a:link, #top-links a:visited, #top-links a:hover {
color: #FFFFFF;
text-decoration: none;
}
If you want one of the states to be different, then pull it out and give it different attributes:
#top-links a:link, #top-links a:visited {
color: #FFFFFF;
text-decoration: none;
}
#top-links a:hover {
color: #000000;
text-decoration: underline;
}
This will change the links only inside the div and not affect the rest of the links on the page. 6/22/2009
I'm trying to edit my core.css file but I can't find it. What do I do? That's a very good question, let's take a look. When you first open your site in SharePoint Designer it looks something like this:
You can find the default.master page by opening the _catalogs folder, but the core.css file is nowhere to be found:
To get access to the core.css file you first need to open the default.master page. Once it is open, either in Split or Code view, Ctrl + Click on one the classes that is listed on the core.css file; ms-globalbreadcrumb is towards the top and easy to find so I usually use it.
When you Ctrl + Click (to follow the hyperlink) it will open the core.css file. From the core.css just hit Ctrl + S to save it. You will be prompted with a warning message:
Go ahead and click "Yes". Right now you're not actually customizing anything because you haven't made any changes. You're just changing the location of the core.css file to the site level instead of using the one on the server. Once you click save, you can see that a new folder, _styles, was created which contains the core.css file:
Remember, this file has not been altered yet, it's just been made ready for changes. It's always a good idea to go ahead and make a backup of this file so you always have the original code to fall back on.
6/19/2009
Start out with both web parts in SharePoint designer
Convert both to XSLT Data View. (Right Click on the web part)
Get rid of the extra items in each web part (Click on DataView Properties to remove the tool bar):
Uncheck SharePoint List Toolbar
Remove the Description field and the from the Right Web Part by Deleting the item in the cells:
becomes
Rearrange the cells in the Left Web Part:
Remove the hyperlink from the Title field in both web parts. Click on a title and the format menu appears:
 Choose Format as Text
To set up the web part connect, click on the arrow in top right of the Right Web Part and choose Web Part Connections. Choose Send Row of Data To and click Next
Connect to a Web Part on this page and click Next
Target Web Part – Left Web Part Target action – Get Filter Values (click Next)
Look for the Title field in the Right column, clink <none> in the corresponding column on the left and choose Title, then click Next
Choose Title in the Create a hyperlink on field (click Next)
Click Finished
You may need to change the styles on some of the cells to get the fonts looking how you want them.
6/5/2009
WSS / MOSS File Upload Size and Timeout Issue (Server 2008 & IIS 7)
http://donpistulka.spaces.live.com/blog/cns!1351C78C5D7326F4!1010.entry (I got this article from here but I always had to search for it. I thought it would be easier to find if I put it on my own blog).
If you need to increase the maximum file upload size on your SharePoint site the first place you'll probably check is Central Administration. There's a Maximum Upload Size setting right there. You're thinking, "Great. This is going to be easier than I thought." You bump it up to 100MB and you're ready to go.
The problem is that it doesn't seem to do anything. You still get an error whenever any file over 28MB's is uploaded even if you changed this setting in the web app settings all the way up to 2GB's. The security built into 2008 is at fault here. When you make the changes in the web app settings they do not get transferred to the web.config file automatically. So you must manually update the web.config file for all web apps needing this change and update the web.config file in the 12 hive as well. You have to increase the file size limit as well as the time out settings to accommodate for the larger file sizes.
In the 12 hive we need this change. This is the web.config file in the templates gallery.
Change the web.config file for all web apps that need the larger file size upload.
This will stop the time out problem.
Now for the file size:
On a Windows Server 2008 computer that has IIS 7.0-only installations, you add the maxAllowedContentLength value. When you are running Windows SharePoint Services on a Windows Server 2008-based computer that has IIS 7.0, you find that you cannot upload files that are larger than 28 MB even though you have configured the large file upload settings. Usually, the error that users see is "The page cannot be displayed." In some circumstances, users may also see an "HTTP 404" error.
To work around this problem, set in the Web.config file for the Web application to have following settings under the <configuration> section:
-
Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
-
Add the following settings under the <configuration> section of the Web.config file:
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="52428800"/> </requestFiltering> </security> </system.webServer>
Note maxAllowedContentLength="52428800" in bytes has to match the size of file that you are trying to upload. Also, when you set the number, increase it slightly beyond the maximum file upload size that you have configured in SharePoint. If the number is equal to or less, users will not receive the error message that they are exceeding the size limit if they try to upload a file size larger than that specified by the administrator.
Place the above code at the bottom just before the close out of the configuration section like this:
You should now be able to upload your larger files.
3/12/2009
Have you tried to limit the amount of text users can input in a SharePoint form? If you have, maybe you've found, as I have, that it's not quite as easy as I thought it would be. If you're in the browser and add a new column to your form, choose "Single line of text" and you have the "Maximum number of characters:" field available right there. Ok, easy enough. However, if you choose "Multiple lines of text" you no longer have the "Maximum number of characters:" field. So, what do I now? Good question. This is what I've done and feel free to let me know if there is a better way.
You'll have to create a custom form in our best friend, SharePoint Designer. (I'm not going to cover how to create a new custom form and link it to the list you want as I'm sure that's covered elsewhere). When you add your Multiple lines of text field to the page it gets formatted as a List Form Field
If you check the Tag Properties you'll notice there is no property for limiting the number of characters. No problem, we'll just change the format of this field to a Multiline Text Box
Now that it's formatted as a Multiline Text Box, the MaxLength property becomes available in the Tag Properties. Set the character limit and you're good to go, right?
Not so fast. If you check the form in the browser, you'll notice you can still input as many characters as you want – the MaxLength property has no effect. What's going on, why didn't that work? That's the same question I asked. This happens because the multiline text box is rendered in the browser as a "Text Area" which does not support the maximum length property. I know what you're thinking, "that would have been nice to know before I changed all 150 fields to Multiline text boxes," tell me about it.
Here's what I found that works. I didn't come up with it on my own, here's where I found it: http://community.workflowgen.com/kb/how-can-i-set-the-maximum-length-of-a-multi-line-text-box-in.html
How can I set the maximum length of a multi-line text box in a web form?
Restricting the length of text on a Multi line textbox is not supported by the standard ASP.NET Web control. This can be done by adding the following Javascript function in your ASPX page.
1. Add a javascript:
At the top of your ASPX page you will see the following tag </ head > . A dd the following code under this tag:
<script language="javascript" type="text/javascript">function Count(text,long) { var maxlength = new Number(long); // Change number to your max length. if (text.value.length > maxlength){ text.value = text.value.substring(0,maxlength); alert(" Only " + long + " characters"); } } </script>
2. Change your text controls on your ASPX page
On every multi-line text box where you would like to control the length, add the following code to the asp text box control. onKeyUp="Count(this,300)" onChange="Count(this,300)"
Your original text control before adding this code: <asp:TextBox ID="TESTDATA" runat="server" TextMode="MultiLine"></asp:TextBox>
After adding the code: <asp:TextBox ID="TextBox1" runat="server" onKeyUp="Count(this,300)" onChange="Count(this,300)" TextMode="MultiLine"></asp:TextBox>
I actually added the javascript to the masterpage, but it worked for me. Here's what happens:
That's what I'm talking about.
3/2/2009
Seeing as how it is the first of March (even though there was 6 inches of snow on the ground) I thought we'd discuss a little spring cleaning where SharePoint Designer is concerned. When you use SPD to open a lot of sites and sub-sites within those sites you can get quite a long list in the Web Sites area that SPD uses to store your active links.
Now, on most of these I still want to keep an active link to the root sites but I don't need to store a link to all 40 or 50 sub sites under the root level.
***Important - the whole key to this is to choose File / Open from your toolbar. If you choose File / Open Site like you normally do you won't have the option to select more than one site at a time. Choose File / Open and then select Web Sites.***
The easiest way to get rid of the extra links is to start just below the root level. Select the first one you want to remove, then hold down the Shift key and find the last sub-site in that same web site collection and click on it. Those 2 sites and everything in between should now be selected. Hot the Delete button and repeat these steps for each site collection.
Once you're finished you can then start in on the big piles of paper on your desk. Come on, you know you want to. 2/23/2009If you're using custom form pages for some of your lists, don't limit yourself to the default Save and Cancel button actions. Right click on a button and choose Form Actions… and you're now in the form actions control box for that button. Here you can add additional actions to your button or change or remove the current action. You have the option to navigate to another page after the button is clicked as well as create custom actions for that button. With custom form pages you can also create your own buttons and assign whatever actions you want with them as well. Custom form pages are easy to create and offer a lot of flexibility.
2/12/2009My Least Favorite SharePoint Function (at the moment)
Start with your basic SharePoint list; pick a list, any list will do. You say to yourself, "Self, I would like to be notified whenever anyone adds a new item to this list." Easy enough; you just go the Actions / Alert Me and setup an email alert.
But then you say to yourself, "This list may contain sensitive or personal information so we should probably set up permissions so that user can only see their own items and no one else's. Again, easy to do. Go to Settings / List Settings.
Then, under General Settings, choose Advanced settings
In the Item-level Permissions section change the Read access and Edit access options from "All items" to "Only their own"
Then you decide that you need to have another person receive an email notification when a new item is posted so you go back to the main list page and choose Actions / Alert Me. This is where the fun really begins because now you get an error:
You can't create alerts on the list if you set them to read only their own items. And the fun hasn't stopped yet because when you check on your alerts (which you can do through Site Actions / Site Settings / User alerts) you'll discover that the alert you set up before you changed the view settings of the list is no longer there. Nice.
I know I can open up SharePoint Designer and create a Workflow for the email notification, I just don't want to. 1/30/2009What, you don't like your We Part Headers? Never fear, you can change the background color of the header as well as the font, font size and font color relatively easily in the core.css file. (Of course, we'll be using Microsoft SharePoint Designer to do this, so be careful and make backup copies of your original files because it's pretty easy to "break" your web site and end up with errors on your pages.
Look for the .ms-WPHeader tags. You'll find the background color in .ms-WPHeader td. The font, font size and font color is found in .ms-WPHeader TD h3. Remember to check link settings as well: .ms-WPHeader TD h3 a:link, .ms-WPHeader TD h3 a:hover, .ms-WPHeader TD h3 a:visited for the rollover states of the heading links (those are easy to overlook). Remember to stick with the standard font families and always backup your original files. 1/24/2009
I copied this from someone but didn't save the link at the time. I know it makes me a bad person so if you happen to stumble across the original article let me know and I'll give credit to whom it is due.
Gotchas
- If you create sub sites, they have to be publishing sites to preserve this language ability. If you make a team sub site for instance it won't handle the variants for you.
- If you add new language labels later on, you have to create hierarchies again.
- If you add a new language variant, it doesn't seem to pick up the existing content, so you might have to "force" the update by modifying the source content again, even if it's just to update it with no changes - so if you are going to use variants plan ahead and try not to add language packs over time!
- If you update the source content, it seems to overwrite the target translations (although a version will be saved for them). This is a big GOTCHA!
- The use of publishing approval workflows is a very good idea because this kind of content translation usually requires some level of publishing oversight. However if you're testing variants in development it can involve a lot of clicking and approving, and sometimes it's easy to forget to approve content.
Publishing a page in the variation source overwrites all values in the other labels Risk When you first create a page in the variation, that page will need to get localized in the other variations. When that's done, however, any change in the source will completely overwrite the other label's version and you lose all the translation work. For a major change, that would need to be done anyway, but for a minor, it definitely wouldn't.
Proposed solutions
- Have versioning and content approval enabled.
- From the White paper: Plan for building multilingual solutions: add a field to the page content type to indicate the change is minor or major. Then add a custom workflow to the content type libraries to delete the draft version in the target variation label libraries if the change is minor.
|
|
|
|
|