Hi, please

Author Archives: Mushon

Indexhibit sidebar – with sane id’s & classes

I made some changes to the commented index.php and the plugins index.php (which I found to be the one in charge of the sidebar structure) I basically changed the way these html elements are constructed through php and made sure they can be much more easily selected and styled.

Basically the sidebar I have now looks like this:

<div id="menu">
    <div class="container">
 
        <div class="top-section">
            <h1>Mushon</h1>
        </div>
 
        <ul class="nav sectional">
            <li id="Projects">
                <h3>Projects</h3>
                <ul>
                    <li><a onclick="do_click();" href="http://www.mushon.com/fall08/osd/indexhibit/index.php?/project/kriegspiel/">Just a test</a></li>
                </ul>
            </li>
            <li id="Info">
                <h3>Info</h3>
                <ul>
                    <li class="active"><a onclick="do_click();" href="http://www.mushon.com/fall08/osd/indexhibit/">Main</a></li>
                </ul>
            </li>
            <li id="oldstuff">
                <h3>old stuff</h3>
                <ul>
                    <li><a onclick="do_click();" href="http://www.mushon.com/fall08/osd/indexhibit/index.php?/project/older-one/">older one</a></li>
                </ul>
            </li>
        </ul>
 
        <ul class="bottom-section">
	        <p>Just testing</p>
        </ul>
 
        <!-- you must provide a link to Indexhibit on your site someplace - thank you -->
        <ul class="built">
            <li>Built with <as href="http://www.indexhibit.org/">Indexhibit</as></li>
        </ul>
 
    </div>	
</div>

So try it out and tell me what do you guys think?

Last week of class, many weeks left with OSD

OSD kinda sounds like OCD, which makes sense.

Basically I do hope our obsession with open source will not be over with the impending end of the semester, and while there’s only one week left we do have a lot to cover. Next week:

  • Wordpress sites
    Final presentations of Wordpress sites – prepare to present your work and summarize what you’ve been doing to customize your OS site to your needs.
  • OSD – Indexhibit
    • Finish your the contribution you made to Indexhibit. (if it’s collaborative, communicate about it through the list)
    • Write a post about it in our blog (including links to download or embedded video when necessary)
    • Write a post about it in the Indexhibit forum
    • Email the discussion list with your link to the Indexhibit forum
  • Our Last Class

    • Be prepared to give me some constructive feedback towards the next time I teach this class.
    • Feel free to bring some treats so we can celebrate the end of this amazing semester

Remember, this is the last week of the class. Initiative in open source is a complicated thing. Ideally, it should not be tied to your academic commitments. In our class it’s a bit of self initiated and directed by me. In this last week I do want you to take the lead. So I want to see some action and be spammed with tons of commits through out the week.

take care, miss you already.

Mushon

Computational Design

Recommended! Renda Morton’s class next semester:

The computer has become the primary tool of the graphic designer, yet we rarely use the computer to its full potential. By investigating and playing with code, we’ll learn the fundamentals of programming and ways in which we can use these skills to sketch or generate ideas for projects both on and off the screen. Students will learn how to program images, animations and interactions using Processing, an open source programming language and environment. Topics include generative design systems, data organization and visualization, and physical computing. No prior programming skills are required.

See also:

Processing 1.0
http://processing.org/

Design and the Elastic Mind Exhibition (MoMA)
http://www.moma.org/exhibitions/2008/elasticmind/

Making do and getting by: Software and design
by David Reinfurt
http://www.adobe.com/designcenter/thinktank/makingdo/

Read More »

WordPress 2.7 is out, improvise…

Go get it while it’s hot!

Getting serious with Indexhibit

Today in class we make plans to get the Indexhibit work done within the next two weeks. Each one of you will comment to this post with a commitment to what you intend to do by next week.
Current options (we can expand this list):

  • Write a css plugin
  • Write comments for the css code
  • Do a screencast of how to install Indexhibit
  • Do a screencast of how to use Indexhibit
  • Do a screencast of how to modify Indexhibit (maybe using Firebug too)
  • Write a post(s) to document our efforts
  • Float our user interface and accessibility concerns to the Indexhibit community (on the forums) and follow up the discussion to fix it.
  • more…

As the semester is neerly done, and since you guys seem to be much more in control of your Wordpress stuff, I think we should feel safe to swich gears and focus our attention on our OSD project – our class legacy…

