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 /

Adding ICQ or other profile field's value in the message area (in main_posts_cell.html )

 
MrPanza
Guest
#1 | Posted: 1 Mar 2006 21:30
Reply 
Hi, i want to put the ICQ number below the nickname in the messege author information that apears when yo see the messeges.
The template main_posts.html use the variable $l_author, but i canīt find it anywhere else...
how can i do that?

Thanks!
_Marco
Forums Member
#2 | Posted: 2 Mar 2006 00:01
Reply 
Does this work?

1. Add in setup_options.php:
$userInfoInPosts=array($dbUserSheme['user_icq'][1]);

2. Add in main_posts_cell.html:
{$userInfo_user_icq[$poster_id]}

_Marco
MrPanza
Guest
#3 | Posted: 2 Mar 2006 03:12
Reply 
Thanks Marco!!!
It`s working!!!
ezkim0x
Forums Member
#4 | Posted: 2 Jun 2006 18:46 | Edited by: ezkim0x
Reply 
I know all I have to do is add 'user_icq' to userInfoInPosts array in setup_options.php .. and then for it to display I would add {$userInfo_user_icq[$poster_id]} .. but I want to do display something else then just the name.. but since the template is a .html file I'm not sure how.

something like this in php..

<?php if ({$userInfo_user_icq[$poster_id]} != "") { echo "test"; } ?>

so if they didn't enter anything for that field it wouldn't display "test" .. but if the field isn't null it would display it.

(i'm not positive if that's the right php code or not, but you get the idea.)

how would I do something like this?
realitybytes
Forums Member
#5 | Posted: 2 Jun 2006 21:56
Reply 
If it is null then you have nothing to worry about you just need to create the parse.

function parseUserInfo_user_icq($icq){

return '<span class=txtSm>'.$icq.'</span>';

}

then add the following to the template where you want it to be displayed

{$icq}
ezkim0x
Forums Member
#6 | Posted: 2 Jun 2006 23:57 | Edited by: ezkim0x
Reply 
I put that function in bb_functions.php ?
realitybytes
Forums Member
#7 | Posted: 3 Jun 2006 01:55
Reply 
bb_specials.php
ezkim0x
Forums Member
#8 | Posted: 3 Jun 2006 02:11
Reply 
added it there, but it's still not displaying on main_posts_cell.html

I tried both: {$icq} & {$icq[$poster_id]}
realitybytes
Forums Member
#9 | Posted: 4 Jun 2006 03:04 | Edited by: realitybytes
Reply 
Hi hopefully this should clear it up

http://www.minibb.com/forums/5_2263_0.html
ezkim0x
Forums Member
#10 | Posted: 4 Jun 2006 15:52
Reply 
awesome thanks.. got it working now.
Anonymous
Guest
#11 | Posted: 5 Oct 2006 10:27
Reply 
Question:

I see about three references to including registration date, number of posts, etc in this forum, however, I have tried everything possible, and seem to be running to displaying them.

I am trying to include the avatar and number of posts. I am getting either number of posts, OR I get the avatar, but not at the same time.

Here is what I have in the setup options.

$userInfoInPosts=array('user_custom1',$dbUserSheme['username'][1]);
$userInfoInPosts=array('num_posts',$dbUserSheme['username'][1]);

This displays the posts, but removes the Avatar. If I add the // to the num_posts line, then I get the avatar back.

Here is what i am using in the main_post_cell.html:

Avatar: {$userInfo_user_custom1[$poster_id]}
Posts: {$userInfo_num_posts[$poster_id]}

Also, I have two other questions:

1. What is the [1] (....$dbUserSheme['username'][1]); ) suppose to be?
2. If I decide to use regdate, how would I use for the setup_options and the template?

Thanks!
Paul
CEO
#12 | Posted: 6 Oct 2006 02:38
Reply 
You need to define

$userInfoInPosts=array('user_custom1',$dbUserSheme['username'][1], array('num_posts',$dbUserSheme['username'][1]);

You're adding the stuff for main_post_cell.html correctly.

$dbUserSheme['username'][1] equals to users table's "username" field name. This setting is defined above in the same file.

For the regdate, you need to add to $userInfoInPosts a value 'user_regdate'. Then paste in main_posts_cell.html a variable {$userInfo_user_regdate[$poster_id]}
 
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 - 32
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®