Tag Archives: hacks

four times in two months

i upgraded my blog again last night, to help joen with some bugsquashing on Fauna RC2. after not touching my wordpress install for the better part of a year, it’s odd to be updating it this many times in 2 months. I still had to do a manual hack to get my WYSIWYG tabbed editor to work. Nazgul’s suggesting that i should keep doing this, so i used my handy new computer hacking SVN skillz to make a patch, so i don’t have to work so hard next time:  UPDATE: something in 2.1.1/2.1.2 changed, and my patch stopped fixing it.  this is a new version.  you may also need to hack gzhandler() out of functions.php.

tiny_mce_gzip.php.patch

the upgrade also means that my WYSIWYG editor is back to the standard font and padding. i dunno how i feel about that.

Patching instructions after the jump

Advertisements

Jizzy Handled

after reasonable testing, i’ve now upgraded my main blog. despite all the cool kids in the hackers list saying they never use the rich text editor, i use it all the time. yeah, sure, i can write code, but that doesn’t mean it’s appropriate to write about my weekend in code. so, here’s the list of changes for the upgrade:

Hacks

Plugins

  • i deleted all the plugins i’m not using. during the whole disable/re-enable process, i tend to forget which ones i’ve decided are crap. i blame this on installer, which makes it far too easy to install widgets for 3 days, decide they’re worthless, and then move on. it took a while, but it saves time, or something.
  • updated alex king’s plugins, which now all have their own hooks, so i had to hack them back out of my theme.
  • updated S2C. it was always such a pain, guessing what email people had used to subscribe. i like easy stalking.
  • deleted linkslist. hence the sudden existence of ul’s. i’m not going to take down the plugin, since people seem to find it useful(for the same reasons i built it), and the 2.0.x branch isn’t going away. i’m also not going to update it, because wp_list_bookmarks() does a decent enough job.

Akismet Excerpts

Engtech and I thought this was an excellent suggestion for dealing with the torrents of spam in the akismet panel, but matt disagrees. Engtech wrote a Greasemonkey Script that implements it browser side. I, being afraid of browser bloat, and wanting this for archGFX, not for this wordpress.com blog, hacked it in /wp-admin/wp-admin.css. It’s a hack so simple, i’m embarassed i didn’t think of it sooner:

#spam-list li {
max-height: 6.5em;
overflow: hidden;
margin-bottom: .5em;
}

#spam-list li * {
display: inline;
}

added to the end of the file. (i actually appended it to tiger.css, which works the same.) this is what it looks like:

auntie spam

if that’s not enough context for you, or if it’s more than you need, you can adjust max-height to your liking. if you’re using IE6 or below to review your spam, you’ll want to specify height instead of max-height.

More Plugins and Edits

while trying to make archgfx.net validate, i found i’d broken Related Posts. When there are no related posts, the plugin only calls the wrapper for the post headline, not the whole post. so if you have, like i have <li>title<br /> <small>content</small></li>, your page won’t validate. fix:

else {
echo $before_title.'No related posts'.$after_title.$before_post.$after_post;
}

in the middle of the file, right before it says // End Related Posts. now all my single post pages validate, not just the ones with related posts.

the next one is purely an annoyance. WPvideo is a great plugin. it’s damn near impossible to post youtube videos elsewise. that’s why i post them here so often. i finally installed WPvideo because i needed to post some videos in my portfolio.

Now, I understand wanting a link back. I love having linkbacks in my theme. but that’s in the footer. it’s not hard to add information to footers. spam karma does it. all it takes is a little add_action('wp_footer', 'wpvideo_footer');

that’s a damn sight different than sticking a link to your plugin in my #CONTENT, EVERY TIME i insert a video. so i deleted all credit for it. It’s my video, not yours. don’t go plastering your name on it. so i found:

$htmlcode .= '<div class="wpv_self"><a href="http://www.skarcha.com/wp-plugins/wpvideo/">WPvideo ' . WPV_VERSION . '</a></div>';

and emptied the variable, so the line reads:

$htmlcode .= '';

Also i’ve found that WP-SWFObject plus the Flash Video Player is a fantastic combination.

WordPress CMS: Sane Menus

Over the past couple days i’ve moved my entire portfolio from static HTML pages to wordpress pages. for the moment i’m using one template for all of them. With static HTML I was using 1 template per project, which let me show only the current project’s pages in the side menu, and the list of projects in the top menu. (example). With Using 1 template, it’s tempting to use <?php wp_list_pages() ?> to generate the side menu. except that i have A LOT of pages. 38 at last count. So I want the side menu to only show the list of projects, and the list of subpages for the current project.

While I could do something like hiding .pagelist ul ul ul in CSS, and then making .pagelist ul li.current_page_item visible, the nexted lists under .current_page_item always looked kind of stupid, since there’s no way to style them individually. So I looked to squible. because I remembered karrde dealing with a submenu that showed other children of the current page’s parent. so now my menu looks like this:

Continue reading

I hate javascript

no, i’m fucking serious.  del.icio.us launches network badges and they wrap 2 images, 5 links, and a paragraph inside a javascript for NO FUCKING REASON WHATSOEVER.  so now whenever joe n00b comes bouncing into the forum asking how to add it to his sidebar, we have to explain the intricacies of ‘view selection source’, so we can grab the HTML instead of the stupid javascript.

i’m only so pissed because networks are such a good idea.

at this point, though, the forum is so full of threadjackers and adsense haters on the warpath, i’m having a hard time spending time in there.