Categories
internets Vaping

PHP vaping forum sig banner code

So i recently created a banner for use in my forum signature for Vaping Underground. It’s dynamic; it displays how long it’s been since i’ve been quit smoking in years, months, and days, plus how much money i’ve saved in that time (with a rough accounting for how much i’ve also spent on vaping gear), and how many cigarettes i’ve avoided in that time also. There’s also a random quote at the bottom just for fun. Here’s what it looks like:

Message board vaping signature banner

Somebody asked me how i did it, so i posted the code there. I cobbled it together from code i found across the internet. Eventually i ended up replacing all the code i found with snippets from php.net. Note that this is really only for vaping enthusiasts.

This is probably very inefficient code. It’s… been a while since i’ve coded anything at all. As the Department of Homeland Security says, “If you see something, say something.” Feel free to alter it – i’ve licensed it under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

And here we go.

Categories
life local web design work

business as unusual

I have never been so busy in all my life – I’m currently writing code for (in no particular order) 1) myself, 2) a client, and 3) a prospective employer, and 4) may be starting with a new client soon. Of course, i’ve put everything else off this past week for projects i was doing for the prospective employer. So why am i completely, utterly broke? At least i know i’ll get a week’s pay for the two projects i did for the P.E. That won’t go far, since i have so much debt right now.

Unfortunately, one of the projects i did for the P.E. didn’t get finished on time, so i (more or less) owe them my time for free. It’s a Drupal theme. It’s terribly difficult to make a Drupal theme in one week, especially when that’s only one of two projects they assigned to me! So now i have to finish that – even though i will probably not be hired now because i wasn’t able to complete it on time.

The upshot of this is that i learned a lot about Drupal in a short time, and reacquainted myself with Flash (actually Swish) and actionscripting.

I have decided that, even though i am impressed by Drupal’s extreme versatility, extensibility, and scalability, and really like the Zen theme base, i do not like the theming system much (at least not in 5.x, which is what i had to use for this project – though maybe the problem is a Zen-theme thing). The problem is that the theme code does not appear to be separated by admin and frontend, at least not obviously. So when i change a page, i also change the admin section, too. Obviously, that’s not great, and has been my stumbling block, keeping me from delivering on time. Thankfully, you can easily separate the homepage from the inner pages, but it seems like you have to code for every single inner page if you want to separate it from the admin section. Maybe i’ll figure out a better way around this, as it just doesn’t seem right. Not by a longshot.

Oh, how i wish i could be working with WordPress instead! WordPress has such a better theming system, though perhaps not as robust as Drupal. (Holly actually found me a two-week-old job listing on Craigslist for a job working with WordPress and Joomla!, but i fear i am much too late for that omg perfect gig. I need to keep up with Craigslist more!) 

One thing’s for sure: i am pushing myself way beyond my physical limits. I’m apparently sick now, my throat feeling like phlegmy gravel and a nasty cough wracking my body every so often. In my over-the-counter coma induced earlier this evening i think i overheard Holly talking to someone about the bags under my eyes. I can almost feel my hair turning gray right now.

So, to sum up: i am putting myself through hell. I need less projects and more pay.

(It seems like right now in Dayton, nobody’s hiring, and everyone wants a massive discount on services, if not an outright free pass. What businesses remain here have that leverage, too, since damn near 8% of the city is now unemployed. An unemployed web designer has gotta do what an unemployed web designer’s gotta do.)

Categories
uncategorized

business as unusual

Originally published at jeremyjarratt.com. You can comment here or there.

I have never been so busy in all my life – I’m currently writing code for (in no particular order) 1) myself, 2) a client, and 3) a prospective employer, and 4) may be starting with a new client soon. Of course, i’ve put everything else off this past week for projects i was doing for the prospective employer. So why am i completely, utterly broke? At least i know i’ll get a week’s pay for the two projects i did for the P.E. That won’t go far, since i have so much debt right now.

Unfortunately, one of the projects i did for the P.E. didn’t get finished on time, so i (more or less) owe them my time for free. It’s a Drupal theme. It’s terribly difficult to make a Drupal theme in one week, especially when that’s only one of two projects they assigned to me! So now i have to finish that – even though i will probably not be hired now because i wasn’t able to complete it on time.

