Download the PHP package bartonlp/updatesite without Composer
On this page you can find all versions of the php package bartonlp/updatesite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package updatesite
Update 2022-10-09: This is quite old.
I no longer support the sqlite3 database in my SiteClass.
If you want to use this you will need to do some WORK.
UpdateSite Class
This class works with SiteClass. It creates sections or articles that can be placed within a webpage. The articles can be edited via a web browser and they are maintained in a database (MySql is prefered). Check out SiteClass Documentation and Examples.
Install
You can either clone the repository or you can use composer to install UpdateSite.
If you do not have composer you can get it at https://getcomposer.org/download/. Just follow the instruction to install it globally.
Once you have composer select a directory where you want your repository and enter:
How It Works
The sections are stored in a database. Currently there are two databases the SiteClass supports:
- MySql. This uses the most current PHP library (mysqli)
- Sqlite2. This is not as well tested but should work with UpdateSite
The database schema for MySql looks like this:
The 'creator' field is only used if you have extended the SiteClass to handel members.
You can create a webpage as follows:
The comment // START UpdateSite Message
is important. This is used by UpdateSite to find the sites that can be created/edited. The comment must start at the beginning of a line and must have START UpdateSite
be exactaly as shown followed by the name of the item, in this case 'Message', and then optionally a human readable text in quotes. For example "Webmaster's Message".
If you run this example it will show no messages.
Create the Database Entries.
To create the database entries you can run the following program.
This is the first half of the creation program. As you can see the two drop downs are locked together by JavaScript. You can select the page (the name of the webpage you created) and then select the database item you want to edit.
Edit the Selection
The second screen lets you edit the selected item.
When you click on the 'preview' button you will get the third page.
Once you click the 'Create Article' you can go back to your first page and you should see messages.
Enhance the Sections
You can change the 'testupdatecreate.php', 'testupdatesite2.php' and 'updatesite-simple-preview.php' to make them work better with your site. There are two other preview pages that you can use: 'updatesite-preview.php' and 'updatesite-new-preview.php'.
Contact Me
Barton Phillips : mailto://[email protected]
Copyright © 2015 Barton Phillips
Project maintained by bartonlp