1
karuna
How to make the new added field in xoops_user show in newbb?
  • 2004/5/3 13:58

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Hi

i have added a field in xoops_uers
`new_field` tinytext NOT NULL

and added this

$posterarr =  array('poster_uid' => $eachposter->getVar('uid'), 'poster_name' => $eachposter->getVar('name'), 'poster_uname' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$eachposter->getVar('uid').'">'.$eachposter->getVar('uname').'</a>''poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status, [color=0000FF]'poster_new_field' => $myts->makeTareaData4Show($eachposter->getVar('new_field''N'), 111)[/color]);


in viewtopic.php

but in use the <{$topic_post.poster_new_field}> didn't got the content show.

but use
'poster_new_field' => $myts->makeTareaData4Show($eachposter->getVar('user_sig', 'N'), 1, 1, 1)
works

What's wrong with it ??

Thanks~~~

2
phppp
Re: How to make the new added field in xoops_user show in newbb?
  • 2004/5/3 14:37

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


How is the new_field value set?

3
Anonymous
Re: How to make the new added field in xoops_user show in newbb?
  • 2004/5/3 14:56

  • Anonymous

  • Posts: 0

  • Since:


Just adding a field to the user table will not shown via xoopsuser.

You also have to add this to the user.php in the kernel folder:

1. here

$this->initVar('new_field', XOBJ_DTYPE_TXTAREA, null, false, null);

function XoopsUser($id null)
    {
        
$this->initVar('uid'XOBJ_DTYPE_INTnullfalse);
        
$this->initVar('name'XOBJ_DTYPE_TXTBOXnullfalse60);
        
$this->initVar('uname'XOBJ_DTYPE_TXTBOXnulltrue25);
        
$this->initVar('email'XOBJ_DTYPE_TXTBOXnulltrue60);
        
$this->initVar('url'XOBJ_DTYPE_TXTBOXnullfalse100);
        
$this->initVar('user_avatar'XOBJ_DTYPE_TXTBOXnullfalse30);
        
$this->initVar('user_regdate'XOBJ_DTYPE_INTnullfalse);
        
$this->initVar('user_icq'XOBJ_DTYPE_TXTBOXnullfalse15);
        
$this->initVar('user_from'XOBJ_DTYPE_TXTBOXnullfalse100);
        
$this->initVar('user_sig'XOBJ_DTYPE_TXTAREAnullfalsenull);
        
$this->initVar('user_viewemail'XOBJ_DTYPE_INT0false);
        
$this->initVar('actkey'XOBJ_DTYPE_OTHERnullfalse);
        
$this->initVar('user_aim'XOBJ_DTYPE_TXTBOXnullfalse18);
        
$this->initVar('user_yim'XOBJ_DTYPE_TXTBOXnullfalse25);
        
$this->initVar('user_msnm'XOBJ_DTYPE_TXTBOXnullfalse100);
        
$this->initVar('pass'XOBJ_DTYPE_TXTBOXnullfalse32);
        
$this->initVar('posts'XOBJ_DTYPE_INTnullfalse);
        
$this->initVar('attachsig'XOBJ_DTYPE_INT0false);
        
$this->initVar('rank'XOBJ_DTYPE_INT0false);
        
$this->initVar('level'XOBJ_DTYPE_INT0false);
        
$this->initVar('theme'XOBJ_DTYPE_OTHERnullfalse);
        
$this->initVar('timezone_offset'XOBJ_DTYPE_OTHERnullfalse);
        
$this->initVar('last_login'XOBJ_DTYPE_INT0false);
        
$this->initVar('umode'XOBJ_DTYPE_OTHERnullfalse);
        
$this->initVar('uorder'XOBJ_DTYPE_INT1false);
        
// RMV-NOTIFY
        
$this->initVar('notify_method'XOBJ_DTYPE_OTHER1false);
        
$this->initVar('notify_mode'XOBJ_DTYPE_OTHER0false); 
        
$this->initVar('user_occ'XOBJ_DTYPE_TXTBOXnullfalse100);
        
$this->initVar('bio'XOBJ_DTYPE_TXTAREAnullfalsenull);
        
$this->initVar('user_intrest'XOBJ_DTYPE_TXTBOXnullfalse150);
        
$this->initVar('user_mailok'XOBJ_DTYPE_INT1false);


2. starting at line 287

function new_field()
    {
        return 
$this->getVar("new_field");
    }


And also in the function insert()

4
karuna
Re: How to make the new added field in xoops_user show in newbb?
  • 2004/5/3 15:14

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Thank you very much~~

Login

Who's Online

138 user(s) are online (73 user(s) are browsing Support Forums)


Members: 0


Guests: 138


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits