Warning: Declaration of LJXP_Walker_Category_Checklist::start_lvl(&$output, $depth, $args) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /var/www/u3357911/data/www/karta39.ru/blog/wp-content/plugins/lj-xp/lj-xp-options.php on line 771

Warning: Declaration of LJXP_Walker_Category_Checklist::end_lvl(&$output, $depth, $args) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /var/www/u3357911/data/www/karta39.ru/blog/wp-content/plugins/lj-xp/lj-xp-options.php on line 776

Warning: Declaration of LJXP_Walker_Category_Checklist::start_el(&$output, $category, $depth, $args) should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /var/www/u3357911/data/www/karta39.ru/blog/wp-content/plugins/lj-xp/lj-xp-options.php on line 781

Warning: Declaration of LJXP_Walker_Category_Checklist::end_el(&$output, $category, $depth, $args) should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /var/www/u3357911/data/www/karta39.ru/blog/wp-content/plugins/lj-xp/lj-xp-options.php on line 793

Warning: Use of undefined constant odnaknopka - assumed 'odnaknopka' (this will throw an Error in a future version of PHP) in /var/www/u3357911/data/www/karta39.ru/blog/wp-content/plugins/odnaknopka/ok2.php on line 11

Warning: Use of undefined constant ddsg_language - assumed 'ddsg_language' (this will throw an Error in a future version of PHP) in /var/www/u3357911/data/www/karta39.ru/blog/wp-content/plugins/sitemap-generator/sitemap-generator.php on line 44
Blog » 2010 » Январь

Архив

Архив Январь 2010

LiveStreet и Arduino/CraftDuino

23 Январь 2010 Нет комментариев


Здесь я уже писал, как ардуина может читать RSS-ленту. Используя тот же принцип можно сделать следующий шаг и научить ардуину вести свой блог 😉
Читать далее…

Идеальный Интерфейс — Круг друзей :)

17 Январь 2010 Нет комментариев


Нам всем не хватает идеальности и я решил восполнить это факт маленьким модулем :)

Пока он делает только одно — отображает круг друзей в профиле пользователя.
Надеюсь это только начало! :) Читать далее…

Использование Gravatar в LiveStreet

10 Январь 2010 Нет комментариев

Использовать у себя Gravatar.com очень просто. Аватарка выдаётся по url-у с md5-хешем e-mail-а пользователя.
Итого:
в classes\modules\user\entity\User.entity.class.php
находим функцию
public function getProfileAvatarPath($iSize=100) {
if ($this->getProfileAvatar()) {
return DIR_WEB_ROOT.DIR_UPLOADS_IMAGES.'/'.$this->getId().'/avatar_'.$iSize.'x'.$iSize.'.'.$this->getProfileAvatarType();
} else {
return DIR_STATIC_SKIN.'/images/avatar_'.$iSize.'x'.$iSize.'.jpg';
}
}

и изменяем всего одну строчку:
public function getProfileAvatarPath($iSize=100) {
if ($this->getProfileAvatar()) {
return DIR_WEB_ROOT.DIR_UPLOADS_IMAGES.'/'.$this->getId().'/avatar_'.$iSize.'x'.$iSize.'.'.$this->getProfileAvatarType();
} else {
return "http://www.gravatar.com/avatar.php? gravatar_id=".md5( strtolower($this->getMail()) )."&size=".$iSize;
}
}

К сожалению, в комментариях так просто получить аватарку не получится — так как там используется своя функция getUserProfileAvatarPath($iSize=100) из TopicComment.entity.class.php

Просто добавь Arduino!

2 Январь 2010 Нет комментариев