The upshot of this is that i learned a lot about Drupal in a short time, and reacquainted myself with Flash (actually Swish) and actionscripting.

I have decided that, even though i am impressed by Drupal’s extreme versatility, extensibility, and scalability, and really like the Zen theme base, i do not like the theming system much (at least not in 5.x, which is what i had to use for this project – though maybe the problem is a Zen-theme thing). The problem is that the theme code does not appear to be separated by admin and frontend, at least not obviously. So when i change a page, i also change the admin section, too. Obviously, that’s not great, and has been my stumbling block, keeping me from delivering on time. Thankfully, you can easily separate the homepage from the inner pages, but it seems like you have to code for every single inner page if you want to separate it from the admin section. Maybe i’ll figure out a better way around this, as it just doesn’t seem right. Not by a longshot.

Oh, how i wish i could be working with WordPress instead! WordPress has such a better theming system, though perhaps not as robust as Drupal. (Holly actually found me a two-week-old job listing on Craigslist for a job working with WordPress and Joomla!, but i fear i am much too late for that omg perfect gig. I need to keep up with Craigslist more!)

One thing’s for sure: i am pushing myself way beyond my physical limits. I’m apparently sick now, my throat feeling like phlegmy gravel and a nasty cough wracking my body every so often. In my over-the-counter coma induced earlier this evening i think i overheard Holly talking to someone about the bags under my eyes. I can almost feel my hair turning gray right now.

So, to sum up: i am putting myself through hell. I need less projects and more pay.

(It seems like right now in Dayton, nobody’s hiring, and everyone wants a massive discount on services, if not an outright free pass. What businesses remain here have that leverage, too, since damn near 8% of the city is now unemployed. An unemployed web designer has gotta do what an unemployed web designer’s gotta do.)

Categories
creative internets web design

Cheaters, etc.

Here’s a list of cool resources for web design and development, including cheat sheets galore.

I’m sure there are more I have bookmarked somewhere. I’ll add them as i find ’em. Enjoy!

Categories
uncategorized

Cheaters, etc.

Originally published at jeremyjarratt.com. You can comment here or there.

Here’s a list of cool resources for web design and development, including cheat sheets galore.

I’m sure there are more I have bookmarked somewhere. I’ll add them as i find ‘em. Enjoy!

Categories
uncategorized

web design rant

OK, so i’ll admit two things.

1) that i have not updated my WordPress installation, nor fixed the PHP in my totally custom theme to work with PHP5. This is a major headache for so many reasons, not least of which involves time. That’s why it looks super ugly right now.

2) that i have not created a web site in many moons. This means there are a lot of things which i have not yet had to deal with extensively. I’m talking to you, IE7, and your diabolical hasLayout bullshit.

Right now i’m working on a web site for an old friend who has a desktop publishing business. It’s a WordPress site, because that means she can update it herself and not have to pay a schmuck (hello!) to do it for her. So i’m making a theme that matches her design, and it’s not been easy.

Thanks to every single goddamn iteration of Internet Exploder rendering pages completely differently than the others, because of wildly varying degrees of standards compliance, there are now so many bugs to work around that it’s actually no longer fun to make a web site.

To wit:

I have a floating element, followed by a fixed element, on the page. Unless i take out the float, the fixed element completely disappears in IE7. WTF. But when i remove the float, the layout goes all wonky because IE7 measures things differently. Which means i’ll have to bugfix that, which will no doubt screw things up in IE6. Did i mention that IE8 will probably make all of these endeavors even more stupefyingly, insanely complex?

All because Microsoft has got to buck the convention and do their own thing… which i would normally applaud, if it wasn’t so idiotic a thing to do when we’re dealing with a medium which exists on so many different platforms that standards are an absolute necessity.

So fuck you to Microsoft, yet again.

And seriously, to all of you cavepeople who are STILL using Internet Exploder… why? Why, why, why???

Categories
internets uncategorized

¡¡noʎ dı1ɟ

.pı1 ɹnoʎ dı1ɟ 11ıʍ ʇɐɥʇ ǝbɐd ssɐ-1ooɔ ɐ s,ǝɹǝɥ

Categories
internets uncategorized web design

IE6 users

