KDC Menu

Sunday, April 24, 2011

Blogger/Blogspot: Reverse the Order of Posts

With regards to blogs using the new template designer layout, and with the help of many Google results and the jQuery API documentation and its comments, I have figured out a way to not only reverse the order of Blogger posts, but reverse multiple posts made on the same day.

Use: I wanted my blog to read more like a journal or diary. Blogs tend to read more like news flashes, where the reader will read the most recent message posts first. So, it was necessary for me to find a way to reverse the order.

Consideration: Although I got this to work on my blog, I cannot guarantee it will work for yours... template layout differences, previous edits, and other potential differences between your blog and mine. You should consider using the below guide in how I did it as more of a guide for things to look at when attempting to implement this on your blog. Not to mention, I'm writing this in April of 2011, so two months, six months, a year or more from now and it may not even be relevant at all.

Note: The way this works is after the page is fully rendered, it will then reorder all the posts, so you may see the last post first, at first, but then they will all flip. Seems to happen within a second with my browser/connection, but obviously this will be more apparent with slower connections.

Example: I did this for my Adventures Through Rift blog

In any case, here's what I did:

You must first include a reference to the jQuery library. You may want to upload the library to your own host, or find a reliable host which provides external references to it. Bear in mind that if you use an external reference, and they upgrade, so will your reference to it, potentially breaking your script. In addition, if they rename or remove the library, your script will most definitely break. So the preferential method for referencing any library is by hosting your own. This way, you have control over upgrades and such.

When editing your blog on blogger.com, go to the Design tab, and click the "Edit HTML" link. In the Edit Template box, then check the box labeled, ""Expand Widget Templates" (this was important for me 'cause after I got my code working, I couldn't find it... which is when I figured out I had that checkbox checked).

I placed my reference to the jQuery library as the first line under the <head> tag.

<script src='http://yourdomain.com/jquery-1.5.2.min.js' type='text/javascript'/>


Once that's in place, you can enter the code below. See if you can find a JavaScript block of code within your template. I did a search for "<script type='text/javascript'>" (or something similar). If you can't find a JavaScript block, the block I was able to use was under:


<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='nextprev'>
<script type='text/javascript'>
</script>


