Still a bit of a hack

madpride/index.php kept on being updated – and not a pword hack.    Inject preg_replace code!

There are spam links.   It is probably the Forum.     But all apps are being upgraded to the latest and this is a long process.

Zenphoto done

Blogs done 3.5  3.7  3.9  4.1  4.22

Ahah – been a week now and no horrible code added to index.php

A Hack Nasty Nasty – so updated to 3.3

Many hours spent on not only Mad Pride but most other sites at Dreamhost as well which were hacked good and proper.    Get the feeling that the Forum escaped much as did most of WordPress.   But there were some horribly altered php files.

Wisdom seems to be this was a recent exploit in Zen Photo – now upgraded.  Probably not Gallery.   If not Zen then one of these wordpress instances.    But there were two new php files I could not move copy or delete.  They were owned by other nicks – which were genuine Dreamhost users – so support told me.   And they were probably hacked.

Hopefully there is nothing lurking in the databases.  These were restored anyway.

WordPress updated to 3.01

Seems to have gone without a hitch
Just see if there is a theme upgrade Spotlight 13
And work on the MadPride theme.

Why are there 2 rss icons blocking things?   Plus there’s two About tabs as well.

Okay now update MadPride Blog

Then download the site to my PC – try to get things working at some point at Localhost

After the Meeting at Pogo’s

With a Campaign coming – time to update this site.

Believe, wordpress no longer contains a virus – appeared to be in madprideblog-13-Mod which Nod 32 was quite certain about.   Happens partly through not having upgraded wordpress.

I restored this file and about 20 others from 2009 archive.

Now – upgrade wordpress – pressing.   Backup databases.   Need to search locally for any unauthorized users.

probably upgrade Zen as well.

Then do the madpride index file.

Then put up the Forum.  BBphp will do fine.

Gigs

Next for 20 months we had some gigs.   So only the index page got updated.    But now some more action!

Bye Gallery – hi to zenphoto

Well just had to install Highslide js.   It is lovely to use and better than any slideshow.

There isn’t a plug-in for gallery2.   But the technique is to install Lightbox js – which takes a bit of doing.   Then uninstall it and install Highslide using the same technique.

It became obvious that although Gallery2 works out of the box – playing about with this leviathan is long-winded in the extreme.    No it has to go.

Zenphoto installs with about 3Mb instead of 50Mb.   Although documentation is lacking its easy enough to get along with.   There is a plug-in for Highslide or rather a theme which uses it.   That’s useful but it is an old version of Highslide.    Managed to update the theme and it works a treat – and even degrades gracefully in old browsers (and with javascript turned off).

Changed my mind about Javascript – you couldn’t do anything this spectacular without it really.

Aaargh-CSS-horror

Was just carefully finishing off the photograph pages when I checked them in Internet Explorer 6.    Hell – the menu doesn’t work.   It is spread vertically down the page and makes no sense at all.

What gives – it used to work?    And the Internet cannot help here either.   Tried all sorts of things and it boils down to this line of CSS.

<!–[if IE 7]><style>#p7PMnav a{zoom:100%;};#p7PMnav ul li{float:left;clear:both;width:100%;}</style><![endif]–>

More specifically still: #p7PMnav a{zoom:100%;}.   Knock that out and this massive problem goes away.   And like a lot of CSS there is no rhyme or reason to this.    The zoom property is not a CSS standard – it is a Microsoft only property.   Zoom 1 or Zoom 100% just means zoom to actual size i.e. what it would have been anyway.    But this usually fixes things apparently.

And  “if IE 7″ is a conditional statement that only Internet Explorer 7 is supposed to see.   So how come IE 6 sees it and it mucks things up?    No idea.    IE 7 however doesn’t seem to mind.

Tracking down mysterious bugs like these takes a strategy.   Knock out half the code, if not there, then put it back and knock out the other half.   Then a quarter and so on.

Gallery2??? I just don’t know

After a successful Mad Pride gig – from which there are some photos – I realised we maybe needed some kind of gallery software.

There are loads – Coppermine, ZenPhoto – and this one Gallery2.   Dreamhost has this as a one-click install so its going to be good (I’m now trusting Dreamhost’s judgement.

Right – straight away the full install takes 50Mb of space – which is huge for an online app.  That makes me very suspicious this is bloatware.

And it is.  But it is very widely used.  Trouble is when you have a vast army of people working on an app it gets like Windows – more and more things get added – it becomes unwieldy – much more likely to go wrong in ways which are insoluble.

And it is not very fast.

There are some pro’s though.  The carbon theme used here does look nice.

You can have people uploading.   It will embed in WordPress and phpBB.  Plus its not just for photos anymore – but will do video and hopefully flash audio as well – certainly does mp3’s.

Okay keep it under review.  The other one to try out is ZenPhoto.   Much smaller and trades on the fact it isn’t bloatware.

Another plus is that with some hackery – Gallery2 will work with the magnificent javascript tool Highslide.   That is a winning piece of software.

But building the madpride header, menu and footer into Gallery is by no means easy and resultant code is a horrible horrible mish mash.   Gallery uses loads of .tpl files which are written in Smarty.   Smarty doesn’t play nice with javascript, html functions or php.

Have a stylesheet which removes Gallery2’s header and logo by setting display to none.  Sheesh.

However I suppose I have to get to grips with Smarty – because phpBB (forums uses it and editing tpl files is a must.)   Therefore Gallery2 is good practice.

.htaccess

Ahah – now we’ve changed the Home Page from index.html to index.php and deleted the old page – links no longer work.   No real problem but the address of madpride.org.uk at http://madpride.org.uk/index.html gets a 404 error (file not found).

So just make a text file and name it .htaccess and upload it to the root of madpride.

It contains a line of Apache code:

Redirect 301 /index.html http://madpride.org.uk/index.php

And that works because the server always looks for the .htaccess file first.  Search Engines are happy with this too.

(This log is protected by an .htaccess file – in a different place)

To do next

Forums, photo-gallery, soundz and blog entries.

Next Page »