More b2evo Hacking

This post refers to a particular skin that isn’t the default any longer.

I did some rethinking of the scripty madness happening here at Schlueterica.

Toned some stuff down, spruced some stuff up, and made some new plans to make this website even more geekerific.

In this episode:

  • Toning it down
  • Sprucing it up
  • Extending and Adding (scripts and rels and targets, oh my!)
  • Future Plans

Toning it Down

First of all, I removed the DTR from the sidebar headings. I think it looks better this way.
Overall, I’d like to evolve this design into something a bit more toned down and professional, but I do enjoy this look quite a bit. I’m still trying to figure out a way to get the kewl notched-box border effect to work in IE. For now, at least, I added a little padding that keeps the sidebar text from running into the border, so it kinda looks like I meant to do that. (If you’re not sure what I’m talking about, view the site in Mozilla, and then in MSIE.)

Extending and Adding

I had created a plugin to automatically add rel="external" to links that lead off of this site, but renderers only get applied to the content, and most of the external links on any given page are found in the titles of my posts. (This includes most of the linkblog links.)

It occurred to me that I’m already using some gnarly javascript to loop through all the links on the page and do stuff. Why not add a rel="external" property while I’m at it? Done. Now all links on the page show their relationship dynamically, as long as JavaScript is allowed.

(A better server-side solution would be to add a field in b2evo to specify the relation when I’m creating a post, and then use that when generating the link. See Getting XFN Working in b2evo for the server-side method.)

It has often come up at the b2evo forums that people want a way to make external links automatically open new windows. So, after adding the rel="external", I added target="_blank".

Hmm… I don’t like it. It’s so easy in Firefox to make a link open in a new tab by just clicking the center mouse button (or scroll button). I decided to provide you with the option. Here’s the new window version. It looks for “nw” in the $_GET superglobal, so you need that little ?nw in the URL to get the new windowization. Feel free to weigh in with your opinion. (I’ll probably pull out the rel/new window stuff and post it as a separate tutorial.)

Future Plans

I’ve decided that, while I love b2evolution and use it, I’m really beginning to hit the point where I could either:
A Spend the time to figure out how to use SourceForge with SSH logins and PGP keys like a normal person
B Keep hacking it, getting the immediate gratification of new stuff, but making my next upgrade all the more hellish.
Option A doesn’t really seem like it’d save me any more time than it requires of me, and upgrades are already pretty hellish. (Hellish is really too strong a word; a good diff tool and taking notes makes all the difference.) The only advantage would be the ability to share my lovely hacks with the world.

Since hacking b2evolution is fun, and figuring out how to work with SourceForge properly is not, I’m going to just keep hacking, and see where it takes me. The todo list as of 2004-09-09:

  1. What’s with the “p256#more256″ in the “Continued…” links??

    I begin to wonder if my hatred of nonsemantic URIs is a “Go see a shrink” kind of thing. This one I plan on tackling tonite. Done.

  2. Fully Customizable Permalinks

    I want to be able to set up one file, and have b2evolution use the same source for both interpreting and generating the URIs. I’ve seen how WP does it, and that’s pretty cool. Certainly very user-friendly. However, I’m not really sure that it quite meets my needs. And I could care less about user friendly - the WP URI system isn’t as Isaac-friendly as I’d like. WP handles the problem of old URIs and new URIs not conflicting pretty nicely, but just requiring that mod_rewrite must be used to save the day. However, I am sure that you could use their system to break a URI scheme if you were sufficiently fickle, and I’ve found that generating $_GET parameters from a .htaccess file can screw up the b2evo stats.

  3. Page Numbers

    Currently, if you go to page 2 of my blog, then the XHTML gets all invalid, and that’s just annoying. Mission objective = no &s in my URLs, and only very occasionally a ?.

  4. Relationship field in evo_posts

    This field would specify the relationship of the linked item. This hack would make b2evo XFN friendly, and would also allow me to move a client-side process onto the server. (See above for more info on this.)Done. And, done in a way that doesn’t involve adding anything to the database. I added another blog to the system, and I’m using extra categories to store the rel info.

  5. Dunstan’s Insertions

    Best to let Mr. Orchard explain this one himself. Something like this for b2evo will be nice. I’m interested to see if I can work out a hack that will simultaneously upload the image, use GD to create a thumbnail at the time of upload that’s a certain height/width, and then stick in the pseudo-XML tag into the post. (It’ll probably be a <!–codeins src=”blah” –> sort of thing instead of actual XML so that the XHTML checker doesn’t throw a fit - but the renderer will handle it all anyhow.)

  6. Bi-monthly archives

    I get paid on the 1st and the 15th, and I think that would be much less buggy than weekly archives, while still providing a reasonable number of posts per chunk. These would go in the sidebar, leaving the main arcdir page with…

  7. Full Featured Expandable Archives

    This has been on my list for a while. It’s not a high priority, but I’d really like it. Some sort of heirarchical listing of Year, Month, Day, Post title, with everything clickable, so that the archives page would actually be a useful way to find stuff

3 Responses to “More b2evo Hacking”

  1. On September 9th, 2004 at 20:57:04, Isaac Schlueter Said:

    1 is done, and was ridiculously easy. Just remove “pid” from line 536 of b2evocore/_class_item.php. The old URIs still work, of course.

  2. On September 17th, 2004 at 02:34:49, Graham Said:

    YOu realy should work out sourceforge - this stuff would be so cool in the main package…

  3. On September 17th, 2004 at 07:56:00, Isaac Schlueter Said:

    Yeah, yeah… ;)
    For now, I’m diffing all my changes to the main distribution. So, incorporating them won’t be tough when I do get it all sorted out.

Leave a Reply

Comments are moderated like crazy using a variety of plugins. There is a very high likelihood that your comment won't show up right away, especially if you have never commented here before, but it was not deleted.

Please be patient, and do not post your comment more than once. It will show up once it is approved.

You must be logged in to post a comment.