InsiteCreation 2010 Administrator & Developer's Guide
InsiteCreation 2010 Administrator & Developer's Guide
0
Administrator & Developer’s Guide
Contents
Installation Module Development
2 42
2 Installing InsiteCreation 2010 42 Creating a Module
14 Creating a User
21 Mini Sites
21 Creating a Mini Site
24 Template Development
24 Built-in Templates
27 Template Files
27 Adding a New Template
28 Applying Your Template
30 Creating a Template
34 Placeholder Configuration
35 Template Stylesheet
36 Optional Themes/Skins
37 Creating a Template that
allows Online Design
40 Creating Multiple Designs
from a Single Template
1
Administrator & Developer’s Guide
Installation
Installing InsiteCreation 2010
InsiteCreation 2010 can be installed on most shared hosts or dedicated servers that support ASP.NET 3.5.
Below are the general installation instructions for a shared host.
A. Database Setup
1. Create a blank database in MSSQL 2005/later.
2. Run storeproc.sql in Query Analyzer against your newly created database.
3. Run ASPNET_REGSQL.EXE in the .NET framework 2.0 folder:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.x\ASPNET_REGSQL.EXE
Note that you don’t need to run ASPNET_REGSQL.EXE directly from your web server. You can use
any computer running .NET framework v.2.0 which has a connection (via internet or local network)
to your database server. The wizard that comes up will guide you through the setup.
B. Website Setup
1. Unzip InsiteCreation package.
2. Copy/ftp all files under the root of your website so that they can be accessed from:
http://YOURSERVER/
3. Grant ASP.NET “write permission” to the resources folder.
4. Open file web.config using your preferred text editor.
a. Update the database connection setting in the web.config file.
For example:
<connectionStrings>
<add name=”SiteConnectionString”
connectionString=”Data Source=DATABASESERVER;
Initial Catalog=DATABASENAME;
uid=john;pwd=123;trusted_connection=false;”
providerName=”System.Data.SqlClient”/>
</connectionStrings>
2
Administrator & Developer’s Guide
b. Specify your mail settings. For example:
<system.net>
<mailSettings>
<smtp from=info@InsiteCreation.com>
<network host=”mail.InsiteCreation.com”
password=”password”
userName-info@InsiteCreation.com />
</smtp>
</mailSettings>
</system.net>
c. Choose a folder in your web server and grant “write permission” to it.
Then set the FileStorage setting in web.config with the folder location. For example:
Note: For secure storage, we recommend that you choose a folder on your hosting server
that is not accessible through HTTP.
C. Finalizing
3
Administrator & Developer’s Guide
Understanding Channels & Users
In InsiteCreation, content/pages are organized into channels. Channels can be created based on
departments in your company or organization. For example, you (as an Administrator) can create channels
such as “Accounting”, “IT Department”, “Support”, etc. You can even create channels for your customers or
clients.
4
Administrator & Developer’s Guide
In an Article Portal, for example, you can create a channel for each author so that each author has its own
area in which to post articles.
In a Club Website, for example, you can create a channel for Public or Members only.
5
Administrator & Developer’s Guide
When creating a channel, the system will automatically create 6 roles for the channel to which users can be
assigned. For example: if we create a channel named “Members”, the following 6 Roles are created for it:
Members
Subscribers have read-only access to the content of the channel.
Subscribers
Authors can contribute content to the channel (Create a Page, Edit a Page, and Delete a
Members Authors
Page).
Editors are the first tier of the approval workflow. Authors must submit their work for
Members Editors
approval. An editor may approve or reject content submitted by Authors.
Publishers are the top tier of the approval workflow. A page approved by an Editor must go
to the Publisher(s) for final approval and publication; if no one is assigned to this channel,
Members work approved by an Editor is published directly to the site.
Publishers
Note: If no Editor or Publisher is assigned, Authors may publish their work directly to the
site.
Members
Resource managers are able to upload resources (images, media files, documents, etc.) to
Resource
the channel.
Managers
Members Module
Module managers are able to embed modules.
Managers
Because users are assigned to specific channels, it’s easy to give site visitors access to protected areas they
need to see, while keeping them locked out of areas where they don’t belong.
6
Administrator & Developer’s Guide
Creating a Channel
To create a channel, open your Dashboard, then select the Channels link.
7
Administrator & Developer’s Guide
Enter a descriptive name for the
2 All existing channels will be listed.
3 new channel.
Specify who will be able to access/view the channel content by choosing from the View Permission
5 drop-down list. There are 3 options under view permissions for each channel:
• Everyone (Anonymous Users); will make the channel content accessible to the public.
• All Users (Registered); will make the channel content accessible to all registered users.
• Channel’s Users only; will make the channel content accessible only to users who are
assigned rights to this specific channel (users that have one of the 6 channel’s Roles listed
above).
Tick the Disable Collaborative Authoring checkbox if you want only the user who creates a
6 page to be able to edit that page.
8
Administrator & Developer’s Guide
Channel View Permission
When creating a channel, we have three options to allow public or restricted access to the content within
the channel.
Logged-in Users
Anony-
Users Users with Role(s)
mous
Users without Sub- Resource Module Adminis-
Role(s) scribers Authors Editors Publishers
Managers Managers trators
Everyone
View, View, View, View,
(Anony- Embed
View View View Contri- Approve/ Approve/ Contribute All
mous Modules
bute Decline Decline resources
Users)
View All Users View, View, View, View,
Embed
permissions (Regis- - View View Contri- Approve/ Approve/ Contribute All
Modules
tered) bute Decline Decline resources
View, View, View, View,
Channel’s Embed
- - View Contri- Approve/ Approve/ Contribute All
Users only Modules
bute Decline Decline resources
Note that if you are the only person who manages your website, after installation, you can just login as an
Administrator and start managing your website’s content. In this case, you don’t need to setup channels
and users.
9
Administrator & Developer’s Guide
Example 1: Creating a Member Area
When planning your website, you may want to make some content available to the general public, while
making other content available only to members, such as club members or website subscribers. The
following steps explain how to create a member area:
10
Administrator & Developer’s Guide
When site visitors try to open the members.aspx, a login
form will be displayed, requiring them to enter a valid
4 username and password to access the page. Since the
channel view permission is set to All Users (Registered), all
registered users will be able to login and open the page.
Note:
When creating the channel Members, the system will automatically create 6 Roles to which users can be
assigned:
• Members Subscribers;
• Members Authors
• Members Editors
• Members Publishers
• Members Resource Managers
• Members Modules Managers
Since the Members channel view permission is set to All Users (Registered), then all registered users
(regardless of their own roles) may also view the content.
If you want to allow only users from a certain role, see example 2.
11
Administrator & Developer’s Guide
Example 2: Creating a Clients’ Area
In much the same way that you might want to limit some content to all registered users, you may want to
provide your clients with a unique content area where they can securely view (or even modify) work in
progress, download project contracts, and access other sensitive documents. In this case, not all registered
users are able to open that area. Only users that are members of the Channel can open the area.
When this channel is created, the system will automatically create six roles to which users can be assigned:
1. Clients Subscribers
2. Clients Authors
3. Clients Editors
4. Clients Publishers
5. Clients Resource Managers
6. Clients Module Managers
12
Administrator & Developer’s Guide
As a result, the page will not be visible on site navigation.
4
Your clients will need to be logged in first (via the login link or login form provided on the
site) to be able to see links to any pages assigned to the Clients channel. Site users that
do not have one of the six roles listed above will not be able to see links to the
5
clients.aspx. Even if they know the URL, they won’t be able to access the page.
13
Administrator & Developer’s Guide
Creating a User
To create a user, open your Dashboard.
14
Administrator & Developer’s Guide
A list of all existing users will be displayed on the Users screen:
15
Administrator & Developer’s Guide
Setting up Approval Workflow
InsiteCreation supports approval workflow that consists of Editor and/or Publisher approval.
You can assign users either as an Editor or Publisher in a channel so that the channel has an approval
workflow, otherwise pages in that channel will be published directly without approval.
When editing page content, you have either a Publish button or a Send for Review button.
If approval is needed, the Send for Review button is displayed; otherwise the Publish button will be
displayed.
16
Administrator & Developer’s Guide
To Approve or Decline a Page
To see a list of pages which have been submitted for approval, open your Dashboard.
17
Administrator & Developer’s Guide
Select the page you
wish to approve or
decline from the list by
3 clicking the checkbox
next to that page.
You can also approve or decline a page by opening the page and using the Approve or Decline links in the
Page Info box.
18
Administrator & Developer’s Guide
Site’s Language & Settings
InsiteCreation allows you to change the language (culture) of your site. Your site will render the text,
captions, date, and number format according to the selected language (culture). Go to the Dashboard and
select Update Site Settings.
Language Files
A culture in InsiteCreation requires language files. If you select a culture for your site that doesn’t have
language files, then the default English language files will be used automatically.
Language files (also called resource files) are files with the extension “resx” that contain language
translation of the application text or captions. You can translate the application panels of InsiteCreation by
adding your language resource files. To translate the panels to German for example, duplicate all resource
files in the above folders and add “.de-DE” to the end of the file name. For example:
account.ascx.resx
would be:
account.ascx.de-DE.resx
19
Administrator & Developer’s Guide
You can then translate all the text or captions defined in the new resource files. The translation will be
applied automatically if the site has the culture setting set to German (Germany).
20
Administrator & Developer’s Guide
Mini Sites
InsiteCreation allows you to create multiple mini sites with different languages (cultures). With this feature,
you can:
• Create multiple-language sites,
• Create mini sites for each of your company’s departments,
• Create mini sites for each of your club members,
• Etc.
The term “mini” does not refer to the size of the site. You are able to create as many pages as you like on a
“mini” site, just as you would on the main site.
21
Administrator & Developer’s Guide
A new site is now created. Try clicking the Go To link.
7
As you can see, the site is still empty. Before adding content, you may want to specify the
9 site name or logo to be displayed on the header, copyright info on the footer, and any
other design aspects.
Go to the Dashboard by selecting the My Dashboard link and then select the Templates
menu.
22
Administrator & Developer’s Guide
Here you can specify the design aspects of your site.
10
Here are some facts about a mini site:
• A mini site is created in the same location (domain) of your existing site.
• A mini site has a separate menu/navigation system.
• Each mini site has a role called “Site Managers”. You can assign users to this role to be an
administrator of the site.
23
Administrator & Developer’s Guide
Template Development
InsiteCreation uses design templates to separate content from design. You can change the design of your
web page by applying a different template to the page.
Built-in Templates
Below are the built-in templates in InsiteCreation:
Bubble 01 Bubble 02
Bubble 03 Clean 01
Clean 02 Clean 03
24
Administrator & Developer’s Guide
Elegant 01 Elegant 02
Flash 01 Flash 02
Flash 03
Fresh 01
Gradient 01
Fresh 02
25
Administrator & Developer’s Guide
Gradient 02
Simple 01
26
Administrator & Developer’s Guide
Template Files
You can create your own template(s) or use the built-in templates provided by InsiteCreation. You can also
modify the built-in templates to meet your needs.
TIP: You can copy these files from any built-in template and modify them according to your site design.
InsiteCreation files
27
Administrator & Developer’s Guide
Go to the Dashboard
2 and select the
Templates menu.
Here you can register
the template. Fill in the
name and select the
folder simple_01.
28
Administrator & Developer’s Guide
If you want to apply your template to a specific page, go to that page and edit it.
In the next section, we will look further into the main template file: default.master.
29
Administrator & Developer’s Guide
Creating a Template
Now we will look further at how to create a template. The main template file is the default.master file,
which contains mainly regular HTML code with placeholders for various elements (menu, title, body
content, etc). You can create and edit this file using any text editor. We would recommend that you use
Visual Web Developer which you can download from the Microsoft website.
Below are the basic requirements for the default.master template file:
5
A Form element in the Placeholders to display
4 form of <frm:Form ...> title, body content, etc.
30
Administrator & Developer’s Guide
Here is a simple example of a template with more placeholders and previews:
31
Administrator & Developer’s Guide
Here is how your site would look with the template applied:
Besides the above placeholders, below are examples of other available placeholders you may use in your
templates.
32
Administrator & Developer’s Guide
Here are empty placeholders that
you can use for any purpose.
You can embed modules in all
these placeholders by clicking the
Add Modules link.
Note: placeholderBody is the
placement of page content.
33
Administrator & Developer’s Guide
Placeholder Configuration
Several placeholders are configurable using the file: default.xml. This file is optional and can be added in
your template folder.
34
Administrator & Developer’s Guide
Template Stylesheet
The stylesheet for a template is called default.css, located in the template folder. In this css file,
placeholders can be formatted according to your site design.
TIP: you can use/copy the default.css from any built-in template and modify it according to your site
design.
35
Administrator & Developer’s Guide
Optional Theme/Skin
A skin is used to format several controls used in your website, for example: GridView, TreeView,
Calendar, etc. Skins are optional.
To create a Skin, create a folder under the App_Themes folder with the sama name as your template
folder. For example, if you have a template located at: <yourwebsite>/templates/simple_01/ you would
then create a folder: <yourwebsite>/App_Themes/simple_01/
Skin file
TIP: You can copy SkinFile.skin from <yourwebsite>/App_Themes/global/ and modify it according to your
needs.
In the Skin folder, you can also have a stylesheet file and even an image folder. The stylesheet will be
applied automatically to your site.
Image folder
Stylesheet file
36
Administrator & Developer’s Guide
Here is the Skin’s Stylesheet.css file:
37
Administrator & Developer’s Guide
The Design panel will be displayed. Here you can fill-in the header text
2 (site name), upload a header image, change the background, etc.
When placing your cursor into the Background Color textbox, a color picker is displayed which allows you
to choose a color easily.
38
Administrator & Developer’s Guide
To create a template that supports online design, you need to add a few things in default.master and
default.xml files. To do this, follow the steps below:
Then on the header section, add css rules for formatting body & header elements.
Default.master
Finally, in the default.xml file, you must specify default settings for the
design elements above that will be used by the Restore Default
Settings button in the Design panel in order to return any changes
made back to their original settings.
39
Administrator & Developer’s Guide
Here you specify the default
8 settings of the design elements.
After saving, the template is registered and by using the Design panel, you can modify the design aspects of
this template.
40
Administrator & Developer’s Guide
InsiteCreation allows you to create another new template by using the same gradient_01 folder. For
example, you give a new name: Gradient 01 new.
1 Different Name
2 Same folder
As a result, you now have another new template in which you can specify different design settings in the
Design panel. With this feature, a single template can produce multiple templates with different design
settings.
41
Administrator & Developer’s Guide
Module Development
Creating a Module
A module in InsiteCreation is simply an ASP.NET (ascx) User Control. You can find many references on the
internet about how to create ASP.NET User Controls. With ASP.NET User Controls you can create any
application and embed it onto any InsiteCreation page.
Embedding a Module
First, you need to register the module.
42
Administrator & Developer’s Guide
To register the module,
2 open your Dashboard,
then select the Modules
link. A list of built-in
modules will be displayed.
43
Administrator & Developer’s Guide
Select the Add Module link to open
the Add Module dialog. 4
44
Administrator & Developer’s Guide
Creating an Advanced Module
Using modules, you can enhance your InsiteCreation website with added applications.
A module/application sometimes requires some settings. For example, if you want to create a Youtube
module, you would need to specify which video you want to display.
You can hard-code this information, but this can reduce the flexibility of your module.
InsiteCreation allows you to define your own variables in your module (for example: youtube video tag,
width & height of the video, etc).
Here is an example of a module that allows you to specify a Youtube Video tag.
The Settings
link is displayed
2 on the module
to open the
Settings dialog.
The Video Tag
3 is entered in
the module’s
settings.
By using custom settings (in this example: Video Tag, width & height of the video), you can use the same
module to display various Youtube videos with flexible dimensions for the video display.
For storing the settings data as well as reading it, InsiteCreation provides several methods you can use:
- SetModuleData()
- SaveModuleData()
- GetModuleData()
45
Administrator & Developer’s Guide
Below, you will see how to create the Youtube Video module. We have named the file youtube.ascx.
Here is the full listing of youtube.ascx:
46
Administrator & Developer’s Guide
47
Administrator & Developer’s Guide
We will look further at the code below.
Prepare a placeholder for the module’s settings.
1 In this example, we named the placeholder ID:
“plhSettings”.
Create textboxes to
2 enter the Video Tag,
width, and height of
the video.
48
Administrator & Developer’s Guide
8 Listed here is the Save settings method.
49
Administrator & Developer’s Guide
If the module setting hasn’t been specified,
12 do not display the module.
50
Administrator & Developer’s Guide
If your module requires user authorization, you can check the user’s roles using the following properties:
- IsUserLoggedIn; checks if user has logged-in. Value: true/false.
Example: Me.IsUserLoggedIn
- IsPublisher; shows if user has a Publisher role. Value: true/false.
Example: Me.IsPublisher
- IsSubscriber; shows if user has a Subscriber role. Value: true/false.
Example: Me.IsSubscriber
- IsAuthor; shows if user has an Author role. Value: true/false.
Example: Me.IsAuthor
- IsEditor; shows if user has an Editor role. Value: true/false.
Example: Me.IsEditor
- IsResourceManager; shows if user has a Resource Manager role. Value: true/false.
Example: Me.IsResourceManager
- IsAdministrator; shows if user has an Administrator role. Value: true/false.
Example: Me.IsAdministrator
- IsReader; shows if user doesn’t have any role assigned or has a Subscriber role. Value: true/false.
Example: Me.IsReader
51
Administrator & Developer’s Guide
Listing Template Development
Listings in InsiteCreation are template-driven. With a listing template you can format the look and feel of
your listing and specify its behavior.
52
Administrator & Developer’s Guide
Creating a Listing Template
To create a listing template, go to the Dashboard and select the Listing Templates menu.
2 Click Save.
53
Administrator & Developer’s Guide
Here you can configure the listing template.
4 A listing template contains 4 HTML templates:
- Header
- Footer
- Item (a recurring HTML to display listing entries)
- Script (can be used to embed javascript)
In item template, for example, you can add some
TAGS:
[%TITLE%] for displaying a title,
[%SUMMARY%] for displaying a summary, etc.
The Use categories to organize listing There are 2 options for a General Listing page:
11 entries option allows you to organize
listing entries using custom categories.
10 - Include listing entries in the sitemap
- Exclude listing entries from the sitemap
You can leave this option unchecked. If you choose Exclude listing entries from sitemap, your
listing entries will not be displayed on the site menus.
Content Template is a template used to format page This option is recommended for managing a large
number of entries. You will also be able to specify the
12 content (title, body content, etc.). Use General Content
for basic formatting. listing ordering.
To modify Content Templates, go to your Dashboard, and
select the Content Template menu.
54
Administrator & Developer’s Guide
Try creating a new page and
14 check the “Make this page a
listing/gallery” option.
The “File Explorer” is available
on the listing templates
selection.
Choose this template and
publish the page.
55
Administrator & Developer’s Guide