code snipits

Mandrake vs. the Sheep

I really like the electric sheep screen saver. I have it installed on my work machine which is of course debian, which makes everything easier. At home though, no such luck. I didn't find any mandrake packages, so I just installed it. It actually worked first go for me.

Here's what I did:

1) download source

2) following commands:
[arthur@toaster arthur]$ tar -xzf electricsheep-2.5.tar.gz
[arthur@toaster arthur]$ cd electricsheep-2.5/
[arthur@toaster electricsheep-2.5]$ ./configure
[arthur@toaster electricsheep-2.5]$ make

Make Firefox use the FURL popup

So I'm giving furl a whirl to manage bookmarks. I tried the del.icio.us root, but honestly was not impressed by the interface, so I opted for furl. The problem with furl is that the popup that they use for logging links doesn't play nice with firefox's (my standard browser) popup blocker. Figuring there had to be a fix, I found one.

wee buttons

Ok, so I've been obssessed with css all week. In fact, I've been not sleeping at night and thinking about css. Which is sort of bad because I'm not very good at it. I'm sort of going through the process of rethinking all the things I know about tables and applying them to css. Or converting them. Or something. So I made some xml buttons. Just to see what I could do.

So the css looks like this:

[code]

xml {

background-color: #000000;
border: 1px solid #444444;
width: 110px;
height:12px;

margin-bottom:5px;
}

xml_label {

border: 1px solid #ffffff;
float:left;
width: 40px;

HTMLArea

html area. It's fantastic. While i'm bummbed that it isn't 100% cross browser compatible (mac ie and safari) I've done some things to it that improve this situation.

<

p>
For one, we have lots of dynamically generated textareas. I don't want to fill a page with 20 editors on textareas, so i did some mods to support having a click link to display the editor, as well as checking for mac ie to hide it.

[code]
// this is for the htmlarea wysiwyg editor. this hides it from mac ie and safari

Safari Compliant Tree Menus

Ok so I wanted to make a quick and dirty CSS menu tree that allowed for some submenus to appear when the parrent was clicked on. I found some code that worked ok (http://forums.devshed.com/archive/t-93308) but of course, safari choose to be a pain in the arse. Two central things came up: 1) safari wasn't hiding the submenu 2) safari opened the page with the submenu exposed. Style tags to the rescue!

multiple rss feeds and geeklog

Ok, working again with kellan on doing multiple rss feeds for the new media alliance site. Got a good solution, or at least a hack which allows three different rss feeds to be displayed. Joy! I'm doing this in a geeklog block via lib custom.

function phpblock_getnews() {
require_once '/home/mediaalliance/public_html/scripts/magpie/rss_fetch.inc';

// Set how often we want to update the feed (in hours)
$updateTime = 0;

// Open newsfeed page
$filename = "rssFeed.rdf";

// Check the current time
$rawNowTime = time();

ezpublish: last five articles

{*this grabs the last five articles from node 159, regardless of depth. It sorts by publish date in desending order, it also gives an excerpt of the top article and only names of the rest *}
{let test=fetch('content', 'list',
hash(parent_node_id, 159,
class_filter_type, "include", class_filter_array, array(2), "sort_by",
array("published", false()), "depth", 0)) }
{section name=Child loop=$test max=1}
{$Child:item.name}
{$Child:item.data_map.intro.data_text}
<a href={concat("/content/view/full/",$Child:item.node_id)|ezurl}>
Read more...</a> <br>
<br>
{/section}

Syndicate content