Choose Your Theme
Warren Shea

Archive for the ‘Site Updates’ Category

Site Updates – Facebook Status and Recent Comments in the Right Col. –>

Tuesday, January 24th, 2012 at 12:00 am

Wow, when was the last time I did any type of site update?

Anyways, I did some worldofwarren.com maintenance today, first time in a while.

What I did was add 1 Facebook Status to the right column, underneath the 3 Twitter Tweets.
Below that, I added the 3 most recent Comments, underneath the Facebook Statuses.

I didn’t want to display the comments too prominently on my site as it’s not my content, so I make you simply click “See most recent” to see them. I notice that sometimes I get really good or interesting comments on really old posts. It’s very likely no one would read those though…(other than me) and I find that unfortunate. I’d like those voices to be heard/read.

I really hope this doesn’t discourage people from commenting. Comment on this post if you think it’s a bad idea…and it will ironically do what you don’t want it to do! So….basically, I’m saying there’s nothing in it for you.

<Technical Tutorial>
Getting the Facebook Status to work was pretty difficult. There’s a Facebook RSS feed but you can’t just pull from it. But that’s the same as any RSS feed. You have to create a proxy to bypass the cross domain issues. It’s super simple:

proxy.php

<?php header(“Expires:Mon, 31 Dec 2010 05:00:00 GMT”); ?>
<?php
if ($_GET[“type”] = “xml”) {
header(“Content-type: text/xml”);
$page_contents = file_get_contents($_GET[“url”]);
}
echo $page_contents;
?>

and I just call any XML/RSS via URLs like this:

proxy.php?type=xml&url=http://search.twitter.com/search.atom?q=from:warrenshea
proxy.php?type=xml&url=http://www.worldofwarren.com/?feed=comments-rss2

Unfortunately, for some reason, Facebook doesn’t allow this. They have this whole Developer API you have to work with to get the Facebook Statuses. Why? I think that imo, having Facebook Statuses come up as simple RSS feeds for people defeat the purpose of Facebook, as well as they lose money on advertising if you can pull the Facebook Statuses from other sites.

So I had to do something else for Facebook Status. I’m not going to write a tutorial since I didn’t make it. I will say that I got it HERE:
PHP Show Your Facebook Status on your blog/website
</Technical>

F. U., WordPress 3.1.2

Saturday, May 21st, 2011 at 10:52 pm

I upgraded my WordPress to 3.1.2 last night….my website was okay, and my WordPress seemed okay.

Since everything was okay, I decided to move my warrenshea.com site to worldofwarren.com. In theory, it should have been a smooth transition. It wasn’t. While my worldofwarren.com site rendered flawlessly (connecting to the database fine, etc), I couldn’t get back in to WordPress. I thought something broke when I migrated it over. I attempted to log in to my warrenshea.com WordPress, still on my domain. It didn’t work. I thought I crossed the wires somewhere…so I was trying hard to find out where.

I spent 8 hours today trying to figure out why I couldn’t log in (on either domain) to WordPress. I tried reinstalling WordPress…on BOTH domains and it wouldn’t work. I installed WordPress on a fresh, clean domain. AND IT DIDN’T WORK. WTF. I was getting pretty scared now, worried I might have to transfer all my table stuff over…but WTH, even fresh installs aren’t working. Could it be something on the server? I had even created brand new folders to put my stuff in….New folder + Fresh WP 3.1.2 didn’t work…seriously, WTF.

Anyways….I spent so much time looking at the domain problems because I thought it was all the migration. And after 8 hours, I found out it wasn’t. It was WordPress 3.1.2. Desperate, I decided to try WordPress 3.0.6 and viola, it worked instantly, perfectly, and as intended.

While I do believe the migration had been part of the problem, it seems WordPress 3.1.2 was the real culprit.

Man…I couldn’t log in no matter what I did. My login URL would simply redirect back to the login screen with a querystring of &reauth=1 added on the end. It was brutally annoying. Anyways…yeah, again, reverted back to 3.0.6 and there were no problems.

I think I’ll stick with 3.0.6 for a bit….I’m a bit afraid to upgrade now.


Note: With my PHP Proxy, I modified my warrenshea.com/?feed=rss2 so that everyone’s RSS feed did NOT break. Basically, if the ?feed=rss2 querystring exists, then it does a check on worldofwarren.com/?feed=rss2 and retrieves the XML results and outputs them. Hopefully it makes things seamless to those who link to my blog :)

Site Updates – Secondary content boxes + WP 3.1.2 + GMAIL Theme

Saturday, May 21st, 2011 at 1:41 am

Apologies for repeated content…it’s better centralized in this post than the last

Secondary content boxes
Created a PHP Proxy to retrieve Cross-Domain XMLs (RSS Feeds).
Modified the AJAX Request to correctly retrieve various feeds.
With the help of my co-worker, implemented concurrent the AJAX Blog requests.
Boxes only show (with a jQuery fadein) when all the contents of that box have loaded.

