Comments [0] posted: May 27, 2008 Greg O'Byrne

You've probably seen the functionality around at certain blogs where you can click on a link at the end of the post that lets you expand the blog entry to show more content. I like that functionality and dasBlog (my blog software) didn't have it so I wrote my own.

With dasBlog you can have a description for the displayed text on the main blog page and then you can click through to the full blog post, but I wanted the ability to expand and contract dynamically right on the front page.

Here is how I did it.  Feel free to take and use and modify whatever you want.  It's offered as is and public domain and yadda yadda.

First, here are the elements you need to put on your page around the content you want hidden/expanded:

<div  class="trHiderControl">
<span onclick="trReveal(this);"  trhidertoggle="false" trID="trRevealer" class="trHiderTopClick">reveal</span>
<div class="trHiderContent" trID="trHiderContent">

<!--content here-->
blah blah
<!--content here-->

</div>
<span class="trHiderBottomClick" trID="trReHider" onclick="trHider(this);">close up</span>
</div>

Set four css classes, most importantly set:

.trHiderContent
{
     display:none
}

and

.trHiderBottomClick
{
     display:none
}

Then include the file trHider.js and you're golden.  The contents of trHider.js are just two functions:

//reveal text inline.
function trReveal(oEl)
{
    if(oEl.getAttribute("trhidertoggle")=="true")
    {
        trHider(oEl);
        return;
    }
    oTopEl = oEl.parentNode;
    for(i=0; i<oTopEl.childNodes.length; i++)
    {
        if(1==oTopEl.childNodes[i].nodeType)
        {
            switch(oTopEl.childNodes[i].getAttribute("trID"))
            {
                case "trRevealer":
                    oTopEl.childNodes[i].setAttribute("trhidertoggle","true");   
                    break;
                case "trHiderContent":
                    oTopEl.childNodes[i].style.display = "block";
                    break;
                case "trReHider":
                    oTopEl.childNodes[i].style.display = "block";
                    break
                default:
                    //nothing
            }
        }
    }
}

//hide text inline
function trHider(oEl)
{
    oTopEl = oEl.parentNode;   

    for(i=0; i<oTopEl.childNodes.length; i++)
    {
        if(1==oTopEl.childNodes[i].nodeType)
        {
            switch(oTopEl.childNodes[i].getAttribute("trID"))
            {
                case "trRevealer":
                    oTopEl.childNodes[i].setAttribute("trhidertoggle","false");   
                    break;
                case "trHiderContent":
                    oTopEl.childNodes[i].style.display = "none";
                    break;
                case "trReHider":
                    oTopEl.childNodes[i].style.display = "none";
                    break
                default:
                    //nothing
            }
        }
    }
}

...and Voila', expand and contract at will.

Example:

reveal

blah blah blah blah blah

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

close up

      Comments [0]
tags: [blog | code | dasBlog | techRivet]

Comments [1] posted: Nov 19, 2007 Greg O'Byrne

image So. I like blogrolls. 

I think they play an important role in the "atmosphere" a blog projects.  Maybe I'm alone in this but when I go to a blog that doesn't have a blogroll I form an opinion of the blogger.  He starts a notch down for me. 

Now the reason a lot of people advocate against including a blogroll has to do with SEO placement and Google branding your site as a link farm.  This seems a rather sad state of affairs, designing a site on a third party's arbitrary requirements.

Google apparently dings you once your page has more than 120 links on it...holy schmolies by some methods of determining my homepage has over 500 links on it.  That is if you take into account all the "digg" and "stumble upon" links for each entry.  Trimming my blogroll isn't going to have much affect on that result.

If you feel the need to try and stay under that arbitrary link count of 120 then by all means do what you need and that may result in a better Google placement.

While Blogging

Me? I like linking to things that interest me.  I like linking to a few of my "online allies" as I call them.  Friends in the real world and online that I have met or hooked up with.  If that impacts my ability to get crawled by Google...well FIGHT THE POWER MAN!

While Surfing

