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:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


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
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB