miniBB ®

miniBB

®
Support Forums
  
 · Start · Sign in · Register · Search · Statistics · File Bank · 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 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 Lead Developer
#33 · Posted: 19 Feb 2008 04:03
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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Did you know that you may be allowed to hide miniBB credits and remove miniBB's copyright notice?