Welcome on Alexis’ Blog at Made to Order Software Corporation.
This is my first blog! I’m glad I got WordPress to work with the m2osw style sheet. It is quite different from the default blogging board setup! Also I needed to make it work for several people on the same website without duplicating the code each time.
I did make changes to the code in order to achieve this feat. First, I had to access a specific database for each person to have its own blog (this may be just me who did not know how to use all the available features of WordPress, though.)
The following function gives me the name of the blogger. From the name, I can generate a unique database name that the user access (for me, it is blog_alexis).
function get_blog_name() { $path = $_SERVER['REQUEST_URI']; $name = ereg_replace('.*\/blog\/([^/]+).*', '\1', $path); if($name == 'wp') { echo "'wp' is not a good name, sorry!"; exit(0); } return $name; }
Other changes involved mainly adding class names to auto-generated code. Most of the anchor generated by WordPress have no class defined. In order for these not to clash with the anchors used on the m2osw website, I added the “wp-anchor” class.
Of course, I otherwise created a specific theme to get all of that to look like the reminder of the corporate website. As time passes, I will certainly add more possibilities such as access to the archive, categories, etc.
Comments
Comment by moshu
Isn’t WordPress MU (=multi user) doing exactly what you just accomplished?
http://mu.wordpress.org
That's a discovery!
Ha!
Maybe it would be cool if that was mentioned on the home page of wordpress.org…
It indeed looks like what I have done, though, the hardest part was to make it function on this site making the style sheet work properly. Also, my small change for a small number of blogs works great…
Ah! Also, I want the same blogs at two different URLs. (/blog/alexis and https://www.m2osw.com/blog/alexis) and that does not work with the default siteurl option. This may be a bit peculiar, but I wanted the comments to be submitted on our secure website whether you are on the secure or non-secure site at the time you type in the comment.
Thank you for pointing MU out!
Alexis