The Cult of Leif Everything Leif M. Wright

6May/102

Reboot: iBible

So I haven't touched iBible since 2003. That's right; seven years. Initially, I wrote iBible in RealBasic because RealBasic offered an IDE that compiled applications for both Classic and OS X platforms. If you have no idea what I'm talking about, nevermind. It's not important. I just felt like I needed to justify why I did it.

I hated RealBasic with a passion. It was clunky, and if you wanted your application to do anything REALLY cool, you had to use a kludge or three thousand. The point is, the code was ugly, it was difficult to maintain and a pain to mess with overall.

So after I had a fairly good set of features, I lost my motivation to work on it.

Fast-forward to today, seven years after I wrote the last line of code for iBible (a program that people are STILL downloading and registering to this day). I have a LOT of ideas for a new version that is faster, more stable, and more importantly, native to OS X - and to the iPhone and iPad. In fact, without tipping my hand here, I have some ideas that are revolutionary, and I'm starting now on recoding iBible from scratch.

Here's some of the stuff I can say: iBible 3 will have:

  • The ability to read any versed text. That means it will read any version of the Bible, plus it could potentially read other texts such as the Koran, the Book of Mormon or poetry arranged into numbered chapters and verses.

  • The ability to associate notes with that text. That means the Bible could use Strong's definitions for words, the Thompson Chain Reference for deeper study, Matthew Henry's Complete Commentary on the Bible and basically any commentary ever written for whatever text you're using.
  • User notes. You can comment on any part of the Bible you want, and your notes will stay around. For instance, in my church, when I preach a sermon on a certain range of scripture, I can now associate a note with that range of scripture and save the sermon there forever.

There is a LOT more, but that's all I can say without tipping my hand too much, because some of what I'm doing has been done in NO other Bible program out there. Like the beginning of iBible, I'm adding stuff that I need and have always needed, but couldn't find a program to do it.

Stay with me, I'm hot and heavy on this one.

4May/100

I forgot a few sites

In the post below, I forgot to add a few sites I've done.

These sites are not as flashy as other sites, but they are stuff I've done for my customers, so here you go:

Picture 2.png

This is my church's site. It's a simple site with a simple design, but that was kind of the idea.

Picture 3.png

This is another simple site, this one for one of my clients. She just wanted a "get my name out there" kind of site, so that's what we did.

Picture 4.png

This site was for the "bug man," an exterminator. He wanted it simple, and that's what I gave him.

Filed under: HTML, Work No Comments
3May/100

Detecting browser in php for css

In designing websites, I've discovered that the old problems with Internet Explorer are still around, mainly that you can code a beautiful website only to discover that Internet Explorer doesn't support the coolest things you've done.

The reasons behind this are multiple, but the short version is that Microsoft wanted to own the Internet, so it refused to participate in Web standards by having their browser support them, forcing webpage designers to make concessions for Internet Explorer when they designed. The hope was that they'd just throw up their hands, use Internet Explorer's proprietary coding and eventually everyone would have to use Internet Explorer (and Windows) if they wanted to surf the Web.

But that backfired, and Internet Explorer is losing Web presence daily. That said, the newest Web standards are unevenly implemented across browsers, with Safari being the only browser I've found so far that actually implements CSS3 properly. The problem is, JavaScripts designed to detect browsers are woefully out of date and oftentimes provide wrong information, meaning you have to put in a boatload of effort to code a page to detect which browser you're using, and then it's tough to implement whatever changes you make throughout the page.

This stuck out like a sore thumb on one of the latest sites I was coding, Square Deal Music, for which I had coded all sorts of cool stuff, including gradient overlays in the div containers, which were not supported on Firefox, I discovered to my chagrin. That means Firefox users would see my dark text against a dark background, making it quite difficult to read - and ugly to boot.

So Friday I came up with a solution: I would code one CSS stylesheet for Safari (which adheres completely to Web standards) and another for every other browser. Then, in php, I would detect the browser and print the link for the correct stylesheet based on which browser was being used:

if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') ){
$Safari = TRUE;
echo "<link rel=\"stylesheet\" href=\"Safari.css\">";
} else {
$Safari = FALSE;
echo "<link rel=\"stylesheet\" href=\"BadBrowser.css\">";
}

strpos returns the position of the quoted string in the passed string. If the string does not exist inside the larger string, it returns FALSE, which is why I use it here as kind of a poor man's grep or regex. I'm just testing to see if the string "Safari" exists in the user-agent field the HTTP server passes to php.

A bonus of this approach is the $Safari variable is then available through the rest of the page so I can implement all sorts of things, like popping up a div to alert the viewer that they can download a free browser to see the site as it was intended. Like this:

if ($Safari == FALSE) {
echo "<div class=\"badbrowser\"><h2>BAD BROWSER! You are viewing a crippled version of this site because your browser is not standards-compliant. Download <a href=http://apple.com/safari>Safari</a> for free and you can see this site as it was intended.</h2></div>";
}

Fun, eh?

28Apr/100

What I’ve been doing

I shut this blog down on Jan. 28, 2010 because I got fired at the Muskogee Phoenix and started a new business.

I got fired because I made a joke about a politician on this blog on my own time. The "free speech" advocate Muskogee Phoenix didn't agree with my position on that particular politician, so they summarily fired me. The next day, I launched MuskogeeNOW.com, an online-only competitor to the Phoenix, something I had been planning to do for a long time anyway.

Here's what MuskogeeNOW looks like:

Picture 6.png

Honestly, it's not the prettiest website in the world, but that's kind of the point. It's a serious news site that hopefully gives readers what the Phoenix doesn't.

I'm also designing Web sites for other people, and this is more indicative of my work:

Picture 5.png

Interestingly, that site was produced using only two images: the dude with the guitar and the picture of the guitar. Everything else was done with hand-coded html, php and css - not even any javascript. That won't mean much to most readers, but I'm pretty proud of it nonetheless.

Anyway, I'll be updating this blog again, but not nearly as frequently - and probably not on the same subjects - as before. My guess is I'll be using this blog to feature my Web and programming work.

Here's another site I'm doing:

Picture 7.png

It's for a store that sells home decorations. Here's a picture of the overlay when someone clicks an image:

Picture 8.png
Filed under: Work No Comments