Дополнительные поля в профиле пользователя / Советы и решения / cogear - система управления сайтами, бесплатная cms для социальной сети http://cogear.ru/dopolnitelnye-polja-v-profile-158.html/ ru http://cogear.ru http://cogear.ru/templates/cogear/img/logo.png cogear - система управления сайтами, бесплатная cms для социальной сети <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-11059 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-11059 AracooL Fri, 22 Jul 2011 08:09:10 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-10932 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-10932 dignityinside Sat, 02 Jul 2011 00:04:55 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-6288 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-6288 Varhal Thu, 08 Jul 2010 16:21:16 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5106 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5106 $item['right'] = $this->builder->a($user->site,l($user->site)); заменить на

%s_trim=expand(':',$user->site);
if ($s_trim[0]='http'||$s_trim[0]='https'){ $item['right'] = $this->builder->a($user->site,l($user->site)); }else{ $item['right'] = $this->builder->a($user->site,l('http://'.$user->site)); }
З.Ы. Код не проверял, но должно работать. ]]>
suder Fri, 11 Jun 2010 21:19:43 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5105 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5105 Сча придумаю что-нибудь по-лучше… ]]> suder Fri, 11 Jun 2010 21:09:27 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5102 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5102 satagik Fri, 11 Jun 2010 20:44:05 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5101 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5101 suder, спешил. ]]> satagik Fri, 11 Jun 2010 20:42:03 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5099 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5099 suder, а во-вторых:

можно заменить
$this->builder->a($user->site,l($user->site)); на
$this->builder->a($user->site,$user->site);
но это не очень хорошая идея. приду домой, придумаю чего по-лучше. ;-) ]]>
suder Fri, 11 Jun 2010 20:05:23 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5093 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-5093 Пишем свой сайт вот так

сохраняем… заходим в профиль, переходим на сайт.


Анн нет. Мы переходим не по этой ссылке

а по этой

cuder как это исправить? ]]>
satagik Fri, 11 Jun 2010 16:54:13 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4990 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4990 suder ! ]]> Varhal Tue, 08 Jun 2010 18:01:21 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4987 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4987 Varhal Tue, 08 Jun 2010 16:34:48 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4986 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4986 s/index.php
а не gears/user/index.php? ]]>
suder Tue, 08 Jun 2010 16:28:33 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4985 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4985 Varhal Tue, 08 Jun 2010 16:21:30 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4984 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4984 suder Tue, 08 Jun 2010 16:17:13 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4983 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4983 Varhal Tue, 08 Jun 2010 16:11:10 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4982 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4982 suder Tue, 08 Jun 2010 16:08:14 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4981 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4981 Varhal Tue, 08 Jun 2010 16:05:21 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4980 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4980 Если точнее, там строчки:
$this->db->select('(SELECT COUNT(id) FROM nodes WHERE aid = users.id) as nodes_num, (SELECT COUNT(id) FROM comments WHERE aid = users.id) as comm_num, users.*'); $users = $this->db->order_by('id','asc')->get('users')->result_array(); foreach($users as &$user){ $user['avatar'] = reset(make_icons($user['avatar'])); } $header = array( ]]>
suder Tue, 08 Jun 2010 15:58:28 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4979 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4979 После этого должно заработать. ]]> suder Tue, 08 Jun 2010 15:55:19 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4963 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4963 SVN ]]> Varhal Tue, 08 Jun 2010 13:00:11 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4962 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4962
code class=foreach($users as &$user){
$user['avatar'] = reset(make_icons($user['avatar']));> ]]>
Varhal Tue, 08 Jun 2010 12:35:20 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4958 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4958 suder Mon, 07 Jun 2010 21:54:11 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4953 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4953 Varhal Mon, 07 Jun 2010 13:07:48 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4923 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4923 suder Sun, 06 Jun 2010 09:13:22 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4906 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4906 admin Sat, 05 Jun 2010 13:08:10 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4880 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4880
A PHP Error was encountered

Severity: Notice

Message: Undefined property: stdClass::$real_name

Filename: user/index.php

Line Number: 154 ]]>
Varhal Fri, 04 Jun 2010 18:47:40 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4161 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4161 inetlover Thu, 13 May 2010 10:00:48 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4160 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4160 if (!is_null($user->about)){
можно заменить на что-то вроде

if (!(is_null($user->about) && $user->about=='' )){
Это уточнение проверки (сохранить is_null требуется, поскольку если значение будет NULL, то php выведет ошибку о сравнение неприводимых типов, не?). Вообще, эта конструкция определяет, в каком случае выводить информацию. Еще можно проверять длину текста, etc. ]]>
suder Thu, 13 May 2010 09:39:11 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4121 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-4121 О себе: ->editor('about') данные не удаляются, единственная возможность удалить их — это написать NULL в поле и сохранить.

Вот только не пойму, как можно доработать код, что бы при сохранении пустого поля ->editor('about') в базу записывался NULL автоматически? ]]>
inetlover Tue, 11 May 2010 07:41:32 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2375 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2375 ОЧень будет полезна )))
Любые материалы в рамках движка интересны будут всем.
Полностью потдерживаю! ]]>
shm-valeriy Sun, 10 Jan 2010 19:33:59 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2370 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2370 А это будет достаточно скоро. ;-) ]]> suder Sun, 10 Jan 2010 11:15:35 GMT <![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2369 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2369
По этому поводу статья нужна?
Любые материалы в рамках движка интересны будут всем. ]]>
dqpb Sun, 10 Jan 2010 11:13:22 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2368 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2368
suder, а может вы полигончик организуете демо-тестовый?
Это легко, но все равно надо бы обсудить как и что.

P.S.
Сейчас пытаюсь реализовать фишку, чтобы админ сообщества мог назначать других админов и модеров. По этому поводу статья нужна? ]]>
suder Sun, 10 Jan 2010 09:51:06 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2366 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2366
suder, а может вы полигончик организуете демо-тестовый? ]]>
dqpb Sun, 10 Jan 2010 04:51:38 GMT
<![CDATA[]]> http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2362 http://cogear.ru/dopolnitelnye-polja-v-profile-158.html#comment-2362 inetlover Sat, 09 Jan 2010 20:58:16 GMT