https://github.com/wevre/wcommon
Common code for templates, forms, and page elements
https://github.com/wevre/wcommon
Last synced: 2 months ago
JSON representation
Common code for templates, forms, and page elements
- Host: GitHub
- URL: https://github.com/wevre/wcommon
- Owner: wevre
- License: mit
- Created: 2015-02-10T04:50:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-12-23T04:48:22.000Z (over 6 years ago)
- Last Synced: 2025-01-01T15:43:33.863Z (over 1 year ago)
- Language: PHP
- Size: 200 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wCommon
Common code for templates, forms, and page elements.
## wStandard
Functions for handling errors, managing URL's, string and date manipulations, and custom HTML elements.
## HTMLComposer
An object for constructing HTML, keeping track of and closing elements as they are added to the pile.
## Template
Subclass of HTML\_Template\_Sigma that adds useful features.
## FormBuilder
Class for handling the building and processing of HTML forms.
# Using wCommon—A very quick guide
The following are very high level steps (read: bare minimum steps) to setting up a simple blog-like website that uses wCommon and dStruct.
1. Set up a server with Apache, PHP and MySQL. Using PEAR, install HTML\_Template\_Sigma.
2. Install wCommon and dStruct on your server, typically in `/usr/share/php`. Adjust PHP's `include_path` to point to this location.
3. Copy the files from the `sample` folder to some location reachable by Apache and set the DocumentRoot to the `www` folder.
4. Create a database and run the statements in `struct.sql` to create the proper dStruct tables.
5. Create a user with permissions for that database, and capture those credentials inside `inc-standard.php`.
6. After editing some internal parameters, run the script `create-user.php` to create an admin user.
7. At this point you should have a working website that displays posts. You can log in as the admin and create, edit, and delete posts and also upload images and other documents.