Categories
Lent Mental Health web design

Possibly my Proudest Achievement – Friday – Lent 2014

Today, at work, I finally got the search on the work website working satisfactorily. It’s something I’ve been struggling with for an age and a half and there were no quick solutions anywhere online, the forums I asked gave no replies, but eventually I cobbled together the bits of php I needed.

None of this will be of any interest to anyone but I’ll carry on regardless (and not post anything too technical), below, bullet-pointed for convenience is the whole sorry story:

The Set Up

  • Our website is WordPress based with some bbPress forums (as part of the Commons In A Box plugin collection) forming a large portion of it.
  • Some of the WordPress side and most of the bbPress side is only available to logged in subscribers (who are all members of the resources centre).
  • The standard WordPress search only includes results from the WordPress side of the site but copes okay with excluding the members-only content.

The Challenge

  • We wanted everything to be searchable to users who were logged in and not to the general public.

The Problem

  • If we expand the standard search to include results from the forums, the members-only exclusion breaks down because bbPress wasn’t marking topics within private forums as ‘private’.
  • These returned search results for topics in private forums, showing the complete contents of the topic.
  • When the link back to the topic was clicked, the site would then go to an error page showing an unresolved ‘loop’ giving the (correct) impression that the site wasn’t working properly.
  • The bbPress search that appears on the top forum page returns results from all forums, logged in or not in a similar way to the WordPress search.

The Solution
This came in stages with snippets of how to do tiny little bits of it coming from all over the web with a lot of false-starts, swearing and imaginary hair-tearing-out along the way.

  • I worked out quite early on that it would be impractical to use the back-end to ensure that all topics inherited their forum privacy settings – especially as our members get to post new topics at will and we don’t have masses of time for moderation.
  • The first step was restricting the forum search to appear on each forum page by itself and only search within that forum (with a placeholder text saying ‘search this forum’). This eliminates the final part of the problem above but currently won’t search within subforums – I’d still like to find a way to do this but am happy to leave it as is given that the next steps have worked out as they have.
  • I redesigned the side bar to include a better layout, in different sections, with a separate forum search that only appears for logged in users. This was an okay work around as far as it went but was still irritating to have to have two separate search forms needed. This can be seen in action on my test version of the site.
  • The bit that has taken most working out was getting the main site search to only include forum results if a user was logged in – I reckon that combined with the new side bar, this should offer a workable solution to the problem as described.

Still to work on

  • It more or less does what I want it to, but is a long way from being ideal:
  • I have no idea why sub-forums and topics don’t inherit privacy settings or what I’d need to do to make the search exclude private forums unless a user was logged in.
  • Search results that are replies to the forum topics are listed as such but no other type of result has a prefix – I’d quite like the forums and forum topics to be identified as such rather than simply appearing as empty posts or posts respectively.
  • I’d like to have excerpts of topics from private forums show in the results with the link taking users to a ‘you must be logged in to view this topic’ message rather than the loop-error.
  • It would be fantastic if I could find a way to make the individual forum searches include the contents of sub-forums – this is the biggest problem that remains to be sorted but can wait – I’ve spent far too long getting this sorted and I have other work that needs catching up on.

So, there you have it – this has given me more relief than even completing the Giant Form of Doom and getting it handed in.

And I told you it would be dull.

PS if anybody’s interested, I can post about the php bits and pieces with credit to the various bits of internet they were learned about from.

Categories
Blogathon 2013 Mental Health

Why Mind?

I’m taking my first ‘freebie’ post to explain a little bit about why I chose to support Mind with today’s Blogathon.

Mostly because, although it is something that affects approximately one in four of us at some point, I have personal experience of the way mental illness can wreck your life. For the last Blogathon, I wrote a set of posts about my experiences with depression.These only got part way through the brief a sponsor had given me:

Write about depression with regards to:
How it affected me
What it felt like
How I rationalised it (at the time)
View of God at the time
How the above changed throughout the course of it
And how they are now, what’s changed esp. view of God and my life.

If I get round to it, I’ll maybe finish the lot off over the course of the next twenty four hours.

Since then, I’m another six years clear of where I was, but it was touch and go for a while. Basically, I wish that the kind of support that organisations like Mind offer had been as visible and accessible back then as it is now and if by promoting their work and raising money for them I can help make things less like hell for even one person then it’ll have been twenty four hours well spent.

Categories
Blogathon 2007 Mental Health

Depression Number 5: Drowning With Land in Sight