I am aware of a problem with viewing this site through the narrow and unrefined lens of IE6. I have a fix for it in mind and will implement it as soon as we are done moving and settled in.

For now, why not get the juicy taste of the Twenty First Century in your mouth with a shiny new web browser? They’re Box Modelicious!

Firefox | Opera | IE7 | Safari

Categories
internets web design

Know Where You Laid Each Part

One thing about PHP is that it can get pretty complicated. CSS can get complicated enough on its own, with one class referencing any element on the page, pointing here and there. But when you combine the two… you’ve got something pointing to something which points to something that’s pointing at a thing which references anything you choose. See how crazy this stuff can get?

What I’ve been doing the past couple of days is turning my CSS files into dynamic style sheets, renaming them with .php extensions and serving them up, after preprocessing, as CSS. Doing this allows me to use a thing called a sniffer which looks at the User Agent string browsers send when doing HTTP requests to servers, which allows me to see to what I’m delivering content, $Browser on $Platform (e.g., Safari browser on Mac OS X), so that I can send either PNG images or GIFs. The only real reason for doing this is just because PNGs can be semi-transparent, except that all but the very latest Internet Explorer beta have serious problems reading semi-transparency (called “alpha” transparency).

This is something of a specialty of mine. For those who know me online, my old site was one of the first wave of sites to use semi-transparent backgrounds.

Like I said, this is complicated stuff. So now I’ve got a sniffer going “if $browser equals ‘IE’ on Win, set $imgExt to ‘.gif’, otherwise set $imgExt to ‘.png'”. And then I’m making a PNG and a GIF for every background that I want to see through. Meanwhile, all three subthemes have got several places where they reference $imgFileXX.$imgExt for different backgrounds.

So I’m pointing, and I’m pointing, and I’m pointing, referencing this variable to get to that variable to get to an image file to put in an element. Up until this very moment, I was doing all this without a particularly coherent strategy. That changes. Now. Because I only just now realized that I had been rearranging things trying to come up with reasonable alternative GIF images to send to Infernal Exploiter versions less than 7, and I’ve turned around at noticed that I have left one hell of a wreck in my wake. I now have way too many unused background images (failed experiments), and have tossed the variables standing in for the filenames like so much salad, resulting in a chaotic mess for all the good browsers out there who actually know how to deal with PNG images!

Guess you’d have to be there.

So tomorrow, I’m going to sit and think and make a god damned chart, so I can have a set pattern across all subthemes (e.g., Image5 is for alternate comments, Image10 is for the post background).

As they say, hindsight is 20/20.

Oh, btw, I’ve named the first three subthemes “Leather” (brown and tan spaceship interior), “Saturn” (white, black, and dark teal; very clean and high-contrast), and “transmothra 3.0” (black, smoky indigo, and blue) (this last being a bit of an homage to the final version of my very nicely done old site, thankyouverymuch).

Now that I’ve said all that… it’s probably going to be another week before this thing is actually ready enough to be unveiled. It’ll be worth the wait, I promise.

Sigh.

Categories
internets uncategorized web design

Soon, a big urgent wish fast attained

I really only have one thing left to do before I upload and activate the preview of the Big Urgent Wish WordPress theme. It’s a bit of a killer. It’s actually quite easy, but the logistics are making me swoon a bit just now. Mind you, once I have it all down, the installation will be a breeze for anyone familiar with the mind-bogglingly super-easy process of downloading and using a new WordPress theme. (The basic gist is this: download a theme, upload it to your Themes directory, and then activate it. That’s all there is.)

Here’s what I gotta do: because my theme uses semi-transparent PNG graphics for backgrounds in some places, any version of IE under 7 will not display them properly. Therefore, I have a browser sniffing PHP routine to determine what, exactly, the platform/browser are… and, hence, what the User Agent is capable of supporting (assuming UA string spoofing is not taking place).

Thus, by renaming *.css files as *.css.php (the “.css” bit is unnecessary but useful), and by parsing those files as CSS (after, of course, being processed as PHP), I can substitute GIF images instead for the crippled masses.

However, this entails a bit more typing and rearranging than I care to stomache today, so I will put it off until tomorrow (a day off from work).

