As reported in the last post. I failed to install Elgg yesterday at http://terrywassall.org/elgg/. Since that post I tried to fix things by messing about with some of the settings and now I can’t log in! I shall be going for the equivalent of the ‘turn it off and on’ PC fix and so a complete reinstall ans start again.
Before that though I have tried another install in a subdomain of another web site I have – in elgg.terrywassall.net. This time I set up all the folder permissions so that the Elgg install script could create the necessary settings and configuration files automatically. This worked fine and all I had to do was fill in the database info and the path to the /data/ folder I had created. This is where things went wrong. The /data/ directory has to be created outside of the install path, i.e. in this case not in /httpdocs/, the document root of the subdomain. However, I found I did not have permissions to create folders at the same level as /httpdocs/. So I created it in /httpdocs/ and hoped for the best. I understand that you shouldn’t do this for security reasons. When I had filled in all the details required in the system settings form and clicked save I got an error message saying that the /data/ directory must be outside the installation path and that was that. I have now contacted my ISP and asked them to either give me permissions or to create the /data/ directory for me.
Attempted this evening to install elgg in http://terrywassall.org/elgg/. As you will see, there is no formatting and, although I am familiar with earlier versions up to 0.8, I cannot find how to find or change themes in the default installation. I assume it comes with at least 1 default theme. I understand themes are listed with plugins but there is nothing in the plugin list that sounds like a theme.
Up to this point installation went well. I downloaded and unzipped the files and used ftp to upload them into terrywassall.org/elgg/. I created a database and user as required. I created a data directory outside of the elgg root directory http://terrywassall.org/data/ and set the permissions asked for. Then I navigated to http://terrywassall.org/elgg/ and the install script ran as I had expected. I manually created the .htaccess and setting/engine.php files copying and pasting the text the installation script gave me. Then, on refreshing the browser to bring up the log in page I registered a user. According to the installation instructions the first user registered becomes the site admin. Having registered I logged in and enabled all the plugins that come with the install package. After spending an hour trying to work out if I could activate a theme and looking on the web for information I have given up for the evening. I’ll try again tomorrow and see if I can locate some help.
I’ve been trying to work out the best way for contributors to be able to post to our Public Sociology blog so that the public cannot see them but other logged in users can both read and comment as part of the editorial process. I found that posting as draft was no good as you could not add comments in preview. Preview is the only way of viewing a draft post. If you add comments and save the screen goes blank and the comment is not saved.
So at the moment the procedure I have recommended is to post as private. Commenting is then possible in the normal way and editorial comments will be deleted before a post is made public.
However, I then discovered this method of making draft posts commentable:
http://wordpress.org/support/topic/296618 (many thanks to jberculo for posting this)
It involves changing a line in the wp-comments-post.php file.
do_action(‘comment_on_draft’, $comment_post_ID);
is changed to:
do_action(‘pre_comment_on_post’, $comment_post_ID);
and the following
exit;
is removed
I have tried this in the wp-comments-post.php for Public Sociology and it works fine. Comments can be added to draft posts. I copied the original wp-comments-post.php as wp-comments-post-original.php before making any changes.
The problem with this is that it is a hack and would have to be repeated if wp-comments-post.php is replaced during an upgrade. Is there a better way of doing this, a plugin perhaps?
As mentionned in the previous post I spent some time editing the home.php file of the default theme of the WPMU installation but in the end decided to change the theme to Tarski for the main blog. This looks very nice. It hasn’t got the display of recently updated blogs but this is not an issue for the moment and I assume I would be able to achieve this with a plugin of some sort.
One of the Tarski options is to upload a custom header image. However, despite increasing file permissions to the apparently problematic directories, as identified in the error message below, I could not upload an image.
Unable to create directory …………../wp-content/blogs.dir/1/files. Is its parent directory writable by the server?
I noticed that under Tarski options there is displayed a number of alternative headers pre-installed. I located the folder these were stored in and uploaded my custom header there using ftp. It was not listed and available for selection until I had also created and uploaded a 150×150 thumbnail for it with the required file name. Once this was done I could select the required custom header image and all was well. Perhaps uploading an individual custom header files using the custom header option doesn’t work with the theme in a WPMU installation. I have tried to do this with a test blog and it doesn’t work there either. If I can’t get this to work then users will only be able to use header iamges I have uploaded to the theme header folder.
I have spent some time playing with the home page of the default WPMU theme. It is a file called home.php in the themes/home/ folder. I made a copy of the original home.php which I renamed home-original.php just in case I messed up. The default home page displays recently updated blogs and an invitation to create a new blog, an option I have turned off. My edited version just removes the spurious text and links. Still looks pretty ordinary so will change it for one of the other themes I have now uploaded.
The default home page on installing WPMU is a little plain and one of the first things one might think about is changing to another more attractive theme. Apart from this it would be good to offer a reasonable range of themes to users for their own blogs. However, it seems not all WP themes work successfully with WPMU so it is essential to test them before activating them for other users. This is a short list of themes I have come across so far looking through the WPMU chapters in the book WordPress for Dummies, the WPMU Tutorials site, and WPMU.org.
http://tarskitheme.com/
http://cutline.tubetorial.com/
http://www.darrenhoyt.com/2007/08/05/wordpress-magazine-theme-released/
http://themasterplan.in/tma
http://www.smashingmagazine.com/2008/10/20/cellar-heat-a-free-wordpress-theme/
http://wordpress.org/extend/themes/doc
http://wordpress.org/extend/themes/emptiness
We are currently playing with a WPMU+BuddyPress installation and I have discovered a theme that emulates to some extent the Ning community platform. This would be fantastic but it looks like it’s a paid for theme.
I’m slowly getting my head around WPMU. It looks like the original installation is a blog, of course, a sort of mother blog. In fact it is likely that WPMU could be used as a WCMS just like the ordinary WP with the option of not using the blog facility at all, or subordinating it to another page, and having a series of static pages with one of them as the home page. If this was installed in the web site root then a series of client blogs could be set up as pseudo subdomains. So, for instance, a WPMU web site could have a url like terrywassall.org with a blog and static pages but, as it is a WPMU installation lots of other blogs could created like user1.terrywassall.org and user2.terrywassall.org. I assume that WPMU woudl make just as good a WCMS as WP. Of course this would not be worth doing unless a number of client blogs were needed as well.
Up to now I assumed the only reason for registering a new account in WP without starting your own blog was so you can be a joint author for someone else’s. Playing about with my own WPMU installation reveals another possibility. If you register a new account as part of creating a new blog your blog name (the bit that ends up as part of the url) and your username will be the same. So if you create a new blog called testblog for instance and register as a new user your username will be testblog as well. However, once you have registered as a user you can create more new blogs and log into them with the same username and password (assuming the admin options allow this).
If, on registering a new account, you choose the create a user name only option and then log in to create a new blog you have bypassed the necessity of creating a blog with the same name as your username. Creating a new blog as an already registered user gives you frre choice of a blog name without it becoming a user name.
Once you have created more than your initial blog you have the option of changing the designation of your primary blog, by default the first blog you create. I assume if you do this it is possible to delete your original blog if you wish as your username is independent of any particular blog.
I created the first new blog in my WPMU installation by turning on the option to allow user and blog creation. I then logged off and went through the procedure for a visitor to create a blog. This worked fine. I then turned the option for creating additional blogs and users off.
The next step was to try creating a new blog manually as admin. I created a new blog and entered the same email as the first additional blog so that a new user would not be created. If I had entered an email address that was not already in the database apparently a new user would be created (presumably with the blog name – the bit that forms part of the blog url – as a user-name) and an activation email would be sent to that email address.
When I viewed the new blog I got the ‘not found’ page. When I logged out as admin and back in with the user-name and password of the new blog’s user I had the same problem. The new blog was listed under ‘My blogs’ but wouldn’t open. I logged back in as admin and deleted the new blog, went to the options page and turned on the option to allow user and blog creation. I then manually created a new blog and this time it worked fine. The lesson seems to be that the create blog option needs to be set to on for admin to manually create a new blog. If this is correct it is a bit of a pain as, if public blog creation is to be disallowed then the option will have to be turned on and off every time admin wants to create a new blog manually.
Day 2(6/11/09 17.13): Failure! Tried to create a new blog called testblog and expected to get a url
terrywassall.org/blogs/testblog/. However the email sent to me with the activation link took me to testblog.terrywassall.org/blogs/ and when I clicked on it I got the Not found: The requested document was not found on this server page. Did I forget to choose the sub-directory option when I installed? I guess I’ll have to try again. Blast!
However, reported problem to Twitter and Andrea came up trumps again! Her reply said “make sure VHOST in config file is set to no.” I remebered this is a line in the wp-config.php file that I had inspected yesterday to see what the installation script had produced. However, I was not able to edit it. The file was associated with a group and user called ‘apache’. Not sure what this means, but it certainly isn’t me. In the file VHOST was set to yes so needed changing. I got round this by copying wp-config.phpto another file with another name and editing it. I then renamed the original uneditable wp-config.php to something else (I was a bit surprised it let me do this) and renamed the edited copy to wp-config.php. I have no idea if this will have any unanticipated consequences. However, I created another new blog, testblog2, and the url returned to me in the email was terrywassall.org/blogs/testblog2/. When I clicked on the activation link all went well and when the following email arrived with a password I could log into the new blog. Fantastic!
I would like to thank Andrea for her generous help via Twitter. Two absolutely key pieces of information she shared with me undoubtedly saved me a lot of time and trouble. Next time I’m in your vicinity Andrea expect flowers, chocolates and one of my best jokes!