I left for university and forgot about being depressed for a while – the busy-ness of everything kept the wolves from the door. It soon got back to being fairly hell-ish. In lecture theatres and tutorials everything made sense, when I was busy doing something with friends everything made sense. As soon as things quietened down back came the nastiness, I couldn’t do any work by myself and for a year I let myself belief it was because I’d lost whatever talent I had for science. I transfered to Religious Studies in the summer, desperately believing that the change to an essay and reading based course (I’d been good across the board at school and maybe made the wrong choice back I chose three separate sciences at GCSE) might make all the difference. It didn’t – this time I lasted until Christmas and then couldn’t face the exams – I knew I hadn’t been able to do the work and didn’t know anything about anything we’d been meant to be learning about. A lot of the time I should have been working I spent staving of the wolves by doing anything with my mates – I made sure I had lots of people to be friends with and flitted from group to group but every night when things stopped…

Jon, I can’t write any more about this right now – I’m happy to finish the story later, and it’s once the stories finished that I’ll be able to look back and start answering your proper questions – if you want to have a look, I wrote a bit about that kind of thing once or twice in my livejournal: http://timbobaggins.livejournal.com/60283.html was the last entry I could find without going back years.

Categories
Blogathon 2007 Mental Health

Depression Number 4: Truth Dawns Slowly

When I was doig my A-levels I lived in a tiny village just outside Stafford*. Most of my proper friends were from outisde the village, and it was mostly through talking to them that I learned that there was a state of being mentally healthier than I was – no, that it wasn’t normal (in the best sense of the word) to be as messed up in the head as I was.

I also worked out that it wasn’t ‘normal’ to struggle as much with school work that I understood as I did.

By the time I was almost ready to go to university I got to the point where I talked to my GP about treatment for depression. They told me tha, yes I was depressed, but there was no point in them beginning treatment because it was likely that my university doctor would think differently.

I’d timed it to perfection.

*Stafford is often voted into the top ten most boring places in the universe, and I lived in the village where people went to Stafford for something to do.

Categories
Blogathon 2007 Mental Health

Depression Number 3: How it affected me

One major way was that I found myself unable to cope with doing things that were well within my capabilities unless I had a very close guidance and support – for example, with schoolwork, everything made perfect sense in the class-room as we were being taught, but the moment I had to do something by myself with nobody else around my brain shut down and there was nothing I could do to get it back online.  This is a problem I’m constantly working on, which has improved no end over the past year or so – partly through the support of colleagues at work, partly through working through a course of cognitive behavioural therapy and partly through sheer bloody-mindedness.

Another was in feeling completely isolated in nearly every situation in which I found myself – at home, at school, at Cubs then Scouts, at youth club – everywhere.  I had to work so hard to keep those feelings away that I would get caught up so utterly and completely in whatever I was doing, that everything else was kept out.  This was especially true of reading.  I loved books.  What was probably the hardest thing in the world to understand was how rotten I felt at things where everybody seemed to be having fun, and I just felt absolutely alone in the midst of these happy partying people – I felt the most different I ever felt at parties.

Because of the  lonliness, when I found somebody who was friendly I tended to become attached to them – I have no idea if it was to an unhealthy extent or not, but I do that it hurt like hell when nobody from what seemed like a good group of friends wrote back when I’d had to move away from the town where I did my GCSEs – I know I tried to persuade myself that that was because they were all busy with A-levels and stuff, but that deep inside I knew it was because they hated me.

Until part way through my A-levels I thought this was just the way I was – some people were happy people and I was a sad one and that was all there was to it.

Categories
Blogathon 2007 Mental Health

Depression Number 2

All that I’m claiming about my childhood was that I couldn’t deal with most of it at the time: anything I had a problem with must have been my fault, because grown ups knew what they were doing and the other kids were nice, and of course, any anger I felt must be entirely inappropriate – or anything else that wasn’t good and positive.

I’m sure that being bullied all the way through my school life, or the way that ever since I got to school, who I was, where I came from, how I talked set me up as being different from everybody else and paved the way for the bullying – I’m sure that things didn’t help and fed into a gradual building up of helplessness and self hatred which in turn fed into the despair that depression brings.

Jon’s Depression Questions:
How it affected me
What it felt like
How I rationalised it (at the time)
View of God at the time
How the above changed throughout the course of it
And how they are now, what’s changed esp. view of God and my life.

How can I see the purposes of God in allowing me to experience all of this.

Categories
Blogathon 2007 Mental Health

Depression Number 1

Jon asked me if I’d consider writing about depression as part of the Blogathon. I said yes.  He asked me several questions, which will be answered in the next few posts.

General disclaimer: What follows may not be suitable for anybody.

Until recently, I can’t remember a time when I haven’t been depressed. When I was five or six, I’d worked out that it was better to be dead than alive but that if I did anything about it then Mum and Dad would be upset and that wouldn’t be a good thing. Of course, when you’re five or six you tend to accept things are just the way they are and that whatever you’re going through is, at the very least, inevitable – if not quite the way things should be.

It wasn’t until I turned eighteen that I realised that the way I felt was something that I could get help for. Until then, things had been pretty bad – until tonight I’ve tried not to think too much about back then and it still doesn’t seem like such a good plan, but it’s something I need to face up to and I might as well do it for charity.