Custom Sections

part of the ArsDigita Community System by Tarik Alatovic and Sarah Ahmed

The Big Picture

This module allows the group administrator to create and manage different custom sections of the site. Custom sections serve like url directories. so if group administrator of group travel at photo.net defines custom section sweden (e.g. photo.net/travel/sweden), he will be able to upload files for this section (see content_files table) in order to display the file photo.net/groups/travel/sweeden/stockholm.

At this stage, we only support creation and administration of custom sections at the group level. Later, we will augment the system to support site wide administration of custom sections.

The Medium-Sized Picture

The system consists of one table. The content_files table holds information about different files that belong to a custom section. The files can be of type text/binary. Note that each content file references a custom section stored in the content_sections table. The documentation on content sections can be found in /doc/content-sections

create table content_files (
	content_file_id 	integer primary key,
	section_id 		references content_sections,
	-- this will be part of url; should be a-zA-Z and underscore
	file_name		varchar(30) not null,
        -- this is a MIME type (e.g., text/html, image/jpeg)	
        file_type               varchar(100) not null,
        file_extension          varchar(50),    -- e.g., "jpg"
	-- if file is text or html we need page_pretty_name, body and html_p
	page_pretty_name        varchar(200),
	body			clob,
	html_p			char(1) default 'f' check(html_p in ('t','f')),
	-- if the file is attachment we need use binary_data blob( e.g. photo, image)
	binary_data             blob
);

Legal Transactions

From the group administration pages at /groups/admin/$group_name/custom-sections/index?section_id=$section_id, the group administrator can


tarik@arsdigita.com