Pagex - Bolt on Page Management by www.criTix.co.uk (Woody Hayday)


Pagex is designed to be a barebones content management system. Built in PHP and using a mysql database as a back end - it was originally built as a time saving precursor to new web development projects. It has all the essentials to a content management system, written in basic/mid level php and is fully annotated.

I intend it to work both as a teaching vessel for people seeking to build custom php/mysql content management systems, as well as being a completely functioning 'bolt-on' solution aimed at seo people, web developers and the likes..

In essence it is 2 php include files (one gets included at the beginning and one at the end of each page including it) and a single file for administration.

It works purely from the address bar, simplifying any number of dynamic web address issues caused when using mod re-write and allowing you to set a range of variables depending on the url. So should a single file serve 3 different url's with mod re-write, pagex could essentially feed these 3 url's different content (even though one file is used.)


Help!!!!

Notes about help:

This help page is fragmented and incomplete, you may have to scan around to find what you are looking for. This is due to a lack of time on my part, however should Pagex get well recieved the next version will be far improved. As ever its free to use - so if you would like to contribute in any way feel free to email me!!

General Notes for using Pagex:


Included Files: A brief overview of included files


Installing:

To install Pagex first check you have MySQL (unsure on versions but should work on all), PHP (again is untested on all versions but should have no problems with 4/5) and ftp access to where you want it installed then follow these steps:

  1. Open 'critix_pagex.php' in your editor (notepad if you don't use one) - Enter your mySQL database information (username, password, host, databasename) as explained. Do not change anything else!
  2. Upload 'critix_pagex.php', 'critix_pagex_end.php', 'critix_administration.php' and 'install.php' to the root folder of your website (using FTP)
  3. In your web browser go to www.yourdomain.co.uk/install.php - at this point if you have uploaded the files correctly you will get on screen instructions and it should take no more than 5 minutes to install.
  4. Finished!!! - But wait - don't forget to delete the 'install.php' file from your webserver (also please read security pointers below to make sure your Pagex is safe!)

General Notes for using Pagex:


Security:

Pagex was not designed to be hardcore safe - but if you take note of the following you should not have any problems.


I will proceed to explain the features of pagex below


Home: The default view when opening critix_administration.php - home provides you with some overview figures - all fairly self explanitory, note the following:


All Pagex:


New Pagex: Essentiall the same as all pagex however new pagex is ordered to allow you to find the latest pages and update thier details easily.


Referer List: Shows All referrers including thier Page Rank and the number of visitors they have sent your way.


Page Load Times: Literal statistics based on a pages load time (note it displays load times calculated by php - there may be a few seconds inaccuracy involved.)


Code Slots: Essentially a basic form of content management, you can enter generic coding such as a menu into one of the boxes and then repeat the smaller php line to spit out that code - wherever you need it over the site. I call them code 'Slots' because you could use them for almost anything! See view for more details.


Config: Does what it says on the tin - here you can set the defaults which will be used site wide, turn on and off features and add your google analytics, hit-tail or similar code.


Maintainence - Putting pages temporarily down :

This feature allows you to temporarily 'turn off' pages - by setting them as being off, the pagex include file interviens as the page loads and spits out whatever message you have assigned to it in the field 'down message' ('down title' is the title for this screen).


Retrieves (Basic Hits):

Retrieves are the most basic of counters - it literally counts how many times the page has been accessed - whether its the same person clicking refresh, a google bot, your nan - whatever. It should not be trusted for huge accuracy.


Page Rank:

Pagerank is calculated by Pagex using a script which can be spoofed. That is if you see a referer with high PR it cannot be guarenteed that this is accurate. There are ways to spoof this PR checking script - be aware PR values may be incorrect occasionally.


Sitemaps:

Pagex will automatically create a sitemap for your users - if you want it too. To enable this feature simply add a title to the field 'Sitemap Title' on your config screen (in critix_administration.php). Included with this package was a file named 'sitemap.php' This is an examplar file and can be tailored to show the sitemap as you want it (for information on tailoring it see annotated file.) Once you have set the title and uploaded this file to your root directory, you can add pages from the Pagex System as follows:

  1. Find the page you want to add to the site map - or do it as you go - click 'edit' on this page (you will find the pages in the 'all pagex', 'new pagex' sections - or by searching.)
  2. Once in the edit screen for this page Enter a Sitemap Description. This is the description of the page that users will see on the sitemap. (e.g. 'Homepage' or 'Guide to eating soup')
  3. Also add a Sitemap Group - This is the grouping which will be used in sitemap.php - if you use the same group name for a few pages these will be grouped together. (e.g. 'about us' as a group for several pages)

This will automatically add that page to your sitemap.php file, - to remove simply remove the text from these two fields.

In addition to Sitemap.php, there was also a file named 'google_sitemap_dynamic.php' - this file is very useful:


google_sitemap_dynamic.php - Automatic Google Sitemaps

This file will automatically generate an .xml file that is ready for google - a feature that will save you hours re-indexing your site all the time. It outputs an .xml file with all the urls you include in your standard sitemap, however there are a few key points to mention:


 


Variables to use within pages using Pagex : The following are all variables within php that can be used at will. At any point after including critix_pagex.php you can echo any of the below (as shown) as you desire.

$pg_output_dir2home - Outputs path to directory for use with CSS, links and images when adding directories that don't exist in mod rewrite. (e.g. if you are using mod re-write to redirect 'www.whatever.com/fake/directory/' to the file 'fakedir.php' in the root folder - then the browser would look for css files, links etc from the directory /fake/directory/.) echo this before the filename/target. e.g. :

The following are useable Variables - DO NOT CHANGE with your own php code - they must remain same between start and end pagex includes


Copyright © 2007 Woody Hayday

GNU General Public License

Pagex is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

Pagex is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.