Decrease Font Size
Increase Font Size
   BLOG

SharePoint 2010 Missing Generate File Plan Report Link

by bryian 6. May 2012 08:56

Recently I created a SharePoint Site Collection using Publishing Site template. I noticed that the Generate file plan report link was missing from the Document Library Setting under Permission and Management menu. I found a lot of article describing the Generate File Plan Report feature in SharePoint 2010 but hardly find any article explains how to enable it. I guess that link is not included in the template for a reason. Anyway, here are the steps to restore that link.

1.    Log in to the Site as a Site Collection Administrator
2.    Go to Site Actions, Site Setting, select the Site collection features under the Site Collection Administration
Figure 1

SharePoint 2o1o Site Collection Features

3.    Look for Reporting and hit on the Activate button next to it.

Figure 2

SharePoint 2010 enable reporting features


4.    Navigate back to Library Setting and the Generate file plan report link should be there

If you have a better suggestion, please share it.

Tags: ,

CodeProject | SharePoint

Turn Affiliate RSS feeds into website using Drupal

by bryian 1. May 2012 15:43

Introduction

This article provide tutorial on how to turn affiliate RSS feeds into a website with little or no PHP programming experience using Drupal. With Drupal, you can specify the update interval for each feed, group the feeds and use view to manipulate the feeds out of the box. Check out the demo here.

Table 1 (mouse hover to see larger image)

Demo home books menu
books mega menu software mega menu

Getting Started

I assume that Drupal is installed on your hosting account. The theme that I’m using is Marinelli, you can use any other theme. Make sure you have Views and Chaos tools module install/enable and Aggregator module enable. Go to Modules, enable Aggregator and hit the save configuration button to enable Aggregator module. Here are the steps.

1.    RSS affiliate feed

Subscribe to RSS feed from Amazon, eBay, link share, etc…

2.   Setup Feed Aggregator

In Drupal, go to Configuration, Feed aggregator, click on Setting and include <div> and <img> tag into Allowed HTML tags list. This will allow the image to display in the content feed. After that, click on List and then Add Feed. Fill up the title, RSS Feed URL, Update Interval and save. Repeat the same step for all the feeds and group them by category if necessary.

3.   Create View

Go to Structure, View, Add New View. I noticed that the Drupal search module does not work well with view in Block and Page. But there is a Search by Page plug-in we can use to index the page. After filled up all the information, click on continue, refer to Figure 1.

Figure 1

Create View

On the Fields section, click on add and select “Aggregator: Title” and “Aggregator: Body”, click Apply and unchecked the Create a label and hit the Apply button. Then click on the dropdrown icon next to add, select rearrange, delete the field that you don't need and arrange the field accordingly. On the Filter Criteria section, click on add and choose “Aggregator feed: Feed ID “. Then hit Apply, select “Operator is equal to” and in the value box insert any of the Feed ID created in step 2. You can add sort criteria to sort the result by Feed ID, Aggregator title, Timestamp, Random, and etc…

Figure 2

view setting

Hit on the save button and navigate to the page to review the result. You should see something similar to figure 3.

Figure 3

result 1

Now, let decorate it a little bit. Go back to the View, expand the advanced panel, and click on theme information under other. Notice that the selected template is “views-view-fields.tpl.php” instead of “views-view-fields—view-electronic—page.tpl.php”. Usually I will modify the later template to customize a single view.

Figure 4

view row style

Since we will reuse the same template again, I will go ahead and replace the “views-view-fields.tpl.php” template with the code in listing 1. The title and description field in the code below is corresponding to the fields we selected earlier, refer to figure 2. For simplification sake, I wrap the title and body in the div tag. Depending on your requirements, you can exercise your creativity here.

Listing 1

<div class="custom_view_title">
  <?php print $fields["title"]->content; ?>
</div>
<div class="custom_view_content">
  <?php print $fields["description"]->content; ?>
</div>

Next, let create the style for the “custom_view_title” and “custom_view_content”class. In this tutorial, we will put all the styles in a separate file. If your theme is not inside the themes folder, look under Sites>all>themes. Create a new file with the name custom.css with the styles in listing 2 and upload it to the theme, css folder.

Listing 2

.custom_view_title { 
	background-color:#000; 
	opacity:.7;  
	filter: alpha(opacity = 70);
	border-left:1px solid #828282; 
	border-right:1px solid #828282;
	border-bottom:1px solid #828282; 
	padding: 2px; 
}
.custom_view_content { 
	min-height:180px; 
	border-left:1px solid #828282; 
	border-right:1px solid #828282;
	border-bottom:1px solid #828282; 
	padding:2px; 
}
.custom_view_content img { 
	float:left; 
	padding: 2px;
}

