Using HTML tags in PHPDoc blocks
June 25, 2008 on 7:14 am | In PHP | 8 Comments |As my involvement in the dev side of WordPress grows, I’ve been working on increasing the PHPDoc comments through the major parts of the code. A particular challenge I stumbled across today was trying to talk about certain HTML tags in the comments in a way that they wouldn’t then be turned into the actual tag when phpDocumentor ran.
So basically I wanted to say something like
This function returns a properly formatted <pre>…</pre> block
However I found that doing that caused the <pre> tag to be used as part of the page when the docs were transferred to the HTML format.
The solution I discovered was to reference the tags as <<pre>> or <<br />>. This seems to preserve the tag in the finished documentation as a comment and not part of the page.
I struggled to find this in google, so though a little blog post might just help someone.
Quick test
June 22, 2008 on 11:38 am | In Geeky | 1 Comment |This should hopefully go to twitter?
——
Indeed it did. The plugins that finally got my setup here are Twitter Updater and Twitter Widget Pro. Took a while to find plugins that were 2.5.1 compatible but these do the trick.
——
Also, I’d highly recommend Fluency Admin which makes the wordpress admin screen a whole lot neater.
——
This also means the next post wasn’t result related. Oh well.
“It’s tomorrow?”, “Oh shit…”
June 8, 2008 on 8:30 pm | In Geeky, Uni | 2 Comments |Yes, it finially is tomorrow and am I ready? No idea. I think and certainly hope so but I can never really be sure. I could probably not have done much more in the way of working for it, although I did retreat home today for a BBQ. That might not have been the smartest move and I’m sure if I do fail some of the blame will go there but I honestly needed to relax and forget about medicine.
I’ve planned to head to the swimming pool (or certainly the sauna) straight after before heading into the SL to revise for the one on Tuesday. This will hopefully calm me down from what I expect won’t be my most enjoyable 2.5hrs.
Whilst I’m trying to work out what is coming up in my exam, the rest of the world’s geek community seems to be trying to work out what’s coming up in the new iPhone, suggested to be revealed in Steve Jobs’ keynote at the Moscone Center tomorrow. So far I’ve heard rumours that it’ll be faster (3G, almost certainly), thinner, cheaper (interesting one for me!) and colourful. I may end up buying a iPod Touch over the summer but if any and ideally all these rumours are true I may just head for the iPhone. The fact my current phone is less than a year old makes me realise just how much of a geek I really would be.
Still though….the iPhone….
Simple things
June 4, 2008 on 3:38 pm | In Geeky, Uni | No Comments |With 4 and a bit days to go till my exams start today I finished my final PBL scenario of the year (alcoholic liver disease). Personally I considered it a horrid final scenario but wonder if the idea was to put us off drinking too much following the exam. Good luck.
Whilst finishing the questions I came across a sentence about liver function tests that I felt just had to be explained like so:
if ($g_gt > G_GT_NORM) AND ($alk_phos == ALK_P_NORM)
{
$patient = “boozer”;
}
else
{
$patient = “complicated”;
}
die($patient);
I felt like I needed to come on here and reflect upon the sadness (and difficulties, I made many mistakes!) of writing code in my notes. In conclusion I’ve decided the stress has finally got to me.
Leave a comment on Simple things…
The importance of the web
February 18, 2008 on 7:34 pm | In First aid, Geeky | No Comments |Personally, I would say the internet is one of the most important mediums these days. Access is almost national and an organisation that didn’t have a web site would probably look rather silly. I’m sure most people would agree with me so far.
I wish St Andrew’s would.
The main site is pretty decent, a few technical errors but the content is good and pretty up to date. It provides a reasonably welcoming approach to volunteering and details of where people can go to find out more.
If you move from here onto the Glasgow Executive site then already the colours have changed, layout is different and personally it just doesn’t look as good. However, you’re going to have difficulties getting there anyway as the main page does not link to the Exec one. This sublevel is also not quite as up to date and certainly doesn’t have a very welcoming spiel for potential volunteers.
If we go even deeper into the actual company level, you’ll only find a few with proper web sites. Even then there are those with web sites and they have no incoming links. At this stage the layout resembles nothing of the main page and could be way out of date. The majority of them have no attraction for potential volunteers save perhaps an email address.
Ideally there should be some uniformity. I’d also like to see the same colours preserved across the sites, making it obvious that they’re all St Andrew’s. Further, there should be a contact form, as well as an email address, for potential volunteers. Further things such as calendars (which need to be up to date or are pointless) and pictures do nothing but add depth and hopefully spark interest.
I feel that St Andrew’s is very much an “old man’s” company. It’s resisting change as much as possible by sticking to phone numbers and sparse web sites (amongst other things). If it was to modernise just a little bit, it may bring in younger members who’re more enthusiastic about doing duties.
I really like the Grampian site - it looks by a large a lot more professional than the others and yet isn’t difficult to use. It’s also up to date (ish) and has a generally inviting feel (you can disagree with me if you like).
However my favourite so far has to go the Durham LINKS site. It’s a St John’s page so I’m slightly cheating a bit but to me it’s using the net to its best.
I have volunteered to help my company with the website but I’ve got no response. Maybe that’s a good thing as I’d be overly tempted to turn it into more than it probably should be. Then again, since our latest member found us on the web (though not the company site) maybe I’ve got a decent point?
Ultra sync
November 20, 2007 on 2:00 pm | In Geeky | 5 Comments |So for the last well…24 hours or so…I was thinking it would be really quite useful to have my calendar on my new phone (6500 classic) sync’d with the one on iCal. Even more useful would be having that also sync’d with my Google calendar. So began the hours of googling required to find out if it was possible. It is, with some very cool (yet geeky) results.
First thing’s first is getting the phone and Mac talking. Bluetooth is the way I’m going for that, cables are so last year. OS X also has iSync, which is pretty much what it sounds like - it syncs a large variety of devices with the Mac. Unfortunately mine wasn’t supported (it’s a new phone, perhaps that’s why?). Roll on Nova Media and their plugins. They had one which got my phone compatible with iSync. Unfortunately I had to fork out an, all be it small, fee for this.
This is then the easy bit where I click on the nice sync button and magically everything from iCal goes to my phone, all my phone calendar stuff to iCal and the address books sync as well just for giggles.
Sorted.
Set two of getting things from iCal -> gCal and also gCal -> iCal proved pretty difficult. You can quite easily subscribe to a feed in iCal which gets things from gCal. Unfortunately you can’t easy take things from iCal and automatically get them into gCal, unless you do it manually. I managed to find two hopefully looking pieces of software to help me out. GCALDaemon and Spanning Sync. GCALDaemon is freely available, whilst Spanning Sync gives 15 day trial followed by a $25 fee for a year.
At the moment I’ve went for the 15 day trial of Spanning Sync. I probably won’t keep it after the 15 days though when I’ll give GCAD a go and see if it does it just as good.
Spanning Sync was pretty easy to set up via system preferences and doesn’t need much explaining from me. I have it running every hour which is more than enough for me.
The last part of my puzzle was to try and get iSync to run without having to open it every time myself. After a long while of searching I came across a beta application knows as Home Zone. This simply performs actions whenever my Bluetooth device (phone) enters or leaves its detection. I have it set to run iSync (a built in option) when it enters the zone. This stops needless running of iSync when the phone isn’t around or Bluetooth is off.
Other software, such as Sailing Clicker exists and is perhaps a little more stable (as well as greatly more functional). Sadly this didn’t work with my phone and cost yet more of my limited cash funds.
So there you have it, phone < -> iCal < -> gCal. Just what I wanted and hopefully will be of some use to others.
I’ve took Home Zone a little further with some Actionscript so that when I leave my room iTunes pauses and the screen saver is activated. When I come back the screen saver drops, iTunes plays (there was no built-in unpause in Home Zone, Actionscript required) and iSync runs. Confused the hell out of my flatmate the first time I did it.
Design troubles
August 11, 2007 on 4:38 pm | In Geeky | No Comments |Web standards are great. Really, they are. You don’t design a paper or magazine with tables so you shouldn’t use them to design a site, should you? This is what an expanding group of people have been saying for a while now, trying to get us to listen. They advocate the use of divs and CSS to make websites which in theory sounds great - tables take up a lot of space in the markup compared to a simple div.
Practically this isn’t quite so simple. One great example is a site with a column or two. Ideally they should be equal height and have different backgrounds. This is simple enough via tables as the row will expand to fit the largest cell and the background can be changed in no time. The problem with DIVs however is that they will only be as high as needed to fit their content. Thankfully a few clever people have come up with certain ways to almost fix it - a smart border/margin hack and “Faux columns”. The latter only works well on a fixed width which I can’t really live with (especially if I’m on 1280×800 and I need to accommodate for people on 800×600).
The former does work quite well and I’ve decided to go with it for now. I have to sacrifice a fair bit though (I can’t have borders for example) and it doesn’t look as well as it could’ve done on tables. The main point then is whether I should be giving up on artistic aspects to reduce page size and conform to standards or go back to “the bad old ways” as it is often quoted.
The future is bright though with CSS level 3 including multi-column support. Sadly, this has been in development since 1998 and doesn’t look like it’s going to be out for a while. After that we’ll need another decade or so before we can safely use it without worrying about browser incompatibilities.
Sigh.
MacBook on it’s way
July 5, 2007 on 11:01 pm | In Geeky | No Comments |Yes, I bought one. ![]()
Been dispatched, expect delivery tomorrow (we’ll see).
Getting a laptop
July 3, 2007 on 2:19 pm | In Geeky | No Comments |I need a laptop. Ok, so maybe I don’t need one, but I want one. This is a struggle I’ve been fighting over for a year and each time have decided to put away the money and wait till later. Not quite sure what I’ve been waiting for, but now I want one. The problem is, what to get. I could:
- Wait, get a job and be able to buy one without going into savings.
- I’ve been waiting all year, it’s time to buy one!
- Get a PC
- Get a Mac
The PC/Mac choice has been killing me for a while now. PC is by far the cheaper option and I’m certainly familiar enough with them. I could always slap on some misc Linux distro and be Windows free. The problem there is iTunes. Despite everything there isn’t really a Linux equivalent and emulation doesn’t work nicely (as far as I’ve tried). I have a fair volume of DRM music on my iPod (yes I know, how stupid of me) and it won’t work without iTunes. This pretty much rules any Linux version off my choices.
What about Vista then. It’s alright, nothing spectacular. More of a fancy graphics display which takes up a lot of processor power than anything else. It’s something I’m familiar with and wouldn’t really have any enjoyment tweaking it on a brand new laptop, since most of them will include it. I also find a lot of the PC laptops are pretty damn big and ugly. My mum got a 15″ Dell not too long ago and it’s enough to it carry around a house, never mind elsewhere.
A MacBook, however, well they look damn cute. At only 13″ it’s a little bit smaller. I’ve also not used Mac OS for years (we have a OS 8 Power Mac upstairs that’s heading for the dump rather soon). This would give me something to learn and explore which I haven’t had for ages. iTunes would also not be a problem. If the worst came to be and I hated OS X (which I doubt), I could simply run Vista via Parallels or Boot Camp. Sorted!
Not quite.
I’m struggling between the colour of my MacBook - black or white?
Black looks damn sexy and is rarer too. However it does cost more and not always for a higher spec model. I’m keeping an eye on the refurb shop this week on Apple.com as advised (they have loads of good deals there) so we’ll see what happens. Also still waiting for the money to be transferred from savings.
At least I’ve finally got a move on. It’s only money after all. Leave a comment on Getting a laptop…
Even scanners don’t like Internet Explorer
April 22, 2007 on 4:15 pm | In Geeky | 5 Comments |Quite impressive actually, I’ve had Vista for some time now and only just ran into this problem. Well, maybe that’s being kind to Microsoft. I installed it at the end of February and sat about putting all of my needed programs on it, including Firefox. With FF installed, I never really needed to open Internet Explorer (IE) and ignored it. Occasionally a program would launch IE itself, upon which point I would be presented with an “Internet Explorer has stopped working” dialogue box and the assurance that “Windows can check online for a solution to the problem” - fine and dandy…except there was no solution.
This didn’t really bother me for the last 2 months, until today when I needed IE. Obviously since Windows couldn’t solve it, I’d have to do it myself. Taking a look at the detail of the error I found out that:
Fault Module Name: ophookSE2.dll
I’d never heard of it and expected to find Google telling me it belonged to Microsoft somewhere along the line. In fact, it was published by ScanSoft, Inc. This was a little bit more helpful, I had a scanner, a Canon, but would that really be causing the problems? A quick look down the Programs list told me that ScanSoft, Inc. were responsible for OmniPage SE - the OCR software that comes with my scanner. Since I don’t really use OCR that much, I was happy to uninstall it to check it was the culprit. Annoyingly, it wouldn’t budge as the uninstaller wasn’t designed for Vista (although the installer worked…typical!).
A little more Googling turned up this rather unhelpful page which provided the new software but told me I first had to uninstall the old version. I decided to try the new installer anyway, but it didn’t want to run at all. My temporary solution was then to rename the file OpHookSE2.dll (in Program Files -> ScanSoft -> OmniPageSE2.0) to something like OpHookSE2_.dll (shouldn’t really matter). I was surprised an happy to see that this was indeed a solution, and I now have a fully working Internet Explorer.
In the hope that someone else out there has similar problems, I’ve put this here.
—
After testing some OCR, it appears that this hasn’t affected the normal working dramatically, so I’m going to let it be. If anyone manages to get it working by installing the new software, do tell.
—
After leaving it a bit longer, Vista doesn’t like this missing dll too much and wants to try and install it every right click of an image. To get around this, I used ShellExView to remove it from the popup menu. You need to run this program as an administrator (right click on it in the start menu) or else it won’t work.
—
Thanks to a comment left below by Angel, the Canon USA website seems to offer Vista downloads. This may be the best option, but I haven’t tried it personally.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^
28 queries. 0.599 seconds.
Powered by WordPress.