Result: Rather than have WordPress load the RSS and have the site load and compile via PHP and render the HTML all at once, now the site will load first, and retrieve the RSS after/during load.

Upgraded to WP3.1.2
Haven’t updated my WordPress in a while…because when I do, I have to make code changes to the files WP changes.
With my recent blog changes, it actually eliminates much of the changes I have to do…updating WP is twice as easy.

GMAIL Theme
Google has changed the top of their page, as well as GMAIL’s top. I modified my site to mimic it. Nothing too fancy. Hover over the top links to see…

Timeout
I think I solved the timeout issue. Also, I know why I never got it…the issue was related. Anyways…let’s see how it goes but hopefully, it’s gone!
(this is like, my 5th time saying that…but maybe it’ll be true this time!)

Posts
I’ve been removing some of my…questionable posts. Well, just “Drafting” them. You will see why in a few weeks or months…

Site Updates – warrenshea.com VS Timeout…again.

Friday, May 20th, 2011 at 1:54 am

Trying to figure out how to not have my site load incredibly slowly.

A couple of things:
In my last site update, I made the Twitter feed on the right no longer load via JavaScript and tried to get it via PHP. Doing this meant that the entire page would load completely (w/ Twitter) all at once as opposed to having the page load but occasionally not having the Twitter load (because sometimes JavaScript hangs and doesn’t complete loading for a long time).

Anyways…I think what happened was the PHP wouldn’t load Twitter either, and thus, the whole site would load. EPIC FAIL.

I’ve changed it up now so the Twitter is retrieved client side again…but this time using AJAX. If the feed doesn’t load, you’ll just see that damn loading image…
On a plus note, it’s working. Also, the tweets are recent, and not cached (which they used to be when they were loaded via PHP and inside the JavaScript (because the JavaScript would cache).

I’m considering doing it for the Blog feeds, so I don’t have to use WordPress…but as I tried tonight, I ran into some execution problems (namely, multiple AJAX requests only seemed to load the most recently called…)

Anyways, will work more over the weekend, hopefully :)

Also, high considering moving all the content to worldofwarren.com, and warrenshea.com because my professional, one theme’d site.

Also highly considering moving all the content to worldofwarren.com, and have warrenshea.com become my professional, one theme’d site.

Might explore this over the weekend.

(Major) Site Updates

Sunday, April 24th, 2011 at 2:32 pm

About a week ago, I started some heavy dev on warrenshea.com.

Here are my fixes:

  • The ul/li spacing on bullets (for all 4 themes)
  • Added FourSquare and Flickr (signed up today!) to my Social Media Icons
  • Twitter feed is now taken via PHP as opposed to JavaScript
  • All JavaScripts have been combined into 2 JavaScripts: JavaScript libraries (which contains JQuery, jQueryUI, SWFObject, Konami Code, and JQuery prettyPhoto libraries) and the regular javascript file (containing various inline JavaScript, etc). Originally I wanted a single JavaScript file but I figure that the JavaScript Library file doesn’t change but gets loaded every time. This way, the 143kb file, which is of considerable size, can be loaded via cache while the 22kb file that changes dynamically with each theme and page will be loaded each and every time. Better to do it this way than to load a 165kb (143 +22) file every time.
  • All CSS has been combined into one as well, including media print and media screen
  • Megaman theme has combined 18 images into one sprite.
  • Blogger theme has combined 4 images into one sprite.
  • Naruto theme has been tweaked slightly, the kunai is now gone and it’s now a functional, usable site. I’d been meaning to do this for ages…but I was lazy
  • Gmail (and Megaman) themes used to use JavaScript to determine the width of the main content. It no longer uses JavaScript and the width is determined via CSS. This means that the page loads faster on both these themes (this is due to the width not longer loading during page load, as it was before via JavaScript). Now it loads “instantly”.
  • Due to the revision, all pages should be 1/5-1/3 smaller in file size, as well as have significantly fewer server calls. It’s quite a considerable improvement!
  • On a backend side, made it so that only 1 “sidebar.php” (the right navigation) file exists, all in one spot as opposed to the old way, in which every directory had it’s own sidebar.php…just another way of centralizing things

To Do:

  • Any (unseen) fixes due to the code changes
  • I’ve done .GIF sprite conversion but I still need to do .PNG sprites…and, not sure if it’s possible to do repeating background images with sprites but I found it not possible…so all my repeating images are still single, standalone images. Will need to research that more.
  • Professional Theme, Simple Theme (already sorta done…), and Mobile Theme
  • Fix Mega Man item preload image

While the changes are mostly unseen, it’s not to say they aren’t felt through the hopefully faster load times and less server processing…or is it more? Less client-side stuff at least, which is a good thing…it also makes it easier (for me) to create more themes. Anyways, glad it’s done. I worked pretty crazily on this the last 6 days….it honestly felt a lot like when I played Zelda. I’m a creature of….obsession. Once I start something that’s within my grasp and motivation to complete, I just spend all my time on it. The real question is…what’s next?