Incidentally, the name “Big Urgent Wish” came to me one day as I was at my day (read: night) job (answering e-mails for a big-name online fashion retailer), extrapolating on some of the strangely translated phrases we sometimes get from non-English speaking customers abroad. This is not a phrase that was directly written out by anyone, it’s just something I thought up while trying to come up with something to top a goofy phrase I once read. As an aside, I embrace non-English speaking peoples… and, equally, the unusual and poetic, evocative turns of phrase that they can sometimes be capable of producing. Isn’t language even more wonderful from alternate angles?

Categories
creative internets uncategorized web design

Big Urgent Wish coming together

Big Urgent Wish 3.0 is nearing readiness! The third subtheme has been completed.

Done:

To do:

  • Set CSS as PHP so can sniff browser/platform and deliver either semi-transparent PNG or GIF format backgrounds as User Agent supports
  • Download, install and support additional plugins
  • Test for bugs
  • Figure out which additional files are needed outside the normal Themes folder
  • Make sure I’m conforming to WordPress standards as much as possible!
  • Upload to server, test more
  • Fresh install on fresh, live WordPress test installation
  • Fix any and all bugs!
  • Write installation notes
  • Create ZIP archive of necessary files
  • Upload and tell folks!

Additionally, I’ve decided that it’ll probably launch with just three subthemes, due to time constraints; however, more subthemes will be available later.

Screenshots:
Big Urgent Wish, subtheme threeBig Urgent Wish, subtheme twoBig Urgent Wish 3.0

Categories
creative internets uncategorized web design

New tutorial: HTML Beginner’s Course pt 1

I’ve just finished posting the latest tutorial: HTML Beginner’s Course pt 1. This tutorial covers basic HTML formatting and some common tags. Nothing intensive here, just a crash course in what it is and what it does, with a little bit of the fundamentals. Topics to be covered later include lists, images, links, tables, and CSS.

Get your feet wet now, we’ll be doing some fun diving soon enough! There’s even an RSS feed to the tutorials pages, so you can keep up with the latest tute’s.

Categories
friends internets uncategorized

New page: Tutorials

Because I seem to be the only person in my local circle of friends who understands web code, I receive lots of requests from people to help them jank up their MySpace pages. In response, I’ve created the first tutorial: MySpace: the DIV element. This tutorial assumes you know a little bit about HTML and CSS going in. In future tutorials, I’ll cover basic HTML and CSS.

And i’ve just finished adding the comments functionality to pages (as opposed to blog posts), so if you have any questions or need help, I’ll do my best to clarify. This is a work in progress.

Categories
web design

alien sky

New color scheme available. To select, look for the little purple square at the top left of any page on this site.

Categories
creative web design

New look

Using Rob Ballou‘s Styleswitcher, the previous version of which i used on my last site, i’ve uploaded a new PHP-driven stylesheet-switching system. You can see on the left hand side that there are now options for the color scheme, the font size, and the font face (serif or sans-). I also changed the default from a black background to a white one to make it look a little less like a 13-year old Marilyn Manson fan with some design potential did it.

Not very friendly towards IE6-, but IE7 is around the corner, and you should be using a better browser anyway.

Categories
internets web design work

Portfolio updated

Finally! My online portfolio is nearly finished… The only thing left to do now is to acquire the main files from my most recent project and remove all proprietary informations.

I thought i’d NEVER get that shit done. That last one was a bitch to nail down – it turned out that it made much better sense to lose the damn b2evolution blog and just write in static content.

Categories
internets memories web design

Attack of the digital zombies

Well, it’s been taking forever, but finally!, my portfolio is online and pretty much more or less all (well, most) of those old dead sites are recreated and re-animated and essentially living again, albeit with synthetic blood this time around. Don’t look them too closely in the eyes, as there is no more soul in them as there is in an idiot, slack-jawed goldfish.

It’s been quite a learning experience… in fact, it really is amazing that i got away with such junk HTML in some of those sites. Actually, on the most prominent website i ever did, i actually used double-quotes within inline CSS. Which effectively turned off succeeding CSS rules, and invalidated the whole mess. It’s quite lucky, i’d guess, that anything worked at all in some cases.

There’s just a couple more sites to put up.

Categories
internets

wanna learn?

Hundreds of free online books on programming