
Hack #1: domain rewriting
Using the apache wildcard virtual host directive (ServerAlias *.domain) all entries for a given domian name can goto CMS (or anything else). I have added in functionality for http://articlename.domain/ (search engines rank pages based on hostname as well as content, this can increase your ranking by placing the article name in the hostname). It is a VERY simple implementation, where http://www.article.domain == http://article.domain == http://article.randomcharacters.domain etc.
Hack #2: url rewriting
I also added in the ability (via .htaccess) to rewrite urls so instead of http://domain/index.php?page=article to be http://domain/article.html or http://domain/print/article.html. Some search engines penalize you (or just dont index your page) if there are cgi variables. This allows for better search engine placement on those engines.
RewriteEngine on
# Modify the RewriteBase if you are using CMS in a subdirectory and the
# rewrite rules are not working properly:
RewriteBase /cms
# Rewrite URLs of the form 'index.php?page=x&print=true':
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^print/(.*)\.html$ /index.php?print=true&page=$1
# Rewrite URLs of the form 'index.php?page=x':
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ index.php?page=$1 [L,QSA]
Hack #3: redirecting any 404 to CMS
Ok, this one is not really a hack but a config setting, by placing entries in a .htaccess file you can make all 404 pages goto CMS so you can control the display better and possibly use the plugin I wrote to display a list of valid articles should anyone enter anyhting that isnt found
ErrorDocument 404 /cms/index.php
Hack #4: plugin to display articles
I quickly modified bulletmenu to display a list of valid articles. No checking is done to limit the size of this list, so if you have hundreds of articles you can have a very large page ... Maybe I will add to that. If anyone is interested I will post this somewhere (I believe there is the provisions to allow uploading of plugins somewhere on the CMS page, but since I just got CMS last night I havent really looked around).
Hack #5:
removed the print button on the print page and added author name, email, website it came from and title at the top. This I think makes it slightly better (and matches what I was using prior on my website, which was why I did it).. The back button on the browser can be used to replace the missing form button - and the printed output looks nicer. I may even add in headers to cause the automatc printing of the document. (window.print(); at the end of the document - although there may be a Content-disposition tag that does the same thing).
FUTURE HACKS:
I plan on adding PDF document creation (fortunately the hard work is done, there are libraries that already exist that will create PDF dox from html). I will be seeing about integrating these into the site via a plugin (although it may require a module as there are a few headers that need to be set, content-type, content-dsposition, etc) and I dont know if I can disable all other display information without a module, I just havent looked enough yet.
Keywords for each article:
I often use a keyword tag for keywords. These should match the document itself, and not be generic (some engines penalize you if you have keywords that do not appear in your document). It is a paint to add the tag in the HEAD section (via advanced button) when creating the document, and with the domainname hack I did it would allow for things like http://article.keyword.domain/ which goes to the correct place. So I was thinking about:
mysql: alter table cms_pages add keywords varchar(255);
then in lib/functions.content.php add the code to put them in a meta tag (add it to the headtags var that is already there and does the replace). The only other parts are fairly simple in terms of updating the database on addcontent.php and all to make a that is just for a comma seperated list of keywords.
I wanted to wait a little bit on this so that I could understand the structure of CMS better to avoid breakage, but this is something I personally want so it should happen soon.