Thank you to A.P. Lawrence for his suggestion at:

http://aplawrence.com/Unixart/recursivegrep.html

His command reference to:

 find . | xargs grep whatever

was exactly what I was looking for.

I wanted my widget to offer an admin drop down of  category names that would then be used to show an end-user dropdown of sub-categories.  However the get_categories function does not allow a straight use of category name.

A Big thank you to:

http://wptricks.net/how-to-detect-category-id-using-the-category-slug-in-wordpress/

That offers this code

<?php
$theCatId = get_term_by( 'slug', 'tutorials', 'category' );
$theCatId = $theCatId->term_id;
?>

//Which I used like this and finds a category with a name of "Great Authors"

$theCatId = get_term_by( 'name', 'Great Authors', 'category' );
$theCatId = $theCatId->term_id;
$categories=  get_categories("child_of=$theCatId"); 

NOTE:  Need to have “global” line in order to get the blod_id attribute.

Last line takes what is retuned as the path:  /blog1/  and strips both slashes and capitalizes the first letter so you should end up with Blog1

function genesis_breadcrumb($args = array()) {
global  $current_blog;
$blog_id = $current_blog->blog_id;
$homelabel = get_blog_details( $blog_id )->path;
$homelabel = ucfirst(substr($homelabel,1,strlen($homelabel)-2));

Thanks

http://php.net/manual/en/function.ucfirst.php

http://codex.wordpress.org/WPMU_Global_Variables

http://codex.wordpress.org/WPMU_Functions/get_blog_details

I need to link to external images, however sometimes they do not exist or the server is busy, so I get a red “x”.  The javascript below is a way to use a different “Not Available” picture in case one is not available.

Thank you to:

http://www.tech-evangelist.com/2007/09/15/missing-image-fix/

and ThomAce http://www.irt.org/feedback/4755.htm

——- My example Code I used:

<script language="JavaScript" type="text/javascript">

function onImgErrorSmall(source)
{
source.src = "http://www.website.com/img/nopic.jpg";
// disable onerror to prevent endless loop
source.onerror = "";
return true;
}
</script>

How to call it:

<img src="http://content.outside.net/real.jpg" onerror="onImgErrorSmall(this)">

I would like to thank ubuntuguide.org for this page on what packages need to be installed for Compiz to work.

The URL is here: http://ubuntuguide.org/wiki/Ubuntu:Lucid#Desktop_Add-ons

It is a great starting place and has many more package names for other features as well.

Such as:

Install Java, Flash etc
sudo apt-get install ubuntu-restricted-extras

Screenrecording software
sudo apt-get install gtk-recordmydesktop

Anyway, I have not gotten the exact sequence down, but I have down the following:

Installed Kubuntu 10.4 LTS (CD ISO) into VirtualBox 3.2.6 and made sure 3D was checked under Display settings.

This came up fine, but under the settings I could not enable Desktop Effects compositing.  That is when I went looking for something like the above.

The current upshot is that I had to install the following packages:

compiz-kde
compiz-fusion-plugins-extra
compiz-plugins
compiz
compizconfig-settings-manager
compiz-core
compiz-fusion-plugins-main
compizconfig-backend-kconfig
librsvg2-common

libemeraldengine0
emerald

fusion-icon

A key thing is that once you install them, you will still have to turn them on.

This is done by running the compiz settings manager (search for it).

Then after that run fusion (it should come up with the compiz search)

This a rough draft and I am still finalizing the process.

Linux Mint 9

Posted: July 2, 2010 in Cool Stuff

I like Ubuntu (see other post) and I am looking forward in learning more about it.  I come from a Windows background, so Linux Mint saves me some time out of the box to get started and able to surf without problems. http://www.linuxmint.com/

WordPress MU (wordpress.org)

Posted: July 2, 2010 in Cool Stuff

I have found WordPress MU 2.9 http://mu.wordpress.org/ to be a great example of a framework for Web 2.0 technologies.  It is structured allowing a great community of contributed plug-ins and themes to be created.  However, it is flexible enough to allow you to slip in PHP code / HTML in where you need it to be without jumping through too many hoops.

Problem

I am getting into Virtual Box 3.2.6 from Oracle ( http://www.virtualbox.org/ ).  However for both Ubuntu 10.4 LTS JeOS 64 bit server and now the Linux Mint KDE RC 32 bit, I get the:  “VirtualBox Guest Additions kernel modules . . . fail!” message and that I should look in /var/log/vboxadd-install.log to see what is the matter. Read the rest of this entry »