Very Simple Website Manager

Daniel R. Mitchell

 


 

I've used several of the available free website management systems, and all of them are very nice. They are also packed with features that I don't need and are usually big and slow. So, when I wanted to update the look of my website (http://pheugo.com) I decided to roll my own. The goal was to create something that would load pages fast, take very little space, and make it possible for me to edit pages quickly on-line. The web you are viewing was created with my Very Simple Website Manager (vswm for short) and I have decided to make it available to others who might be looking for the same thing.

This is a very simple website management framework. Don't expect it to have all the fancy bells and whistles of a Wiki or blog like Wordpress. But, although it lacks the features of a true CMS or Wiki system, it can be quite useful for simple websites. The main benefit of the simple website manager is it's simplicity. It does not require a database or a complex directory structure, and is very small. All content is stored as plain HTML pages and can be hand-edited at any time if you wish.

The framework provides:

  • Standard page layout for consistent look and feel.
  • Automatic table of contents for easy website navigation.
  • On-line editing of pages with HTML or a WYSWIG editor (TinyMCE).
  • Image and other file upload page.
  • Basic user login/password access.
  • Stylesheet management.
  • Automatic RSS feed.

All content pages are placed in a sub-directory named pages and are merged into a standard page layout by a PHP script (src/main.php). All pages have the same layout with common banner, sidebar and footer content. The center content of the page changes as the user navigates through the site. This is a standard website practice, and is known to work well for visitors to the site. They see the same navigation tools on each page and can easily jump from page to page. The look of the website is controlled by the style.css file in the root directory. The styles directory contains several additional style sheet examples. You can create additional styles, or edit the ones there to customize your website.

To link to pages within the website, don't use a URL to reference the page directly. Instead, use a URL of the form:

index.php?page=name

where name is the page without the .html extension.  The website manager will automatically expand the name to pages/name.html and then merge the page content into the standard layout.

The simple website manager can be simple because the TinyMCE editor provides many of the features needed for HTML page creation. It includes plugins for images, media, spell-check and many other features. To find out more, see the examples at The TinyMCE website. If you want an ultra-small website management system, just don't install TinyMCE. The on-line edit form will then display HTML in the standard textarea edit box.

Pages can be created and edited on-line with the built-in editor, or can be created with any HTML editor and then uploaded to the pages directory. When creating pages by hand, do not include the html, head or body tags since those are provided automatically by the scripts. Because pages are processed through the PHP script engine, you can embed PHP script in the HTML file as well. However, the TinyMCE editor does not understand PHP and will discard the script if you embed it. For pages with PHP script, you must edit them without using the TinyMCE editor as explained below.

After you login to the website, the right sidebar contains a form to create a new page or edit an existing page. There are two links, [Edit This Page] and [Edit Plain]. The first link edits with the TinyMCE editor. The second link edits with a plain-text editor. You can also edit any page with a URL of the form: index.php?edit=page. If you want to bypass the TinyMCE editor, use: index.php?edit=page&fancy=no and the page will be edited in a plain text editor. This can be useful if you need to embed things in the page that the TinyMCE editor does not understand or process correctly.

Additional directories for images, audio and upload files are also provided. These directories can be set differently by changing the values in the src/settings.php script if you wish. To include images or other media in your pages, first upload the file to the appropriate directory using the [Upload] function on the right sidebar (visible after you login). Once the file has been uploaded, reference the file with a URL of the following form:

images/image.jpg
sounds/sound.mp3
uploads/file.zip

All PHP source scripts are located in the src sub-directory and can be changed if you need additional functionality. The file webmgrfn.php contains a function called ProcessRequest that handles the arguments to the URL. Add any additional functionality to that function. Documentation on PHP can be found on the PHP website.

Dan's Web Site