Within that JavaScript block, paste the following code, and do a "Preview" (you may not want to save the template as if this doesn't work, then an oops may be in order.)


$(document).ready(function() {
divP = $('div.date-outer').parent();
divP.children().each( function(i,divC) {
divQ = $(this).children('div.date-posts');
divQ.children('div.post-outer').each( function(i,divR) { divQ.prepend(divR); });
divP.prepend(divC);
});
});


Again, other templates may not use the same references to the DOM and CSS classes as mine does. I currently use the Awesome Inc. template. I also set the number of posts per page to 500 (Settings->Formatting).

I hope this helps someone else in reversing their blog posts. I'm also hoping to do this to my Adventures Through World of Warcraft blog as well, but it's still using the old template format, so will need to upgrade it first.

Friday, July 30, 2010

XHTML Strict

Just finished updating my site's main page to conform to the W3C XHTML Strict standard! Easy stuff, but a bit time consuming. Will move on to a few other pages next...

I'm also going to put an AJAX call into the Border Change feature on the main http://twghof.com (The World's Greatest - Hall o' Fame) page. Although the page reload is very quick, this is the perfect example of where AJAX should be used.

Tuesday, April 06, 2010

This blog has moved


This blog is now located at http://kdcinfo.blogspot.com/.
You will be automatically redirected in 30 seconds, or you may click here.

For feed subscribers, please update your feed subscriptions to
http://kdcinfo.blogspot.com/feeds/posts/default.

Thursday, September 17, 2009

Good Work is Hard To Find

Recently had my teeth whitened, and my two front (non-vital) teeth fixed with a chairside veneer. From where my teeth were at, the Dentist did an awesome job. I'd been wanting to do this for about 15 years now. And in finally able to do so, I just wanted to pay tribute to a job well done by Dr. Lide in Richardson, TX.

My Review of Dr Lide and his staff

Friday, July 24, 2009

White Collar Comedy

I was wondering today how come White Collar Comedy never became popular as Blue Collar Comedy has. Then it occurred to me that it probably failed 2 days into beta testing.

Now that's funny right der!

[Keith's click at humor]

They don't call me Ctrl-C for nuthin'! Well, okay, I call myself that. But for good reason. If you don't know, in computer terms, Ctrl-C cancels a DOS command or batch file. And I've canceled so many times, I guess that qualifies me as a self-starter. You catching all this?

[Flash humor: It's quick]

Speaking of pre-loaders...

And here I was wondering why white collar comedy probably wouldn't go too far.

Okay, I am giving the comedy back to the professionals now... I know, I wasn't supposed to attempt this at home. Sorry :(

Unfortunately, I could only find one professional worth watching on the subject:
Frank King - Clean Corporate Comedy

Sunday, July 19, 2009

Simple Site Catalog - Now introducing Release 2.71

Simple Site Catalog, newly released 2.71

The Simple Site Catalog is a powerful yet simple and affordable online web store building system which offers a multitude of options, including a built-in CMS (content management system), and built-in multi-product editor.

Release 2.71 includes spam control in forms, an inventory manager, an updated Google Base updater, master password, master password updates, and validation reworks for transitional types, along with a few other fixes and updates from the last release (2.6x). An optional new HTML editor works on multiple browsers. The Simple Site Catalog also provides for static pages (unfortunately this is not available on all servers, and requires a moderate level of web development knowledge.)

In addition to the release of 2.71, both KDC-Info Simple Site Catalog add-ons, the Web Links Categorization module and Wholesale Administration Filter module, have also been updated to accommodate the new catalog release.

Sunday, July 05, 2009

Last Day on World of Warcraft (WoW)

06/15 (Mon): Last Day of World of Warcraft (WoW)

When I first started WoW, I enjoyed exploring new grounds, seeing new things, and just learning the basics of the game. In the end, I just enjoyed the questing, and then the goal to get to 80. I'm not sure the difference between levels 1-40 and 70-80, but my guess is there was just too much to cover (and enjoy by myself) in the end. 40-70 was most enjoyed when I was able to group with my brother-in-law.

Well, without a line drawn for someone's end game, there isn't one, so I drew mine at getting to level 80. I'm back now in life to where I was prior to WoW... going over the 20+ things in life that I enjoy doing most (besides playing WoW). But I did so enjoy the break in life WoW provided for me. Perhaps I'll create a similar break in life in the years to come.

Friday, July 03, 2009

Business Trip to San Fran

Landed in SF just before noon on Sunday. It was a good trip. Talked quite a bit with the lady next to me. She was a teacher from Indianapolis. Was also going to SF (first time to Cali) on business. Spoke of her husband and one of her 2 kids. I did a little on the computer and played a bit on PSP. A good flight.

Carol picked me up. I had to go downstairs 'cause she thought I came out the baggage claim section. Spending time with her, my mom and dad, Angel, and seeing Jasmyne for the first time was awesome. I had a great, great day.

Tuesday and Wednesday were long, long days. Tuesday after work I walked down to Market and back. Had a few Sierra Nevada's at O'Briens. Wednesday I walked over to Townsend to check out the loft where I worked at Xybernaut Corporation in late 1996. Had some more Pale Ale at O'Briens. I also stayed out way too late and spent way too much - last time I do that. And now my legs are killing me, and I forgot about the bay area breeze... it was pretty freaking cold both nights. So I believe I caught a bit of a cold too.

I learned a LOT while I was there, and was able to get some stuff done as well. We have a LOT to get done in the coming months, so it'll be interesting to see how and if I'm able to contribute, be it locally or back in SF.

The departure plane was late in taking off (something about a coffee maker leak), and on arrival, although they made up the time in the air, we sat on the tarmac for about 20 additional minutes. Sitting in the middle is not the best place to sit when on an airplane for 4+ hours.

I got back home Thursday night, and Rosco hasn't left my side since. After experiencing what I'm sure was a bagful of emotions; confusion, loneliness, boredom, anxiety, etc., now I think he's just mad at me and relieved at the same time.

I'm also exhausted. So I'm grateful I'm now on a 3-day weekend. Think I'll be sleeping through most of it.

Thursday, June 04, 2009

I Miss Century Bank (aka, I now have ATM Fees [fees being plural])

Recently, Wells Fargo acquired Century Bank. My first withdrawl at a Non-Wells Fargo ATM produced these results on my balance sheet.

NON-MEMBER ATM FEE - ATM USAGE = $3.00 (the ATM fee itself)

NON-WF ATM BAL INQUIRY FEE = $1.50 (for having the ATM tell me my balance)

NON-WELLS FARGO ATM TRANSACTION FEE = $2.50 (for withdrawing $... isn't that double jeopardy, double indemnity, double taxation, or double something or other?)

$7.00 to make a withdraw at a Non-Wells Fargo ATM.

I so miss Century Bank! They not only didn't charge ATM fees, they reimbursed the any ATM fees charged. Are there any Century Bank-types still out there?

* I tried Chase, and after hearing all their fees, I reconsidered, and they wanted $25 to close my account if done within 90 days of opening it. And b/c I decided against it, and wasn't going to do direct deposit, it was gonna be a $6/mo service charge. I had to put it on my calendar to remember to close it after paying them $12 to avoid paying the $25.

* Bank of America lost me when they took my ATM card when I learned what a wash was, and they wanted to 'teach me a lesson' (this was a long time ago, but I know they're still too big to be much different than WF). Not to mention they were the first to sponsor loans for illegal aliens without social security numbers. Wells Fargo also joined the openness for such loans. I want a home loan without providing my SSN!

* Viewpoint lost me when they were Community Credit Union, and the lady left someone's filled out application on the desk in front of me when she went to go get me something, Social Security number, full name, address, the whole 9 yards.

Century Bank was awesome! I understand they were local to Dallas, but perhaps there is another similar bank that's nationwide?

Saturday, February 28, 2009

Merriam-Webster

My first impression was, you can't be serious... Merriam-Webster is supporting Pizza Hut? Upon further examination, it was just a sponsored (keyword) advertisement.

Upon even further examination, I found it interesting that:

The Right-Wing definition date was: 1856
The Left-Wing definition date was: 1884

And I suppose I should transition that part over to my "and the Moral of the Story is..." blog, but I'll leave it here just the same.