15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

img code tag inside a custom field

Author Marius
#1 | Posted: 30 Jan 2007 06:48 
I've read and followed the instructions from here:

Detailed solution on how to add new custom field to user profile.

It seems to works fine, I wanted to use this field for a gamercard image hosted from another site. That's why I can't use the avatar addon for this.

I thought I had it working except that the image is not displayed, but only the html code. What needs to happen for custom fields to show an image on the message board when using html in that custom field?

Kind regards,

- I feel I'm close, not sure though

Author Paul
Lead Developer
#2 | Posted: 30 Jan 2007 08:34 
What exactly is stored in this custom field as for example?

You should create a function called parseUserInfo_customFieldName() and produce the output basing on this field's input.

For example I recently created something like this for one of my customers...

/* Gamer tag */

function parseUserInfo_user_occ($av){
if($av!='') return '

"'.$av.'"'; else return '


/* -- Gamer tag */

as you see it uses "occupation" field for storing gamer's nickname, but then parses this field and produces the necessary result.

Author Marius
#3 | Posted: 30 Jan 2007 11:18 
That's perfect...the function fixed everything and more!

kind regards,

Author Marius
#4 | Posted: 8 Feb 2007 02:51 | Edited by: Marius 
Hi, I've implemented this idea, which works great:

/* Gamer tag */
function parseUserInfo_user_custombd($av){
if($av!='') return '"'.$av.'"'; else return '{$posterName}';
/* -- Gamer tag */

I replaced:




within main_posts_cell.html

I was hoping that the following code used above, "else return '{$posterName}';", would generate the posterName if the poster did not register, but it doesn't.

I would like to use this so for the one forum that does not require registration, so it would show 'Guest' or 'Nickname' as poster name instead of the gamertag. All other forums require registration and so there is no concern.

How come this doesn't seem to work? Is it because the above function is only called for registered users?

Kind regards for this small and seemingly irrelevant request,


Author Paul
Lead Developer
#5 | Posted: 8 Feb 2007 04:41 
That will not work. {$posterName} should be always kept in the template since it indicates guest's or member's nickname on forums, and this is built-in into core minibb functions. What you could achieve with parseUserInfo_ function set, is just to parse additional profile's field and display its value beneath the {$posterName} or in some other part of main_posts_cell.html

Author Marius
#6 | Posted: 8 Feb 2007 04:58 
Is there a way to parse information of unregistered guests inside the parseUserInfo_ function set?

Author Paul
Lead Developer
#7 | Posted: 8 Feb 2007 09:09 
parseUserInfo_ is designed ONLY for user's profile as I wrote. If user has no profile, his data can not be parsed that way (and in general, his data can not be parsed any way).

Specific miniBB Support Forums / Specific / img code tag inside a custom field 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
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB