- Copy and rename the existing theme.
- Rename the info file of the theme with the given name of the copied folder.
- Open the .inf file and replace the titles.
- Customize colors, fonts and so on in the style sheets of the theme.
- Add your own images to the theme.
- Create a thumbnail and copy it to the 12\TEMPLATE\Images folder.
- Add theme definition in the SPTHEMES.xml in the 12\TEMPLATE\Layouts\
folder.
Monday, July 27, 2009
Creating a Sharepoint Theme
Labels:
Creating a Sharepoint Theme
SharePoint List Template Id’s
When creating SharePoint 2007 receivers, the ListTemplateId attribute is associated with a “value” that is an optional unique identifier for the target template for which the receiver is being built. The value of templates are as shown below.
| Value | Description |
| 1200 | Administrator tasks list |
| 104 | Announcements list |
| 303 | Blog Categories list |
| 302 | Blog Comments list |
| 301 | Blog Posts list |
| 105 | Contacts list |
| 120 | Custom grid for a list |
| 118 | Custom Workflow Process |
| 130 | Data Connection library |
| 110 | Data sources |
| 108 | Discussion board |
| 101 | Document libraryaEvents list |
| 150 | Gantt Tasks list |
| 100 | Generic list |
| 1100 | Issue tracking |
| 103 | Links list |
| 114 | List template gallery |
| 116 | Master pages gallery |
| 201 | Meeting Agenda list |
| 202 | Meeting Attendees list |
| 204 | Meeting Decisions list |
| 207 | Meeting Objectives list |
| 200 | Meeting Series list |
| 210 | Meeting text box |
| 211 | Meeting Things To Bring list |
| 212 | Meeting Workspace Pages list |
| 117 | No-Code Workflows |
| 2002 | Personal document library |
| 109 | Picture library |
| 300 | Portal Sites list |
| 2003 | Private document library |
| 111 | Site template gallery |
| 102 | Survey |
| 107 | Tasks list |
| 112 | User Information list |
| 113 | Web Part gallery |
| 119 | Wiki Page library |
| 140 | Workflow History |
| 115 | XML Form library |
Labels:
SharePoint List Template Id’s
Friday, July 24, 2009
Introducing Master Pages in Sharepoint
* Central file controlling the layout and design of the content pages in a sharepoint site
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPWeb site = Properties.Feature.Parent as SPWeb;
Site.Properties["OriginalMasterPage"] = site.MasterUrl;
site.Properties.Update();
site.MasterUrl="/_catalogs/masterpage/Litware.master";
site.Update();
}
CSSLink control loads core.css file
Override Styles
with an Explicit embedded <style> element
programitically setting the AlternateCSSUrl property of the SPWeb
Public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPWeb site = properties.Feature.parent as SPWeb;
site.AlternateCSSUrl="/_layouts/LitwareCSS/LitwareCore.css";
site.Update();
}
- Title, logo and description of the site
- Navigation controls
- Welcome and Administration
- Search experience
- Linking cascading style sheet(CSS) files and script files
- Web part Manager
- Contentplaceholders for sharepoint products and technologies
Setting Master pages programatically
- Execute code to switch to new provisioned Master page
- Feature Receiver
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPWeb site = Properties.Feature.Parent as SPWeb;
Site.Properties["OriginalMasterPage"] = site.MasterUrl;
site.Properties.Update();
site.MasterUrl="/_catalogs/masterpage/Litware.master";
site.Update();
}
CSS Files
Public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPWeb site = properties.Feature.parent as SPWeb;
site.AlternateCSSUrl="/_layouts/LitwareCSS/LitwareCore.css";
site.Update();
}
Thursday, July 23, 2009
Singleton Pattern
Using System;
Using System.Text;
Namespace Singletonproject
Class Singleton
{
Private Datetime CreatedDateTime;
Private Singleton
{
CreatedDateTime = System.DateTime.Now;
}
Private static Singleton instancia = null;
Private Object Padlock = new object();
Public Singleton Instancia
{
get{
if(instancia==null)
instancia= new Singleton();
return instancia;
}
}
Public string GetDateTime
{
return CreatedDateTime.Tostring();
}
Calling procedure
Singletonproject.Singleton clsc= Singletonproject.Singleton.Instancia;
Label1.text = clsc.GetDateTime.Tostring();
Using System.Text;
Namespace Singletonproject
Class Singleton
{
Private Datetime CreatedDateTime;
Private Singleton
{
CreatedDateTime = System.DateTime.Now;
}
Private static Singleton instancia = null;
Private Object Padlock = new object();
Public Singleton Instancia
{
get{
if(instancia==null)
instancia= new Singleton();
return instancia;
}
}
Public string GetDateTime
{
return CreatedDateTime.Tostring();
}
Calling procedure
Singletonproject.Singleton clsc= Singletonproject.Singleton.Instancia;
Label1.text = clsc.GetDateTime.Tostring();
Labels:
Singleton Pattern
Finding the Id (Guid) for a SharePoint List
* Navigate to the SharePoint list using the browser.
* Select the Settings + List Settings menu command.
Copy the Url from the browser address bar into Notepad. It will look something like: http://moss2007/ProjectX/_layouts/listedit.aspx?List=%7B26534EF9%2DAB3A%2D46E0%2DAE56%2DEFF168BE562F%7D
Delete everying before and including “List=”.
Change “%7B” to “{”
Change all “%2D” to “-“
Chnage “%7D” to “}”
You are now left with the Id:
{26534EF9-AB3A-46E0-AE56-EFF168BE562F}
* Select the Settings + List Settings menu command.
Copy the Url from the browser address bar into Notepad. It will look something like: http://moss2007/ProjectX/_layouts/listedit.aspx?List=%7B26534EF9%2DAB3A%2D46E0%2DAE56%2DEFF168BE562F%7D
Delete everying before and including “List=”.
Change “%7B” to “{”
Change all “%2D” to “-“
Chnage “%7D” to “}”
You are now left with the Id:
{26534EF9-AB3A-46E0-AE56-EFF168BE562F}
Thursday, July 16, 2009
LINQ
C# 3.0 includes many strong new features, but one of the most interesting is the inclusion of its new query keywords, that you use to create Query Expressions. Query Expressions are most commonly associated with Language Integrated Query (LINQ). They're the core syntax that you'll use when you create LINQ queries, whether you use LINQ to Objects, LINQ to SQL, LINQ to XML, or some other custom LINQ provider. I'll discuss the query keywords, how those keywords map to methods defined using the query operands, and how you can define your own custom implementation for the query keywords.
The C# team worked to minimize the necessary grammar for LINQ and the associated query syntax. They ended up adding eight contextual keywords to the C# language specifically for query: from, where, select, group, into, orderby, join, and let.
int[] someNumbers = { 2, 3, 7, 11, 13, 17, 19 };
var query = from number in someNumbers
someNumbers is the datasource, and number is the range variable. The datasource must implement IEnumerable, or IEnumerable. In this example, someNumbers implements IEnumerable. The compiler gives the range variable a type to match the type enumerated by the datasource. In the example above, number will be an integer. In general, the range variable is of type T, whenever the datasource implements IEnumerable. In the case where the range variable implements IEnumerable, the range variable is a System.Object. You never need to declare the type of the range variable; the compiler infers it.
Consider you have the following string array
string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David" };
Task is to take the name which has length greater than 5 and make them capital letter. if we go in normal way we will put a for loop and then call it and assign a temp variable fetch it out hmmm lot of steps lets see how LINQ works on this
LINQ syntax
var query = from s in names where s.Length == 5 select s.ToUpper();
simple rite it looks like T-SQL but in the reverse way don't confused. in T-SQL you know that you are going to query either a table or view but in LINQ you are going to query a object so you dont know from where you are going to query to from comes first instead of select
int[] someNumbers = { 2, 3, 7, 11, 13, 17, 19 };
var query = from number in someNumbers
someNumbers is the datasource, and number is the range variable. The datasource must implement IEnumerable
string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David" };
Task is to take the name which has length greater than 5 and make them capital letter. if we go in normal way we will put a for loop and then call it and assign a temp variable fetch it out hmmm lot of steps lets see how LINQ works on this
LINQ syntax
var query = from s in names where s.Length == 5 select s.ToUpper();
simple rite it looks like T-SQL but in the reverse way don't confused. in T-SQL you know that you are going to query either a table or view but in LINQ you are going to query a object so you dont know from where you are going to query to from comes first instead of select
Labels:
LINQ
Friday, May 8, 2009
Explicit cursors in PL/SQL procedures
/* Use of Explicit cursor in procedures is shown in the below example. */
Create or replace procedure SP_EMP is
cursor Emp_cur is select empno,ename from EMP;
Emp_cur_var emp_cur%RowType;
begin
open Emp_cur;
loop
Fetch Emp_cur into Emp_cur_var;
exit when Emp_cur%NotFound;
dbms_output.put_line(Emp_cur_var.empno' ' Emp_cur_var.ename);
endloop;
close Emp_cur;
end SP_EMP;
cursor Emp_cur is select empno,ename from EMP;
Emp_cur_var emp_cur%RowType;
begin
open Emp_cur;
loop
Fetch Emp_cur into Emp_cur_var;
exit when Emp_cur%NotFound;
dbms_output.put_line(Emp_cur_var.empno' ' Emp_cur_var.ename);
endloop;
close Emp_cur;
end SP_EMP;
Subscribe to:
Posts (Atom)