This topic contains brief information about Using Override Files. If you looking for Community Server hosting, you can always consider ASPHostPortal. At ASPHostPortal you can get a professional Community Server installation with your Community Server Hosting account. You can always start from our Portal ONE hosting plan (from @$5.00/month) to get this application installed on your website. So, why wait longer?
Override files allow you to modify any aspect of a communityserver.config or siteurls.config file without modifying the original .config file that ships with Community Server or Evolution. In this article, we will modify the HTML scrubber portion of the communityserver.config file using a communityserver_override.config file.
Why Should I use Override Files?
The main benefit of using override files to make changes to the core configuration files is that you are not actually modifying the core configuration files. Instead, you are making the modifications through a separate configuration file. This means that when you upgrade Community Server, the changes you have made will not be destroyed if the upgrade comes with new versions of the core configuration files.
The Override File
An override file is just another xml file. The basic structure of an override file goes as follows:
<?xml version="1.0" encoding="utf-8">
<Overrides>
<!-- Overrides go here -->
</Overrides>
The override file should go into the root folder of your website, i.e., in the same location as the existing communityserver.config file. If you are overriding siteurls.config, you should name it siteurls_override.config, and similarly you should rename the communityserver.config something like communityserver_override.config.
Overrides
An override file contains a collection of overrides. Each override must have two attributes specified on it: xpath and mode.
The xpath attribute is the XPath to the node (or attribute) of the configuration file you want to manipulate with the override. Briefly put, the XPath is a path to specific nodes in the core configuration file. You will see some example XPaths throughout this article.
Overrides can use the following modes:
- Remove - Deletes a node or attribute.
- Update - Used to change an entire xml node.
- Add - Adds a node (or nodes) either before, after or within the specified node.
- Change - Used to change the value of an attribute.
- New - Used to create a new attribute with the specified value.
Remove
Use the remove option to remove a whole node or a single attribute from the configuration file. For example, you may decide you don't want to allow your users to specify css classes for the content they generated. To do this you can use the following override to remove class from the list of allowed global attributes:
<Override xpath="/CommunityServer/MarkUp/globalAttributes/class"
mode="remove" />
Similarly you may decide that you do not want users to be able to specify the color used with font tags. To remove a specific attribute you must specify the name of the attribute to remove the following:
<Override xpath="/CommunityServer/MarkUp/html/font"
mode="remove" name="color" />
Update
The update mode allows you to totally replace a node in the original configuration file. This is particularly useful if you are making so many changes to the original node that it is simpler to replace the whole node. For example, if you want to allow users to only use an very small subset of html when posting (bold, italic, paragraphs and line breaks), you can use the following override:
<Override xpath="/CommunityServer/MarkUp/html" mode="update">
<html>
<strong />
<em />
<p />
<br />
</html>
</Override>
Add
The add mode allows you to add additional nodes to the original configuration file. With add overrides, you can specify a where attribute to specify where the overrides should be added. The following values can be used for the where attributes.
- before - This adds the nodes within the override before the node specified in the XPath.
- after- This adds the nodes within the override after the node specified in the XPath.
- start - adds the nodes within the override at the beginning of the node specified in the XPath.
- end - adds the nodes within the override at the end of the node specified in the XPath.
If no value is specified for where, the start behaviour is used.
To better illustrate the difference between what different wheres do, take the following overrides:
<Override xpath="/CommunityServer/MarkUp/html/" mode="add"
where="before" >
<Before />
</Override>
<Override xpath="/CommunityServer/MarkUp/html/" mode="add"
where="after" >
<After />
</Override>
<Override xpath="/CommunityServer/MarkUp/html/" mode="add"
where="start" >
<Start />
</Override>
<Override xpath="/CommunityServer/MarkUp/html/" mode="add"
where="end" >
<End />
</Override>
<Override xpath="/CommunityServer/MarkUp/html/" mode="add"
where="" >
<Unspecified />
</Override>
Change
The change mode allows you to change the value of a specific attribute on an xml node. When using the change mode, you must specify two additional attributes on the override
- name - the name of the attribute you want to change
- value - the new value you want the attribute to have.
For example, you can use the following override to disallow the colour attribute from being used with the font html element in user-generated content.
<Override xpath="/CommunityServer/MarkUp/html/font" mode="change"
name="color" value="false" />
New
The new mode allows you to add a new attribute to an xml node. Like the change mode, you must specify two additional attributes on your override:
- name - the name of the attribute you want to add
- value - the value you want the attribute to have
For example, you can allow the type attribute to be specified on ordered lists by using the following override:
<Override xpath="/CommunityServer/MarkUp/html/ol" mode="new"
name="type" value="true" />
Reasons why you must trust ASPHostPortal.com
Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they're really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.
You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:
- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization - as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal's top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients' critical sites and services.