Simpleweb

Project's page

On gna.org's framework : https://gna.org/projects/simpleweb/

Breaking news

[1.0-RC2] Simpleweb has just been released on its second Release Candidate for version 1.0. Please download, test and report bugs !!

Documentation

Installing Simpleweb

 cd /var/www
tar -xjf simpleweb-?.?.?.tar.bz2
mv simpleweb-?.?.? inc
  • Edit and personnalize (if necessary) sw/simpleweb.php
  • Create the directories "content" and "images" to your website's root directory and chown/chmod them to let your webserver have write access to them
 mkdir images content
chgrp -R www-data content # good with debian/ubuntu
chgrp -R www-data images # good with debian/ubuntu
chmod -R g+w content
chmod -R g+w images
  • If you seem to get backslashes problems with quotes or double quotes, use the given htaccess file as a usual .htaccess on your simpleweb's root

Dependances

you need first to install tinymce (in your website's root directory)

  • Debian/Ubuntu way :
sudo apt-get install tinymce
ln -s /usr/share/tinymce/www inc/tinymce
  • Vanilla way :

Go to the tinymce's website http://tinymce.moxiecode.com/download.php
Download the lastest tinymce package in your inc directory

tar -xzf [your package]

Dynamize your template

  • In your template (index.php or similar) add the following line as the first line :
 <?php require("sw/simpleweb.php"); ?>
  • Then, add the following line in your <head></head> section :
 <?php require("sw/head.php"); ?>
  • Always in your template, add the following elements where needed :
    • navigation :
   <?php require("sw/nav.php") ?> for the whole navigation system
<?php require("sw/navtop.php") ?> for the top categories
<?php require("sw/navsub.php") ?> for the sub categpries and pages
<?php require("sw/navcur.php") ?> for the path to the current page
    • content :
   <?php require("sw/content.php") ?>
    • for CSS per-page-tuning, transform your <body> to something like :
   <body <?php require('sw/bodyclass.php'); ?>>    
  • Add necessary CSS sections for simpleweb in your stylesheets if necessary

Using Simpleweb CMS

  • Every administration tasks are accessible through the "http://mydomain.tld/docroot/sw/admin/" page
  • If you need some pages only accessible "directly", but not through your "navigation-tree", create a category "hidden" at the root of your tree...
  • If you need special properties for categories in your navtop.php, add a page "menu-opt" inside where you'll put the extra properties needed (eg. 'class="large"')
  • If you need special ordering inside your pages or category listing, you can add a number before their name (eg. "News" -> "01-News")
    • Notice that categories are always put together before pages

Make Simpleweb safer

Add the following lines in your apache's configuration file, completing the directory's name to yours :

<Directory "/path/to/your/simpleweb/content">
AllowOverride None
AddType text/plain .html .htm .shtml
php_admin_flag engine off
</Directory>
<Directory "/path/to/your/simpleweb/images">
AllowOverride None
AddType text/plain .html .htm .shtml
php_admin_flag engine off
</Directory>

Securize your administration access through an HTTP authentication. You'll need to add a .htaccess and a .htpasswd files in your sw/admin/ directory. For further information, please refer to the official Apache documentation or this documentation, in french. There are also templates files in your sw/admin/ directory for .htaccess and .htpasswd.

Backup/Restore and file manipulation

Backup

To Backup Simpleweb, just save your two directories "content" and "images" :

 cd [website's root dir]
tar -cz images content > /nfs/backup/simpleweb-backup.tar.gz

Restore

Just replace your "content" and "image" directories by them from your backup

 cd [website's root dir]
rm -rf content images
tar -xzf /nfs/backup/simpleweb-backup.tar.gz

Then restore the file permissions as shown in the installation guide

File manipulations

It is possible to manipulate easily and directly Simpleweb's content by using a file manager or a FTP client. Just manipulate your files as explained before... and enjoy !

Troubleshooting

Executing PHP as a CGI

Use the htaccess-cgi file as /path/to/website/root/directory/.htaccess... and let's roll (still buggy, it needs some fixes if you're skilled and have a PHP-CGI close to you)

Search