Open your theme .info file. If your theme is bartik, then the file name should be bartik.info. Add stylesheets[all][] = css/custom.css on top of stylesheets[all][] = css/layout.css line. Go to Configuration, Performance, Clear all caches and navigate to the page to review the result again.

Figure 5

view with style

4.    Create More Views

Go to Structure, View and find the view created earlier, under operations select clone. Give the view a new name, modify the title and provide a different Feed ID under filter criteria. On the page settings, modify the path and hit the save button. Repeat this step if necessary.

Figure 6

more view

We also can filter by group and then Feed ID, take a look at figure 7.

Figure 7

group by

5.    Create Menu

The next step is to decorate the menu. If the menu from the theme is not fancy enough, you can always try other plug-in such as superfish. I’m not going to cover the menu here and you can find lots of good resources on Google.

Conclusion

I hope someone will find this post useful. Please drop me a line if you have any questions.

Demo

SharePoint 2007 Sort Post in Discussion Board

by bryian 22. April 2012 04:03

In SharePoint 2010 Discussion Board, sorting the created date in descending order will yield the result shown in figure 1. It will automatically pin the first post on the top and order the rest of the posts in descending order.

Figure 1

SharePoint 2010 discussion board view

On the other hand, SharePoint 2007 will yield the result similar to figure 2. It will place the most recent post on the top and the initial post at the bottom of the list. So, how can we achieve the result similar to SharePoint 2010? I saw a post suggesting creating a new column, in the view, sort by the new column and then the created date. I think that a brilliant idea but the problem with that approach is that the new column will appears in the form. The extra input field in the form might confuse the users when they trying to submit/edit a new discussion or reply to a post.

Figure 2

SharePoint 2007 discussion board view

Another approach is to use jQuery to rearrange the row in the list. Shown below is the script that I use to manipulate the list. Add a Content Editor Web Part on to the page and place the script in listing 1 using the source editor. Here is a brief explanation on how the script works. The JavaScript will access the element by class name to get the number of rows in the list and then move the last two rows on top of the list. You can download the jquery-latest.js JavaScript file and upload to library or list in your SharePoint Site. Then modify the src attribute to point to the location of the JavaScript.

Listing 1

<script src="http://code.jquery.com/jquery-latest.js"></script>

 <script type="text/javascript">
     $(document).ready(function () {
//get the number of rows.
         var rowCount = parseInt($("table .ms-disc > tbody > tr").length);
         //rowCount - 2 -- body  //rowCount - 3 -- header
         var $lastRowHeader = $("table .ms-disc > tbody > tr:eq(" + (rowCount - 3) + ")");
         var $lastRowBody = $("table .ms-disc > tbody > tr:eq(" + (rowCount - 2) + ")");
         //remove
         $("table .ms-disc > tbody > tr:eq(" + (rowCount - 2) + ")").remove();
         $("table .ms-disc > tbody > tr:eq(" + (rowCount - 3) + ")").remove();
         //append
         $("table .ms-disc > tbody > tr:eq(1)").before("<tr>" + $lastRowHeader.html() + "</tr>");
         $("table .ms-disc > tbody > tr:eq(2)").before("<tr>" + $lastRowBody.html() + "</tr>");
     })
</script>

Here how the view will look like using the JavaScript. Please keep in mind that this script only works with flat view.

Figure 3

SharePoint 2007 discussion board view using script

SharePoint 2010 managed accounts object reference not set to an instance of an object

by bryian 16. April 2012 14:52

I was going through the server Event log the other day and noticed the following error.

The Execute method of job definition Microsoft.SharePoint.Administration.SPPasswordManagementJobDefinition (ID 2c784c63-26c9-4e2c-8dbf-f347222ed56b) threw an exception. More information is included below.
Object reference not set to an instance of an object.

Then I went to SharePoint Central Administration, Security, Configure Managed accounts and the page displayed “Object reference not set to an instance of an object” error message.

Figure 1

managed account error

Some users suggested to remove and recreate the manage account using PowerShell command Remove-SPManagedAccount. That doable, but I found a better solution that does not require to recreate the managed account here. First, I ran the PowerShell command Get-SPManagedAccount to find out the account that caused the problem. Then I used the PowerShell command from here to remedy the problem.

Figure 2

sp managed account

Learn more about service and managed service Accounts from here.

Tags:

Error | SharePoint