| Re: Display new field in newbb |
| by etcetera on 2009/7/6 10:50:58 bump? |
| Re: Display new field in newbb |
| by etcetera on 2009/7/1 13:47:41 This is excellent! Thank you very much, zite83. Question: would anyone mind taking this idea and applying it for use on /modules/profile/userinfo.php ? I ask because I know absolutely no PHP, and am entirely incapable of doing it myself. lol I would like the same outcome - I'd like to be able to call each variable individually, so that I can embed it in my own html. |
| Re: Display new field in newbb |
| by pablo103 on 2009/5/31 2:38:23 Superb! |
| Re: Display new field in newbb |
| by robin_hood on 2009/5/30 22:45:52 Works!!! Thank you all |
| Re: Display new field in newbb |
| by zite83 on 2009/5/28 22:52:09 After playing with this some time, this is what I have come up with. You do need to alter / modify the user.php class file. STEP 1 locate getInfo in user.php file le="color: #000000"><?php function getInfo() { global $xoopsModuleConfig, $myts; $userinfo=array(); $user =& $this->user; STEP 2 add these two lines of code to line 229 le="color: #000000"><?php $profile_handler = xoops_getmodulehandler('profile', 'profile'); $profile = $profile_handler->get($user->getVar("uid")); so it ends up looking like this le="color: #000000"><?php function getInfo() { global $xoopsModuleConfig, $myts; $userinfo=array(); $user =& $this->user; $profile_handler = xoops_getmodulehandler('profile', 'profile'); $profile = $profile_handler->get($user->getVar("uid")); STEP 3 Which should be line 242 add this line of code le="color: #000000"><?php $userinfo["myfield"] = $profile->getVar('myfield'); STEP 4 in newbb_thread.html under the modules templates add this anywhere you want myfield to be displayed le="color: #000000"><?php <{$topic_post.poster.myfield}> All you now have to do is repeat steps 3 and 4 and that should do what you want. Also remember to update your template files after you make the changes. I hope this helps, I don't really know how to program all that well, but playing with what I have read in this topic this is what I have come up with Tested it with XOOPS 2.3 and cbb 3.08 |