Now Even Faster!

SpiffyNews No Comments »

So … because I apparently had nothing better to do, I sped up the way the comics are delivered. Using ob_start() and ob_get_contents() to save the files somewhere, so those are in turn served up unless the content has changed (and the cache file doesn’t exist)…

So, by doing that the pages are executed / “complied” a LOT faster. The times vary to some degree but on average it’s at least %20 faster, but up to %700 faster (for you) in testing. This will probably only affect your load times but by about a whole second at most, but it actually saves some bandwidth … MySQL usage … and apache load times. Which right now doesn’t make a lot of difference but if we ever get hammered with traffic (haha) everything will be just dandy.

But yea, definitely let me know if something messes up because of this. I got tired of testing things out over and over, so there are most likely bugs … everywhere?!? Dun Dun DUNNNN!

wasting Friday nights,

-josh

Yay For Weird People

SpiffyNews No Comments »

So the most recent visits from a search engine came from these searches:

“thespiffylife”
“the spiffy life”
“josh thun”
“ninjaed”
“immune system comics”
“comic porn archive”
“daddy’s little girl comments for myspace”

In order of least crazy to weirdest…

seriously … what were the last three actually looking for? that’s kinda creepy lol. better yet, we show up on google (somewhere down the list) for those search terms… riiiight

-josh

PS. yea, i know i’ve increased the chance of showing up for another odd search query :P

Apache is neato

SpiffyNews No Comments »

Soo … for the longest time I was wondering how a lot of websites are able to show pages without having tons of arguments at the end of the filename, or for that matter the presence of any file at all. The easiest example would be a before and after of our site now.

Directly linking to a comic would look like http://thespiffylife.com/comics/comics.php?id=110 which takes you right to a specific comic. I can add #comic / #comments / #comment_1 to the end of that to take you right to a specific part of that page.

You can tell apache to rewrite urls based on certain rules, which makes it so that when you go to http://thespiffylife.com/110/ I can set it up to act like you’re accessing the longer version –> http://thespiffylife.com/comics/comics.php?id=110.
If you are searching for comics by a specific author it gets even longer: http://thespiffylife.com/comics/comics.php?id=110&author=Guy becomes http://thespiffylife.com/Guy/110/ (which looks a lot nicer to me)

I’ve changed all the links (that I’ve found so far lol) to appear “prettier”, but if you still use the older, “uglier” version it’ll still work just fine ;) .

For instance one of the sites I was referencing this from shows it’s URLs like so: http://www.roscripts.com/Pretty_URLs_-_a_guide_to_URL_rewriting-168.html The only part of that link after the .com that is actually used is the number. He’s got it setup to find the number after the hyphen and access the post with that ID from the database. (it’s not even an html file that it’s accessing). Sorry if this is random, but I’ve always been curious how people were doing that … and now I know! :)

Because knowledge is power! … *cough*

-josh

OMG Finally!

SpiffyNews No Comments »

So if you’ve ever tried to make a comment on one of our MANY comics (101 real comics as of right now!) you most likely will have seen an error page showing an ever so confusing MySQL Error if you used an apostrophe and/or single quote in your comment.
The way PHP & MySQL works to do an insert you have to basically nest double and single quotes around the info. This is a problem for a person just typing away because they don’t know that. I guess I’ve been proactive lately and figured out how to fix it.

str_replace("'", "&#39", "YOUR COMMENT");

basically it replaces any single quote with it’s ASCII equivilent.

“But Josh, that looks ridiculously simple!”

Yea, it’s simple … now! Never needed to do that before and was hoping I could mess with the syntax enough to get it to not error out with either a double or single quote. But no …. lol

So uh … COMMENT AWAY!!!

-josh

Technorati Tags: ,

That Was Easy?

SpiffyNews No Comments »

So as you might have noticed I’ve done some cleaning up around the site lately. Mostly just little formating things like making the counter for the comments on the comics display like what I’ve done for the SpiffyNews, show what type of comic is on the front page as well as the author. That being said, I’ve also made it to where Guy can go ahead and post comics to be shown at a future date (my little extra up here was my way of testing a few things like that :) lol).

But I’ve also made it where we can have guest strips if anyone out there wants to add their own pizzaz and spiffyness to our growing list of comics :D. To do so just click on the link on the sidebar Post a Guest Strip! and follow the instructions.

Also done some things to the way the FaceBook app is updated … so if it’s not working right for you let me know … or just wait out my trials :P.

In other news…

Sorry if you don’t get the joke ;) … but it is pretty funny :D

-josh

PS. I just opened up the site in IE (Internet Explorer) and saw that the tags (comic type + author) underneath the Title are messed up for those so unfortunate to be using IE as their main browser. I’ll have to see how to single out IE in my styling … Microsoft is teh sux!

Technorati Tags: , , , ,


© 2005-2008 TheSpiffyLife.com & GJComics Inc. Never miss a comic with SpiffyAlert!