Archive for June, 2007

I’m a PHPer, how hard is it to learn Ruby on Rails?

Thursday, June 28th, 2007

I wanted to know if there are people around with a PHP background who learned RoR. When I see some RoR code I instanly have a migraine attack. Is it worth it and is it possible to learn RoR?

Password Encryption On AIM’s TOC Protocol

Thursday, June 28th, 2007

I was just reading the code for BlueTOC, an open source PHP library that allows web applications to connect with AIM servers and hold chat sessions, and I noticed something interesting. Instead of encrypting the login password for transport, they use a custom one-way hash they call "roasting" and before they roast anything, they need a special AIM signin code that looks unnecessarily complicated:


function get_signin_code()
{
// We get the ascii value of the first character of
// the username and password and then we subtract
// 96 from each value
$name = ord( strtolower( str_replace( " ", "", $this->aim_user[0] ) ) ) - 96;
$pass = ord( $this->aim_pass[0] ) - 96;
// Then we do some math
$a = $name * 7696 + 738816;
$b = $name * 746512;
$c = $pass * $a;
// And then we have some weird signon code we need
return $c - $a + $b + 71665152;
}
function roast_password( $password )
{
$roasted = '0x'; // Let's start the roasted password with 0x
// For each letter of the password, let's "roast it"
for( $i = 0; $i < strlen( $password ); $i++ )
{
$roasted .= bin2hex( $password[$i] ^ $this->roast[$i % 7] );
}
return $roasted;
}

It's always interesting to see how other companies handle security, and this is just one way that America Online probably devised a few years ago that stayed in place through today.

I’d like to learn COCOA programming

Thursday, June 28th, 2007

I'd like to learn to use X-Code, I have no knowledge on programming at all, where to start from? Which "books"? Sites or Tools do I need?

My Dream For Local Search

Tuesday, June 26th, 2007

For all you coders out there

Monday, June 25th, 2007


roofs v4.0 goes live

Sunday, June 24th, 2007

byroofs

roofs is Agnieszka Garofeanu’s great design portfolio. I helped Agnieszka with the coding for the site. The site uses a variable height SWF as described by Hoss Gifford here. This allows browsing multiple large images easily by using the browser scroll bar. I like the way the site navigation is really simple, allowing you to focus on the content.

Wordpress, Lightbox and my site.

Saturday, June 23rd, 2007

Now those previous issues have been rounded up and remorselessly shot, there's an issue with lightbox on my site.

Whenever I activate it - either the long way or via any of the many plugins - something odd happens:

Lightbox, the animations, etc, all work perfectly fine. However, the shelves refuse to open.

I wonder if there are some lines of code contradicting each other? Possibly the plugin is trying to lighbox the .gifs used in the shelves? What on earth's going on?

I'm using: http://www.4mj.it/lightbox-js-v20-wordpress

OPML Sharing

Saturday, June 23rd, 2007

A while back a forum I frequented had a little OPML trading thread. It got a lot of attention (from the forum members anyway) and helped turn me on to a bunch of new feeds and sites.

So I thought I'd give it a shot here too. It super easy just put your OPML file up on the web somewhere and give a link to it.

Here's mine.

Share and Enjoy!

Wordpress: Featured post and one post from each category

Thursday, June 21st, 2007

I have a bit of code, but it seems horrendous. I have to include 7 loops - eight categories and a 'featured' post with some special CSS styling.

Can I simplify this? Can I pull the posts out of the SQL database directly, to avoid all the loops, and will that speed up page load times? Is there a plugin that already does some/most of this? Should I be using another CMS? My layout is as follows:

Layout

So, to clarify, each of the 'Category' sections will have only the most recent post from that category. The relevant snip of code:

<?php
while (have_posts()) : the_post();
$feature = get_the_category(); $feature = $feature[0]->cat_ID; ?> <!-- $feature is the ID of the category of the feature post, used later to ensure that the feature post isn't repeated. -->
<?php the_excerpt(); ?>
<?php endwhile; ?>
<?php
$arr = array(1, 2); // Grouped into sets of two categories.
foreach ($arr as $catno) {
if ($feature == $catno) { $offset = 1; } else { $offset = 0; } <!-- If feature is in selected category, offset by one so the feature post isn't repeated. -->
query_posts('cat=' . $catno. '&showposts=1&offset=' .$offset);
while (have_posts()) : the_post();
?>
<?php the_excerpt(); ?>
<?php endwhile; } ?>

And the full code. I'm not afraid to play with PHP, but I don't know Wordpress or its hooks (aside from the basic template tags stuff).

Thank you guys, this is my first note!

UTW plugin help

Wednesday, June 20th, 2007

I've installed Ultimate Tag Warrior on my blog, and the formatting is great when I there's only one article in the tag list, like so.

However, when you click on a tag that includes more than one article in the list, it knocks the formatting of my sidebars out and whows them beneath the UTW content rather than beside it, like so.

Any help at all is much appreciated.


Created by DesignForWeb company. All rights reserved © 2007-2010. Check also the iPhone / iPad developers blog
Disclaimer
The materials collected in this blog were taken from open access sources. We try our best to preserve the copyrights of original authors and clearly state the authorship as well as link to original source website where it's possible. Please leave your comment if you feel offended by any post or if you dispose of any information about breach of copyright law in this blog. We will do our best to resolve the situation immediately.