Introduction

In order to keep our code as easy as possible to maintain and enhance, we request that all code submitted for the Snap! Server be written in a very specifc way as described below. Being very consistent very much ease reading each others code. The most important aspect is indentation. Definitively make sure your indentation is correct! Although we encourage you to submit patches and plugins of your own making, we require that this coding standard be followed before you submit anything or it is likely that it will be rejected (we do not have the time to do the formatting for you ...

Table Fields

"domains" Table

The table includes the rules to be used to check a domain name and determine the exact website key. The key of the domain table is the domain name and TLD which is computed from the URI.

Field Name Description
core::original_rules Rules as written by the user. (text)
core::rules Rules after parsing the original rules. This is a serialized buffer of rules ready to be used by the Snap parser. (QtSerialization output)

The table has a special row named "*index*" ...

In order to implement the layout selection we setup the QtScript instead of using our own scripting language since it's already working. At some point we'll want to switch to our own version for speed (i.e. pre-compiled byte code.)

The QtScript is plain JavaScript without any special extensions, however only the system will generate code so we're safe on that end.

The script is expected to return the name of the column defining the layout to use, or an empty string. If empty, then the process is repeated with the page type and its parents (see Layout feature [core]) This column name is ...

Although only Internet Explorer offers support for P3P, it is certainly a good idea to look into it and offer a plugin that generates P3P HTTP/HTML headers and the p3p XML file.

OASIS and IETF also offer different schemes in that regard and having support for those is certainly a good idea.

We need to see whether it is possible to offer privacy information that explain that a 3rd party is keeping the data (i.e. m2osw.com) concerning things such as IP address, and Cookies, whereas site owners can generally only see more human data.

Technical Reference: Platform for Privacy Preferences (P3P) ...

When a domain rule set matches, Snap generates a canonicalized domain name which it uses to access a website rule set. (The snap-manager tool will soon offer a way to test your domain names to see what the canonicalized version really looks like, but it should as you expect... everything except the flags.)

Once the name of a website rule set was determined, it can be added using the Websites tab of the snap-manager tool. As you can see, like with the domains, you have a New button at the bottom of the tab. Click on it to create a new website entry.

The rules are very similar to those found ...

Quick Samples

Domain names only include the domain and the top level domain extension (TLD).

example.com

The sub-domain names include a period, you must make sure to include the period!

required host = "www\.";

You can define a sub-domain replacement using the website() function:

required host = website("(w{1,4}\.|)", "www");

This means use "www" if you find nothing, "w", "ww", "www", or "wwww".

A sub-domain that is an option is marked as a flag:

required language = flag("(en|fr)\.", ...

We are using Cassandra on our Ubuntu servers and when starting 1.1.4 or 1.1.5 we have an issue where the Java interpreter crashes with a segmentation fault.

The problem is that it tries to start javaagent and that makes use of more stack than is allocated by Cassandra to the java engine. The result is a hard crash with a segmentation fault from the OpenJDK environment.

The bug is described in this issue: Cassandra crashes with segmentation fault on Debian 5.0 and Ubuntu 10.10

To fix the problem I had to edit the conf/cassandra-env.sh and replace the 180 by 256 on line 188. (It should say ...

Known Issues

The following are known issues that are beyond what we can repair.

These generally result from an operating system, a development environment, or a project over which we do not have direct control.

We try to provide the current work around or a way to repair your environment when we have an idea of what it is.

Automatic Pages [core]

WARNING

This looks like an extension of the Message Box feature [core] plugin so we can put all messages in the database instead of the code.

The concept is very simple and explained in the Error Pages feature [core], which also looks like a useless plugin idea.


When something happens and the system needs to show the end user content then it has to offer the content via an existing, real page.

For example, say the user is automatically logged out, we want him to be sent to a page explaining what just happened. Although that page may be displayed as a simple AJAX error message, it is still a page that the ...

Auto-sharing your posts

The system has to support a set of Social Media features. Especially, it is expected to support sending information about new posts to Facebook, Twitter, Google+, and other prominent social media websites.

We want to look into a way to allow the user to send (or not) a page to a given social media website. One way to do so is to link a page with a social media tag such as "Facebook" and "Twitter". If link to such, then it should be posted on that social media site. This can be done in such a way that the new tweet happens at a given time in the ...

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly