minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Master Class miniBB Community Forum / Master Class /

Getting parsed values of user profile fields specified under $userInfoInPosts

 Page:  ««  1  2  3 
Paul
CEO
#31 | Posted: 18 Feb 2008 04:27
Reply 
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...
Helmet
Guest
#32 | Posted: 18 Feb 2008 16:36
Reply 
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!
Paul
CEO
#33 | Posted: 19 Feb 2008 04:03 | Edited by: Paul
Reply 
My god that was easy.

- sure ;-) I myself dislike complicated things so I don't create them... Welcome.
 Page:  ««  1  2  3 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


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

Before posting, be sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 37
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®