Getting the first image from a Wordpress post

Here’s a Wordpress code snippets I thought you might find useful. It is a functions you can dump in functions.php and then use in your theme. This one would get you the first image from any post you pass it. This is a great way for you guys to get thumbnails for your posts without extra effort. Here we go:

Snippet

Paste this code into anywhere in your functions.php file

function get_first_image($post_ID, $fullsize=false, $max_dims=false){
	$thumbargs = array(
	'post_type' => 'attachment',
	'post_status' => null,
	'post_parent' => $post_ID
	);
	$thumbs = get_posts($thumbargs);
	if ($thumbs) {
		$num = count($thumbs)-1;
		return get_attachment_innerHTML($thumbs[$num]->ID, $fullsize, $max_dims);
	}
}

Parameters

This function expects to be passed three parameters: $post_ID The ID of the post you want the first image for (you can get it easily from the loop for example) $fullsize Are you trying to refer to the full size image? [true] or to the thumbnail [false]. Default: false $max_dims Do you want to make the image resize proportionally? If so, pass a single number [300] to limit it equally on both height and width or pass an array of two values, width and height [array(300,200)] to have different height and width size limits. If you don’t want to limit size pass false. [false] Default: false

Returns

This function would return the img tag with the alt tag, image resizing and all. So putting this in your theme:

get_first_image (35, true, array(300, 350));

Might return this:

  <img title="my image title" src="http://artfocus.org.il/en/wp-content/uploads/2008/08/durham-jd_coll-stones_brasilian2.jpg" alt="my image description" width="300" />

In this case http://artfocus.org.il/en/wp-content/uploads/2008/08/durham-jd_coll-stones_brasilian2.jpg is the full sized image, and being of landscape proportions it is being its size is being resized to proportionally fit the 300px width. If it would have been a vertical image, it might have resized by the 350px height and then its width might resize to less than 300px. Enjoy.

Thanks

Thanks to Crerem and Ben Colman, for providing bug report and patches to the code (thrugh the comments)

OK Indexhibit, let’s make you better

Indexhibit:

  • Write a CSS Plugin for Indexhibit, please communicate with the rest of us what your plugin will be about.
  • Chip in on the documentation for the Sandbox theme
  • Let’s communicate about our Friday gig.

Wordpress:

  • Start diving into plugins.
  • Make your theme links url independent.
  • Upload content to your blog.
  • Get ready to finish this thing.

Enjoy

WPing & OSDing

As our process becomes more self-directed, I do not have any specifics for you for next week but:

  • Continue down the WP path:
    1. try to finish the main page
    2. Next go to post page (single.php) (+ if relevant: comments.php)
    3. Then to page page (page.php)
    4. Then to the menus (archive.php archives.php author.php category.php tag.ph)
    5. Then to search (search.php)
    6. Last (/optional): 404.php, attachment.php, image.php, links.php)
  • Let’s get our heads into Indexhibit and how can we make it better:
    1. We’ll discuss it in class today
    2. Let’s share some findings from the Indexhibit forum that can shed some light on where to take this
    3. Let’s experiment with theming Indexhibit, it’s not hard, how can it be easier?
  • Leonie will be back next week with a ‘Great Wide Open’ for us.
  • Enjoy

Now really…

Ok,

we had a huge distraction this week, but now we dive directly into into theming our WP themes and into the final OSD project.

On the theme front:

  • Finish your main page (header.php / index.php / footer.php / sidebars.php)
  • when (/if) you get to it, go to post.php – it should be pretty easy to extend what you did in index.php to it.

On the OSD front (my proposal for moving forward):

  • Leonie: Please document your process of trying to install Indexhibit, including (mainly) the difficulties and frustrations. The format could be:
    • What are you trying to do?
    • What are you accomplishing through the official tutorial?
    • What do you do when you’re stuck?
    • How confident are you through the process?
    • What helps/extends confidence? What does the opposite?

    It will be a great way for us to learn about where we should focus our energies.

  • Karen, Khurry, Ed & Alexandra: I propose:
    • Research existing documentation of Indexhibit and based on it.
    • Try to install it on your servers.
    • Write a post proposing contributions you/we make to the project as designers (you can propose several and expand on at least one of them).

Leonie – Next week, Great/Wide/Open:

  • Got an idea? Yes? No? Talk to me…

Enjoy. (yes, we can)

I think that’s it!

Here is the final file