FAQs

Q: Can I install Webspaces CMS in a folder in my web doc tree or does it need to be in the root folder?

A: Either. So long as you correctly modify mainconfig.php you can put it anywhere. The default puts the actual CMS in /cms, however its also good to put those files in / . This produces the shortest urls for users.

 

Q: How do i modify or create new template files?

A: With any CMS the bulk of the potential for customisation lies in the html templates. Template files live in /templates . The structure of the template file is self-explanatory, but see also templates.

 

Q: What if I want to interact with the db directly?

You can use the commonly available phpMyAdmin software. There is also a simple database query script at /admin/sqlquery.php which you can log in with the superuser password.

 

Q: How does the navbar work?

A:   The idea is to use the nav linkbar to create a unified Main Nav bar for your whole site, incl both webspaces and non webspaces pages. You can modify it with the /admin/sqlquery.php script:

select * from spacelinks;      #show current links

insert into spacelinks set label=`Webspaces Index`,

       link=/cms/page.php?view=index`;      #add a link

delete from spacelinks where label=`Webspaces Index`;   # delete a link

You can render the Sitelinks bar on non-webspace pages using:

<php incude(`/lib/sitelinks.php`); ?>

 

Q: You mentioned something about a static page wrapper

A: Yes if you have existing static html pages you can integrate them with webspaces, by moving those pages into the folder: /static and accessing them using /cms/display.php?page=my_static_pagename.html . It automatically strips off your old <html> and <head> tags and inserts the whole thing into the tag of template1.html . This way the whole site gets the same schema, and you get site wide hitlogs, and a common nav bar system.

 

Q: What ways can you request the webspace pages?

A: Most browsers will let you call pages in pretty much idiot proof ways.

  • page.php?view=Home_Page
  • page.php?view=HOME_PAGE
  • page.php?view=home_page
  • page.php?view=Home Page

all end up at the page you want. Probably in the future ill also build in something like: page.php?home_page   aswell

 

Q: Any way to order the   webspace index?

Not at present. Its alphabetical, or alphabetical. In future there will be a config variable to specify, alpha, date, reverse date etc. I also hope to finish the categorys function too.

 

Q: Is there a way to create categories of webspaces? Ive got so many now we are loosing track of them

A: somewhere in the dark parts of the code is a webspace categorys field. This is for when you get lots and lots of webspaces, and need to organise them.   Both features will be in Version 9.

 

Q: What is there in the way of logging?

A: While comprehensive logging is inbuilt, at this stage only limited log analysis tools exist.   Using the db query script at /admin/sqlquery.php to query the log table:

select * from log (shows every field of every log entry: could be HUGE)

select * from log where type =`error`

select * from log where type =`pageview`

select * from log where type =`login`

select * from log where type=`pageview` and user=`xxx` ` (shows hits to xxx webspace)

select * from log where user=`xxx` ` (shows all events relating to xxx webspace)

 

Periodically you should clean the logfile out. To do this:

select * from log

  1. save the resulting html file for your archives
  2. delete from log

 

Q: that sqlquery script looks useful, what else can I use it for?

Heres a few ideas:

//to find a users password

select * from spacepersons ;

//sets a lock which prevents settings changes to a webspace

update spaceinfo set lockcode=`2` where space=`myspace`;

//sets a lock preventing any changes to a user account

update spacepersons set lockcode=`1` where id_person=N;

//sets a lock preventing changes to a webspace item

update spaceitems set lockcode=`1` where item=`myitem`

//sets a lock preventing any changes to the name and intro

//fields of a webspace item

update spaceitems set lockcode=`2` where item=`myitem`

 

Maybe later ill implement a gui for some of these functions, but until now this is what youve got.

 

Q: I`m a beginner and I don`t understand much of the above. Help!

A: PHP is a scripting language which makes webpages do interactive things. Not only do you need a host which allows you the use of PHP but MySQL as well (which is a database used to store the page content). Not all ISPs will have these but most do. You will need to ask your host to set up a MySQL database for you, and they will then give you its name, and login details. Once you have those things, you can set it up.   To configure the scripts open the config files Notepad (not Word!). Make careful changes of the variables in each file, whilst being careful to leave the various quotes and semicolons intact. Resave the files and upload the whole file tree into your webroot directory keeping the folder tree structure as it is. You know how to upload right? Get WS_FTP or WinSCP.

Admin login