.: Luke Cole - Home Page :.
(This site hasn't had many changes since 2013) (older version: lc.homedns.org 2003-2005) (long-standing biz: eteckonline.com 2001-2004, coletek.homedns.org 2005-2006, evolved to coletek.org 2007+) (other early online webapps here) |
|
phpSitephpSite provides a framework for real webmasters to seriously create/edit/manage powerful, flexiable and modulated web sites extremely easy using their preferred text/html editor (or a browser soon, like a wiki). Webmasters generate web pages content using HTML/CSS and define page layouts via writting a web page avatar and skin using HTML/CSS, and can create/update backbone php modules with ease. phpSite can support any databases that php supports, such as PostgreSQL, however currently only a MySQL interface is implemented. phpSite can support any coding language within HTML, such as C/C++, however currently only supports php and python. phpSite has many modules already included in the package, such as: authorisation, file management and shop tools. Why use phpSite?
Some Web Sites Using phpSiteCurrent Release (Free Software, Open Source)See http://sourceforge.net/projects/phpsite/ Dependencies: make, rsync, [mysql-server], php5, php5-mysql, php5-cli, [python]Filesystem Module Dependencies: convert (i.e. ImageMagick), ffmpeg Supported Databases: mysql Supported Lanagauage within included HTML files (steming from phpSite/site/data.xml): php, python Modules Included: Mail Module, DB Module, Stats Module, Filesystem Module, Authentication Module, Shop Module (incomplete) Lines Of Code (LOC)True CodePlease note sloccount does not include white space. localhost:~>sloccount phpSite/* SLOC Directory SLOC-by-Language (Sorted) 12842 src php=12798,ansic=44 2159 scripts php=2152,sh=7 156 contrib php=156 0 CVS (none) 0 avatars (none) 0 conf (none) 0 images (none) 0 site (none) 0 skins (none) 0 top_dir (none) Totals grouped by language (dominant language first): php: 15106 (99.66%) ansic: 44 (0.29%) sh: 7 (0.05%) Total Physical Source Lines of Code (SLOC) = 15,157 Development Effort Estimate, Person-Years (Person-Months) = 3.47 (41.67) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 0.86 (10.32) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 4.04 Total Estimated Cost to Develop = $ 469,122 (average salary = $56,286/year, overhead = 2.40). SLOCCount, Copyright (C) 2001-2004 David A. Wheeler SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL. SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to redistribute it under certain conditions as specified by the GNU GPL license; see the documentation for details. Please credit this data as "generated using David A. Wheeler's 'SLOCCount'." XML/HTML CodePlease note wc -l counts the white space. localhost:~>wc -l phpSite/site/* 275 data.xml 763 data.xml.auth.body.html 88 data.xml.auth.menu_right.html 144 data.xml.db.body.html 31 data.xml.db.menu_right.html 75 data.xml.default.avatar.html 59 data.xml.default.footer.html 1 data.xml.default.header.html 109 data.xml.default.menu_left.html 0 data.xml.default.menu_right.html 0 data.xml.default.skin.html 323 data.xml.fs.body.html 71 data.xml.fs.menu_right.html 15 data.xml.index.body.html 351 data.xml.mail.body.html 47 data.xml.mail.menu_right.html 3492 data.xml.shop.body.html 163 data.xml.shop.menu_right.html 110 data.xml.stats.body.html 75 data.xml.stats.menu_right.html 6 mail-body-confirm_new_email.txt 6 mail-body-confirm_registration.txt 6 mail-body-new_products.txt 9 mail-body-order_status.txt 21 mail-body-supplier_order.txt 2 robots.txt 6242 total SQL CodePlease note wc -l counts the white space. localhost:~>wc -l phpSite/scripts/db/*.sql phpSite/scripts/stats/*.sql \ phpSite/scripts/auth/*.sql phpSite/scripts/shop/*.sql 19 db/create_tables.sql 14 db/drop_tables.sql 62 stats/create_tables.sql 17 stats/drop_tables.sql 18 stats/export_table_data.sql 18 stats/import_table_data.sql 197 auth/create_tables.sql 22 auth/drop_tables.sql 23 auth/export_table_data.sql 24 auth/import_table_data.sql 312 shop/create_tables.sql 33 shop/drop_tables.sql 38 shop/export_table_data.sql 32 shop/import_table_data.sql 829 total DocumentationInstalling / Updating
How to ConfigureStep 1 (Mandatory)
Step 2 (Mandatory)Add/edit pages within xml file SITE_TREE_FILE, between the <xml></xml> tags. Each page can have a number of elements.Example
<index_page> <filename> index.php </filename> <module> auth </module> <modules> stats:auth </modules> <subjects> home_page:about:spam </subjects> <avatar> <html> <head> <meta name="description" content="$description"> <meta name="author" content="$conf:webmaster"> <link rel="SHORTCUT ICON" href="$icon_filename" type="image/x-icon"> <link rel="stylesheet" href="$skin" type="text/css"> <title>$title</title> </head> <body> $header<br> $menu_left<br> $body<br> $footer </body> </html> </avatar> <skin> skin0.css </skin> <icon_filename> $conf:site_images_diricon.png </icon_filename> <title> $conf:org_name - Home Page </title> <description> $conf:org_name's site ... </description> <header> <h1>$conf:org_name</h1> </header> <footer> Created by <a href="$conf:webmaster_email">$conf:webmaster_name</a> </footer> <menu_left> <a href="index.php">Home Page</a> <a href="index.php?subject=about">About</a> <a href="index.php?subject=spam">Spam</a> <a href="mail.php">Contact</a> </menu_left> <menu_right> <!-- empty :( --> </menu_right> <body> <form action="$current_url" enctype="multipart/form-data" method="POST"> <input type="hidden" name="validate" value="1"> <input type="hidden" name="subject" value="$_REQUEST[subject]"> <!-- subject == home_page START --> echo "hello $stats:session_id ($stats:log_id), " . "this website is called $org:org_name"; <!-- login == 0 START --> Your not logged on! <!-- login == 0 END --> <!-- login == 1 START --> Thankyou for logging on Table of all your users (processed from auth module): $auth:table:users <!-- login == 1 END --> <!-- group == webmaster START --> You must be in the webmaster group, some of your details:<br> Name: $auth:user:name<br> Username: $auth:user:username (ID: $user:id)<br> Password (MD5): $auth:user:password<br> Group(s): $auth:user:groups_format<br> Image: <? $path = "$conf:user_images_dir$auth:user:id.tn.png"; if (file_exists($path)) { echo "<img alt=\"$auth:user:name\" src=\"$path\">"; } ?> <!-- group == webmaster END --> <!-- subject == home_page END --> <!-- subject == about START --> about me!! <!-- subject == about END --> <!-- subject == spam START --> <!-- error == 0 START --> $page:successful_comment <!-- error == 0 END --> <!-- error == 1 START --> Invalid Fields: <? echo implode(", ", explode("::", "$page:errors")); ?> <!-- error == 1 END --> Enter some spam: <input type="text" name="spam" value="$_REQUEST[spam]"> <input type="submit" name="submit_button" value="Submit"> Did you submit $_REQEUST? (the form input value has also been updated with your spam) <!-- subject == spam END --> </form> </body> </index_page> NOTES:
Step 3Design a html web site avatar and css skin for the page elements avatar and skin.
[
Example HTML avatar
]
[
Example CSS skin
]
NOTES:
Modules Summary / Step 2 OptionsMail Module
DB Module - Incomplete
Stats Module
Auth Module
File System Module
Shop Module - Incompletes
Content Management Module - Not converted from older version as yet
Frequently Asked Questions
Question:
How do I call other db modules functions in a db module function?
Answer:
Easy, if the module is called 'auth' and the function you wish to call
is 'spam' then you call:
auth_db::spam($options);
Question:
How do I handle _REQUEST data?
Answer:
For POST forms use an str_replace() within insert_data(), GET forms
are handled automatically.
Development DocumentationGlobal Coding Standards
An Example of Poor Coding Standardfor (i=0;i<=height;i++) { /*some comment */ if (something==spam) { echo "cool"; } } HTML Coding Standards
Image Standards
phpSite Site Coding Standard
How the current page is the created (for developers)Well all page files (e.g. index.php) contain the perso-do code:$module = "page"; if (_REQUEST[m]) { require_once "modules/_REQUEST[m]/_REQUEST[m]_page.php"; $module = strtolower(_REQUEST[m]) . "_page"; } page::set_conf($conf_path, $module); $page = new $module(); $page->create(); printf("%s", $page->get_html()); Where the perso-do code of page.create() is:# # Init # $data = array(); $html = ""; # connect to db if (CONF_DB_TYPE) { db::setup(CONF_DB_HOSTNAME, CONF_DB_USERNAME, CONF_DB_PASSWORD, CONF_DB_NAME); } $this->setup_site_indexes(); $this->setup_site_data(&$data); $this->setup_site_html(&$html); if (CONF_DB_TYPE) { $this->setup_tables(); # create and import empty or non existing tables } foreach (CONF_MODULES as $module_name) { $this->module[$module_name]->setup_data(&$data); $this->module[$module_name]->remove_sections(&$html); } foreach (CONF_MODULES as $module_name) { $this->module[$module_name]->data = $this->data; } # # Perform tasks for page currently being viewed # $this->setup_data(&$data); if (!$this->is_allowed()) { $this->replace_body(&$html, CONF_COMMENT_UNAUTHORIZED_ACCESS); } else { $this->run_page(); $this->remove_sections(&$html); } $this->insert_data($data, &$html); # # Perform tasks for any page # foreach (CONF_MODULES as $module_name) { $this->module[$module_name]->insert_data($data, &$html); } $this->common_remove_sections(&$html); $this->common_insert_data($data, &$html); $this->common_process_code(&$html); # insert page data again for any code created variables $this->insert_data($data, &$html); $this->set_html($html); TODOHIGH Priority (Bugs)
MEDIUM Priority (Enhance Features)
LOW Priority (New Features)
Design Issues
New Design Notes
Release NotesphpSite-1.10 - November 19, 2007Fixed some simple, but frustrating first time installation bugs. Fixed and finished shop features for items and organisations (only cart requires fixing). Fixed some bugs. [ 15157 LOC ] phpSite-1.9 - November 11, 2007More shop features added. Add reCAPTCHA support to forms. Fixed some bugs. phpSite-1.8 - August 28, 2007Included modules (i.e. auth, fs, shop) that where previously temporary on sale to improve phpSite features. Enabled multiple site setup and debug url. Fixed some bugs. [ 13171 LOC ] phpSite-1.6 - August 21, 2006Added geoip support to initialize site data for the country the surfer is visiting from. Added more online views of statistics. Added some scripts for file name manipulation and old phpSite database version importing. Added video functions within filesystem module to view downloadable movies as gif animations online. Updated and added some built-in images. Fixed many bugs. phpSite-1.5 - June 27, 2006More re-implementation of backbone to allow for a different avatar and skin for each page (if needed) and reduced the required execution time. Removed config options modules and module subjects. Added page items: module, modules, subjects, avatar, skin, icon_filename. Any page item can now be imported. Pages and module definitions separated. phpSite-1.1 - June 13, 2006Added script to update popular products for shop module: most viewed products from stats module and new products added. Finally added subjects for statistics module: top pages, top downloads, page logs, session logs, ip logs, online logs, user logs. Fixed some bugs such as page title and some scripts, added alt comments for fs images for web bots. phpSite-1.0 - May 26, 2006Renamed modules contact, user, store to mail, auth, shop. Replaced image_browser module with file_manager module, which includes image_browser functions. Replaced conf module with base module and added db_admin module. Major changes to backbone function page.php::create(). See the section "How the current page is the created" in the development documentation. phpSite-0.7 - January 20, 2006Added image_browser module. phpSite-0.6 - January 10, 2006Added store module. phpSite-0.5 - December 1, 2005Added user module. phpSite-0.4 - June 20, 2005Added contact, conf modules. phpSite-0.3 - December 5, 2004Module interface added. phpSite-0.2 - May 20, 2004Added database interface with web-based config. phpSite-0.1 - January 20, 2004Initial code release. This release contains provides a way to view pages with different body content but with a common menu, header, footer all defined in html files, but viewed as run as php files (i.e. provides an avatar system for the page data layout).
|
© 2000-2024 Luke Cole All rights reserved |