Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Tuesday, October 19, 2010

Some small modifications of the SimpleFolio Wordpress theme

I'm using the delightful SimpleFolio Wordpress theme for the Rabbit Software website. I made a donation; it's nice to support good opensource work.

I found a few issues with it that I have addressed.

1. The single post view was incorrectly showing the excluded "Portfolio" category in its Recent Posts sidebar widget. In this theme, you can select a specific category to populate the homepage slideshow. One doesn't necessarily want those posts to appear as normal blog posts. Unfortunately, the exclusion function wasn't working on the single post view page. This problem is easily addressed by editing the sf_portfolio_filter function in the theme's functions.php file.

Change line 50,
if(!is_archive() && !is_admin() && !is_single()){
to
if(!is_archive() && !is_admin() ){


2. I'm using more than 3 homepage widgets, and they weren't wrapping nicely. While the first one had a proper margin-left:0, the fourth one had the default margin-left:30px. I realized there must be some javascript at work behind the scenes, inserting the inline styling to adjust the left margin. Indeed, I opened custom.js in the js folder, and found this line:
$(".home_widgets .widget:first").css("margin-left", "0");
A bit of snooping on the JQuery site clarified this usage for me, and I added this line:
$(".home_widgets .widget:eq(3)").css("margin-left", "0");
to make the 2nd line of 3 widgets line up with the first batch.


3. Of course, I've made a few custom tweaks to the stylesheet so far, such as adding more space below the unordered lists in the .home_widgets .widget class, and adding underlines to the links in the .home_widgets .textwidget.

Monday, July 20, 2009

Eclipse crashing when typing $

Eclipse 3.5 has been hanging almost every time I type a "$" character... and that's quite often. Every time this happened I had to force-quite on my Mac. At least PDT fixed that ridiculous "Selection Job Titile" error with this release.

Michael of Amptools kindly posted this bug to the Eclipse project, too. In the meantime I reverted to writing code in TextMate, no hardship there, but no "intellisense" treats either.

After uninstalling, reinstalling, and much gnashing of teeth, I did some more searching and pondering about this error.

This post gave me the clue I needed to deal with this problem.

The problem is solved by changing the Auto Activation code assist to a longer delay.

Preferences->PHP->Editor->Code Assist->Auto Activation

I'm finding that increasing the auto activation from 200 to 1000 is solving the hangs.

Yay!