Jan 28 2008

Diggita on Sociable

Classified in: Wordpresspaomic at 9:26 pm

Should you need an Italian digg-like website, and you use the sociable plugin for wordpress, you can add it to the social list by adding these lines to socaible.php file:

‘DiggIta’ => Array(
‘favicon’ => ‘diggita.png’,
‘url’ => ‘http://www.diggita.it/submit.php?url=PERMALINK&title=TITLE’,
),

Tags:

Jan 27 2008

CakePHP and EXTJS tree

Classified in: CakePHPpaomic at 12:11 pm

Hi all!

I had to insert a tree in order to edit the structure of a menu. I found out that extjs tree are great! It lets you add a tree with dynamic content and move node from the root to leafs. So I tried integrating it, it’s really easy.

I added a js function to the tree javascript (from the reorder example in the extjs package)

function getTreeContents(tree) {
return getNodeContents(tree.root,true);
}

function getNodeContents(node) {
var s = ”;
if(node.childNodes.length > 0)
{
for(var i=0; i<node.childNodes.length; i++) {
s+= node.id+’-'+node.childNodes[i].id +’|';
s += getNodeContents( node.childNodes[i],false);
}
}
return s;
}

This returns a list of parentid-childid which, everytime the tree is changed, I add to a hidden textbox. Then I get the value of this textbox in the controller code, parse it and update all the nodes according to passed values.

That’s it!

Tags:

Jan 18 2008

Sun buys MySQL

Classified in: Technology newspaomic at 9:15 am

Sun anounced Wednesday that it acquired MySQL, the open source database system, critical part of the LAMP (Linux operating system, Apache web server, MySQL database manager and PHP/Perl programming languages) framework, for $1 billion.

Tags:

Jan 15 2008

HTML select with background (image or icon next to text)

Classified in: CSS, Designpaomic at 9:28 pm

I’ve found out a nice article on how to place an icon or image next to a select option. This is the sample css:
<select name=”issuetype” id=”issuetype”>
<option value=”1″ class=”imagebacked” style=”background-image: url(/images/icons/bug.gif);” selected>
Bug
</option>
<option value=”2″ class=”imagebacked” style=”background-image: url(/images/icons/newfeature.gif);”>
New Feature
</option>
<option value=”3″ class=”imagebacked” style=”background-image: url(/images/icons/task.gif);”>
Task
</option>
<option value=”4″ class=”imagebacked” style=”background-image: url(/images/icons/improvement.gif);”>
Improvement
</option>
</select>

option.imagebacked {
padding: 2px 0 2px 20px;
background-repeat: no-repeat;
background-position: 1px 2px;
vertical-align: middle;
}

Here’s an example:

HTML select with background (image or icon next to text)

EDIT: actual dropdown

Tags:

Jan 15 2008

DVD recorder

Classified in: DVD recorder, HDDVDpaomic at 6:22 pm

If you need advice on DVD recorder, try those ones below!

First of all, think about buying a HD-DVD or Blue-ray recorder, they’re the future of disk storage. Seems like the future will be Blueray, because Sony standard was embraced by Paramount a few days ago, and it seems that Toshiba and Microsoft one, HD DVD, will soon get out of the way. Too bad for the costumers, a little price war would be good!

Also, if you need to buy a DVD Recorder, these are a few brands: Sony, Philips, Pioneer, LG, Optorite.com, Panasonic, Toshiba, Daewoo, Lito on, TX, Samsung

Tags:

Next Page »