If I find a blog I really like and want to head down a link trail, I am interested in what blogs they link to, I want to follow their lead.  I want to go to places that they advocate.

It helps me find the nooks and cranies that interest me.  It dissapoints me when I come across a really interesting blog and he has NO blog roll...It's like finding a dead end in the superhighway.  I'm left shaking my head and wondering what the blogger was thinking.

And like I said my opinion of the blogger goes down a notch.


      Comments [1]
tags: [blog | google | SEO | techRivet]

Comments [0] posted: Nov 12, 2007 Greg O'Byrne

image The blog that pins me to the wall with its fine darts of nerd lightning.

If you are a geek or a nerd or afflicted with some similar...affliction, you are encouraged, nay, required to go read the Rands in Repose.

How I came this far without reading it is a mystery.  Frankly I  blame all the rest of you for not sending me a link to the blog sooner than now.  How dare you hide such witty wittiness from me.

Don't let it happen again!

recommended entries:

http://www.randsinrepose.com/archives/2007/11/11/the_nerd_handbook.html

http://www.randsinrepose.com/archives/2003/07/10/nadd.html


      Comments [0]
tags: [blog | cool thing | geek | nerd | required reading]

Comments [0] posted: Aug 08, 2007 Greg O'Byrne

We here at the palatial headquarters of techRivet.com would like to thank all the visitors to the site.  Here is a nice graph that shows said growth.



      Comments [0]
tags: [blog | stumble upon | techRivet | traffic]

Comments [0] posted: Jul 23, 2007 Greg O'Byrne

I just updated the software package.  Leave a comment if you notice anythign not working correctly.


      Comments [0]
tags: [blog | dasBlog | techRivet]

Comments [1] posted: Jul 17, 2007 Greg O'Byrne

I have some organic traffic. I have some links from friends and associated bloggers. I've joined online blogging communities like Bloggst, MyBlogLog and others. I participate in other blogs comments. But all that results in about 25% of my traffic. (or less).

Stumble upon provides the rest.

This is fascinating and relates back to my earlier post on Virtual Schrödinger's Law.

This traffic generating engine that is Stumble Upon represents a shift in the way traffic is garnered on the internet. You used to have to cultivate relationships, you used to have to suck up to power users. Now you don't.

Create a piece of content that is compelling enough, interesting enough, well written enough and get it submitted into Stumble Upon's database of URLs and let the horses run wild.

Democracy of Crowds

It's the democracy of crowds. I don't want to use "Wisdon of Crowds" because I have had both "wise" articles and foolish ones explode into a link spike from stumble upon.

The key then of course becomes to continue to generate quality content and feed the mouth of stumble upon.


      Comments [1]
tags: [blog | crowds | digg | stumble upon | traffic]

Comments [0] posted: Jun 28, 2007 Greg O'Byrne

1. Cool new blog (new to me): How To Split an Atom

Steven Spalding’s blog about the Web 2.0 culture, and how to survive in it. A cool blog that bounces around from subject to subject...I like that sorta place.

If you get nothing else out of it remember that at the end of the day, just like espresso, reading How To Split An Atom will at least make you look smarter.

2. Cool Web Thing: XMail Harddrive

Use your gmail account as an online harddrive. This is pretty cool. Check out the how to vid from Billy Nye (any relation to Bill Nye the Science Guy?)

3. Cool Real World Thing: The wings to the new Boeing 787

The engineers involved with the design are curious about its capabilities. They have an interesting question that will probably never be answered. An intriguing perplixiton?

Can the wingtips of the new carbon fiber wings TOUCH above the fuselage without breaking?

Not that I ever want them to...but...holy indestructability Batman! [linky]

4. Extra Cool Thing: Ornithopters

As in extraordinary. The slow fly ornithopter:

I wanna build one! Looks like you can get yourself some over here: Free Flight Ornithopters. Or build one from scratch: [linky]


      Comments [0]
tags: [4 things | blog | google | Boeing | ornithopter]

Comments [0] posted: Jun 15, 2007 Greg O'Byrne

