miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Master Class miniBB Support Forums / Master Class /   

Getting parsed values of user profile fields specified under $userInfoInPosts

Page  Page 3 of 3:  « Previous  1  2  3  
Author Paul
Lead Developer
#31 | Posted: 18 Feb 2008 04:27 
Your function should be called correspondingly to the column name in the table.

For example if column is named 'abc', function should be called 'parseUserInfo_abc()'. Then this function should be pasted in bb_plugins.php (possible by $action condition).

Refer to this article for more:

Adding new profile field in miniBB

It already contains example of the date function...

Author Helmet
Guest
#32 | Posted: 18 Feb 2008 16:36 
My god that was easy. My column name was "birthdate", so the solution is:

setup_options.php:

$userInfoInPosts=array('birthdate');

main_posts_cell.html:

<strong>Age:</strong> {$userInfo_birthdate[$poster_id]}

bb_plugins.php:

function parseUserInfo_birthdate($birthdate){
//code to convert yyyy-mm-dd to age.
}

Thanks Paul!

Author Paul
Lead Developer
#33 | Posted: 19 Feb 2008 04:03 | Edited by: Paul 
My god that was easy.

- sure ;-) I myself dislike complicated things so I don't create them... Welcome.

Page  Page 3 of 3:  « Previous  1  2  3 
Master Class miniBB Support Forums / Master Class / Getting parsed values of user profile fields specified under $userInfoInPosts Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB