So very tired

I haven't been able to sleep the last three nights, it's starting to catch up with me.

I don't know what's been up, I just haven't been able to sleep.  It wasn't too bad on Wed, I think I got to sleep about 2 and actually slept through till morning.  Then Thursday night I was up until about 4:30 then slept through until about 7:30 but stayed in bed until about 9:30, I actually fell back asleep for like a half hour and missed my first bus.  Then last night was the worst of all, I was up until at least 5-5:30 before I started falling asleep at all and as soon as I would slip under it would be like hitting a wall and being forced right out of REM sleep and waking up again.  I just couldn't shut my brain down at all.  I still can't shut it down, I'm tired as hell sitting around waiting for work to do to try and keep focused on coding something to keep me awake.  Actually looking at it I forgot my meds last night, that could have had something to do with it.  Oops.

I've been lucky that it's been slow at work so I haven't had a lot of stuff to do.  I've been working on my volunteer projects with the down time while we wait for design files on the next two projects.  I'm a little worried because we've been waiting several days now and haven't heard anything new on the deadline moving out and it was a little tight to begin with.

I'm making good progress on the volunteer stuff.  I like that I can work on volunteer stuff in my down time at work, it actually leads to some good stuff that I can use on other projects.  This week I got a lot more done for the blog layouts on the Occupy site and figured out how to do the calendar in a hidden tab on page load.  That was the main sticking point for me on both the Grease Rag and the Occupy sites - on the location / neighborhood pages I had to have the calendar visible on page load otherwise it would not actually show anything.  The div would just be completely collapsed and not have any events.  I ended up having to go to a custom tab javascript instead of using jquery tools tabs like I usually do, running one set of tab code on all the other tabs besides the calendar tab.  Then I tried running the initialization code simply when you clicked the tab the first time but that didn't work.  Turns out that the calendar has a method 'render' that you need to call when you are doing tabs.  I actually had filed a support request on this one but ended up figuring it out myself.  With most of the bugs with Items Calendar I think I've ended up submitting a code patch with the support request.

I actually had to file a support request on Discussion Forums package on the Occupy site too.  I was adding discussion pages to my site but they had no topic list and I was confused as to what it should be set up as.  I thought there was supposed to be an iframe showing the forum topic list because there's an iframe in the source code.  Turns out what was really happening was that since I hadn't installed sample content the default content for the discussion page type didn't get created - there was supposed to be a topics list in the "Main" area.  I reinstalled a new site with sample content and started adding in everything over again and the site is running a lot better - there were lots of little bugs in the last version that are all now gone.  So making progress on that one, I still have to do the members list and the map view.

Map view I think is going to work out very well.  I have a few different ideas for how this one should work, I think it's going to be super simple and flexible and also be a popular marketplace item.  The idea is going to be that you make a location attribute which can be attached to pages, enter an address and click 'geocode' and it would get you the lat/lng.  Once you have the address converted you can save the attribute and then you can use it in page list view to output a marker on the page.  The markers will have an html popup window of either whatever the page returns for the function get_map_popup_html() or the contents of a rich text page attribute 'map_popup_html.'   Then you just modify the page list block to accept a couple more parameters like map center and default zoom and you have yourself a neat way to make maps of your pages.  I think all of it should work together, I'm dying to get started on programming it but I have to finish up other stuff first.

I also figured out my first proof of concept coding on the final component to the Grease Rag website.  They have a ton of content coming from Wordpress and there was a slight problem with that - Wordpress has a function to go through and parse the posts for blank urls and try to use a service called oEmbed to convert the urls to actual images and videos from the respective websites.  All you have to do is copy the url of the page that is displaying the content that you want to display and it takes care of the rest of it.  Yesterday I got a library and a helper function and a custom template for the content block put together which does the conversion on concrete 5 urls.  I had to modify the regular expression to look for urls surrounded by paragraph tags instead of whitespace but after that it worked fine.  I put a youtube, a vimeo and a flickr url all in the same content block and it converted all of them to the correct things, after some futzing with vimeo to decode the html returned properly.  I don't know why, it seems like each provider of an oEmbed service seems to implement it a little differently so I might have to do some more futzing around with the library that I found to expand it.  Supposedly it works with a service called that does a bunch of services so hopefully I can get that portion working as well, do a couple of manual integrations for the more popular services and then if you need more you can sign up for a monthly plan from  I might actually just lose the main library that I'm using and switch over to only doing since it offers so many different providers.  The library for that service was quite a bit more complicated and not all that well documented from the stuff I could find.  I think after getting it working with one service though making it work with the other one will be easy.

So yeah, just massively tired, blogging instead of working because I can't really handle the complexities of writing code today.  Tonight is the Wheel Sexy Bike Smut screening, other than that I don't have any plans for the weekend.   I think it will be a lot more work on skins for Attributes Slider for the marketplace and work on the Constructo theme.  I'm nearly done with both of those and want to get them to the point that they're nearly ready for marketplace submission by the end of the weekend.  Hopefully I can do that, I'll feel good if I can get that accomplished.

Now if I could just keep my head out of these negative cycles that keep me up until all hours of the night maybe I'd be doing OK.

blog comments powered by Disqus