Main menu

Hi, My Name is Slava, and this is my site. It's not empty anymore, however I need to write more here.

Once upon a month..

..I remind myself that I have website, and sometimes I should write something here. Now, this time is came. What can I write now - is that yes, I blame myself that I don't write too often. And, why it's so complicated with all that EST, DST, UTC and other timezones? It's really confusing, especially on March 25th, when Ukraine moved to 1 hour ahead. Thanks there's sites like this - it's helped me.

Date order

Whoops. It's looks like I did it wrong way - in my weekly schedule I wrote 27 march - 3 feb instead of proper 27 feb - 3 march. Funny I noticed it at the end of the week.

Date order

Win 7 just fine

Damn, Ubuntu is totally ok for development, you know, it's lots easier to use built-in console and web-servers, but for internet and home pc.. it's way too unusual. I didn't get used to it, so brand fresh and clean Win 7 appeared on my laptop. However, Ubuntu still will be there - Just because it's really nice to work in proper environment.

New theme is on the way.

Tags: 

When I'm tired of my project (that's shame, agree), I actually trying to do at least something useful - like building starter bundles of Drupal 6,7 with pre-installed and pre-configured useful modules like Devel, Coder, etc. Today, I've starter to draw a design for this site - I want something nice looking and this is a great opportunity to try some techniques. And to do something useful, for sure. Too bad I can do in only at work, since home's laptop running with Ubuntu and Gimp is still unclear for me. P.S as a small thank you to theme creators which inspired me, if you're looking for handy Wordpress themes, take a look at themify.me - It's worth it. I got inspired by Suco and Folo themes.

Actually, i'm almost copying Suco, he-he=), shame on me for that. Shame shame shame.

Custom user registration, RPX and stuff.

Short notice: if you implementing your custom user registration via email, and you need, for example, to generate username from email, do this in hook_user, not in your custom user_register_form_submit.

Why? because registration first invokes hook_user($op = 'insert'), and then it goes to form_submit. In my case, after doing it right way, correct username, generated from email, not the random one, was sent in registration email.

In my current project, email_registration module was used for implementing registration by email without username. It worked fine untill rpx module was 1.4, but went totally wrong when we updated rpx to 2.1 for sake of social sharing feature. In short, there was approach changed - rpx 1.4 was using own register form, so it's totally overrides default form. (and thanks to that fact, email_registration worked fine). In 2.1m rpx started to use default register form with adding own stuff in hook_form_alter, and overriding default register form_submit with it's own.

So, what we have? On one side, rpx takes care about user registration, on other side, email_registration saves and authenticates user again. And the funny thing, that both sides mixes their parameters - for example, in registration email rpx's username was sent, but in pair email_registration's pass and vice versa.

After all, I had to overwrite email registration to own module, but this time - in the way that both email registration and rpx module not disturbing each other.

And for those, who's interested in in details, take a look at email_registration module - it's pretty straightforward.

Me on the web block

Tags: 

Hey, check out this block I've just added. It's a bit Google style (if not all the Google style, lol), however I hope it's ok. And a one more Google search-styled thing is on the way - I just need to print it.

How to change default SVN editor

While I was catching up my experience with SVN and properties in particular, I faced this 'default' SVN console editor. Since I get used with vim, here's how to change default editor to another console editor from bash (vim in my case):

export SVN_EDITOR=vim

as result, conflicts, propedits and so on will be opened with vim. Profit!

Drupal so Drupal. Storing session for anonymous users.

Today I was engaged in the project with one tiny problem: for some reasons RPXnow.com gave up to login with Twitter accounts. After some code digging, it turns out that after drupal_goto() (weird function), $_SESSION has wiped. Well, yea, I know that drupal_goto executes session_write_close(), but what the heck, it should save session in DB before that. Agony could last forever, but fortunately I was reminded by one topic on drupal.org that for Drupal stores anonymous users session with UID 0. And before that, I guess some idiot (actually, I did it too, because I forgot about that fact) decided to "clean" database a bit, and he removed user with UID 0. So freaking simple. Anyway it was a pleasure to solve the problem, which has blown few heads.

Pages

Subscribe to meaningloads.net RSS
Thirty two monkeys worked here, and only one has the rights on it.
First time launched Sep 2008, Third time - June 2011.