Fascinating individual.  A savant of extraordinary language and number abilities.  Here is is blog: [Optinem].

Here is the BBC movie about him.

Savant: The boy who saw numbers

And here is how he sees pi:

 


      Comments [0]
tags: [blog | savant]

Comments [0] posted: May 30, 2007 Greg O'Byrne

So. techRivet's been up now for 4 months and I think it's time for a review.

  • Peak traffic day: May 11. There were 3,343 page views and 1,825 visitors. Far and away the biggest day.
  • Low traffic day: eh there've been some low twenties unique visitor days, typically Sundays
  • total posts: 73
  • Alexa Ranking: 547,909
  • technorati ranking: 289,803
  • Most commented post: Joost Invites - but ya gotta earn it.

Most popular posts:

title unique views page views
Digg is Broken - Virtual Shrodingers Law 1,865 3,210
techRivet's Free Media Pack 2007 992 2,116
Will New User Interfaces Change the Way I Work? 591 810
Steampunk Keyboard: You know you want one... 291 495
New interfaces redux 195 404

Most un-appreciated posts

(c'mon people, a little cooperation here)
  1. Brain implants, wetware and accelerating change.
  2. Job v3.0 - 21st Century Jobs
  3. The Moon and NASA and us
  4. The Drake Equation - variable: ne not a catchy title.

Traffic comes mostly from:

  1. stumbleupon.com
  2. google.com
  3. cascadeclimbers.com
  4. digg.com
  5. blog.scifi.com
  6. thehotfix.net

Best linked in site (friends):

  1. cascadeclimbers.com
  2. blog.scifi.com
  3. thehotfix.net
  4. thepugetnews.com
  5. blog.speculist.com

Thank you and now I return you to your regularly scheduled broadcast.


      Comments [0]
tags: [blog | techRivet]

Comments [0] posted: May 25, 2007 Greg O'Byrne

1. Cool blog

If you haven't read RoughType by NIcholas Carr well...you should...Always insightful. He writes about the topics that I wish I had thought of first. Sometimes I do think of them first but usually not.

Definitely a daily reader


2. Cool Web Thing: Fractal World Gallery

Are you tired of the average wallpaper? do you want something different? Then go over here. These are incredible. Fractal World Gallery

I read a book series by Tad Williams a couple of years ago called: Otherland. I don't know why exactly but these fractal pictures remind me of those books.

3. Cool Real World Thing

So to jump back to a post from a few days ago [linky - SR71] I went and found a couple of videos of the SR-71 Blackbird. video. It looks like something out of Star Wars.


4. Cool Science

Ruben's Tube: real live sound visualation with flame.


      Comments [0]
tags: [4 things | blog | cool thing | invention | jet]

Comments [3] posted: Mar 29, 2007 Greg O'Byrne

It is a new look and feel. 

What do you think?


      Comments [3]
tags: [blog | techRivet | design]

Comments [0] posted: Mar 19, 2007 Greg O'Byrne

So we all know about Housevalues.com and Zillow.com which both tell you in different ways how much your house is worth.  But how do you find out what your site is worth?

Well there here are a couple of sites that try to tell you:

http://www.seomoz.org/page-strength - doesn't really tell you the price but does give you a rough index to compare it to other sites.

http://www.pingoat.com/goat/blog_worth - appears to weigh a similar set of variables as the SEOMOZ site but attaches a monetary value to the index.

http://www.business-opportunities.biz - Nice my blog is worth MILLIONS.  Well not millions, but this seems to overstate the value I would put on my site. 

http://www.dnscoop.com/ - and somewhere in between. 

The bottom line is that the price placed on your site is just abitrary and doesn't mean very much except as an index that you could track.

I still like seeing the thousands of dollars from the business-opportunities site though.


      Comments [0]
tags: [blog | ranking | statistics]

<<< Older Stuff Yo!
The 2007 Weblog Awards




Total Posts: 446
This Year: 189
This Month: 18
This Week: 4
Comments: 201



Sign In
home | about | rss
heya punk.here is where lotsa content will be
Larry says!
Larry says!