admin (no pm's please) Site Admin

 Virtual Cash: 42910
Joined: 22 May 2005 Posts: 19348
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Thu Apr 27, 2006 1:08 pm Post subject: Adding user profile fields |
|
|
This will be available shortly via the control panel login at :
http://myfreeforum.org/index.php?...amp;task=loginforum&Itemid=27
or
http://www.myfastforum.org/index....amp;task=loginforum&Itemid=27
In the custom profile section you need to enter the fields you require. To start a field type:
[FIELDNAME]
for example:
[GOOGLESEARCH]
Even by itself this will do something. If you now look under user management in the admin panel and edit a user, you will see:
GOOGLESEARCH [ ]
and you will be able to enter some data. But this is not very friendly. So let us change the defintion and make it:
[GOOGLESEARCH]
title=Search Google
Now if you edit a user you will see:
Search Google [ ]
This is an improvement, but more can be done. The html <input> field created will accept size, maxlength and style attributes. So to limit length for example we could have:
[GOOGLESEARCH]
title=Search Google
maxlength=100
So far all we can do is see things in the admin panel, but perhaps this is actually what you want. In fact we can ensure a field stays that way with a field like:
[ADMINCOMMENT]
title=Comment on this user
access=admin
visible=admin
Or perhaps we want our comment on a user to have the potential to be seen but not changed:
[ADMINCOMMENT]
title=Comment on this user
access=admin
visible=all
The access and visible parameter can be given one of the values:
user
admin
all
So how does the user see the information?
When they edit their own profile, you have to have done one of two things, or both if you are mixing methods!
Firstly, you can place the text:
{XPROFILE}
into profile_add_body.tpl where you want the fields to appear, generally between one row and the next. This will add the fields in a default format. Or you can enter a field yourself:
For example:
<input name="GOOGLESEARCH" value="{GOOGLESEARCH}">
Note that {GOOGLESEARCH} will be replaced with the actual value of the field. If you have done this, the the field will appear twice, as it will have been done both automatically in {XPROFILE} and manually. You can stop this with the definition:
[GOOGLESEARCH]
title=Search Google
automatic=no
So how about displaying information in the profile to other users?
In profile_view_body.tpl we could use the following macros:
{L_GOOGLESEARCH} which is the title
{GOOGLESEARCH} the value
{GOOGLESEARCH_IMG} the image and link if one has been defined.
In viewtopic_body we have:
{postrow.GOOGLESEARCH} the value
{postrow.GOOGLESEARCH_IMG} the image and link if one has been defined.
So what about this image and link? These can replace a text item as follows:
[GOOGLESEARCH]
title=Search Google
url=http://www.google.co.uk/search?hl=en&q={GOOGLESEARCH}&btnG=Google+Search&meta=
image=lang_english/google_icon.gif
Note the images are always expected to be in your template directory. In the url you can see how {GOOGLESEARCH} will be substituted with the value of the field.
Other options.
Use "register=yes" to make the custom fields visible when someone registers. This defaults to "no" as there are far to many things for someone to enter when registering already.
If you want a multiline entry then use:
type=textarea
rows=4
cols=20
Note that in common with all profile fields apart from the user signature, the custom proflle fields do not currently accept either bbcode or html.
_________________
Family Friendly Shareware | | Web Design/Services | Free Forums
Last edited by admin (no pm's please) on Fri May 12, 2006 12:56 am; edited 2 times in total
forum.myfreeforum.org |
|
| Back to top |
|
 |
Billgar Apprentice


Joined: 05 Sep 2005 Posts: 243
Add Karma
 rated by 1 members
Add Comment
Show Comments
 |
Posted: Fri Apr 28, 2006 12:33 am Post subject: |
|
|
FREAKING AWESOME!
But what about profile additions such as adding fields like..
Favorite Band, or Hopes and Ambitions
I wanted to be able to do this type of editing, when will that exist? _________________
DarkRoostermusic
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42910
Joined: 22 May 2005 Posts: 19348
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
|
| Back to top |
|
 |
Billgar Apprentice


Joined: 05 Sep 2005 Posts: 243
Add Karma
 rated by 1 members
Add Comment
Show Comments
 |
Posted: Sat Apr 29, 2006 3:22 pm Post subject: |
|
|
| admin wrote: | Aside from multiline entries what is can't you do with this set up?
multiline will be along in a bit. |
I think that im confused on how to use it, and what it does then.
Also, when will it be up? _________________
DarkRoostermusic
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42910
Joined: 22 May 2005 Posts: 19348
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Sat Apr 29, 2006 3:33 pm Post subject: |
|
|
Given the failure to alpha it this week, we will probably have multiline in when it goes alpha. Which should be next Saturday.
Getting the alpha installed is quite a big thing, as it involves not just the forums admin, but the forums themselves and the forums management system.
Converesely the template editor was something that only effected forum admin. e.g. a whole lot less of an issue to install. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| Back to top |
|
 |
Billgar Apprentice


Joined: 05 Sep 2005 Posts: 243
Add Karma
 rated by 1 members
Add Comment
Show Comments
 |
Posted: Fri May 05, 2006 12:59 am Post subject: |
|
|
Any updates on this? _________________
DarkRoostermusic
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42910
Joined: 22 May 2005 Posts: 19348
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
|
| Back to top |
|
 |
Symon Moderator

 Virtual Cash: 27640
Joined: 04 Sep 2005 Posts: 11050 Location: Hampshire,England Add Karma
 rated by 84 members
Add Comment
Show Comments
 |
|
| Back to top |
|
 |
Houndoom<3 Apprentice


Joined: 30 Apr 2006 Posts: 219
Add Karma
 rated by 0 members
Add Comment
Show Comments
 |
Posted: Tue May 16, 2006 9:03 pm Post subject: |
|
|
i still can't figure out how to put that right under the Location: thing in your post...i've tried but i can't get it
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42910
Joined: 22 May 2005 Posts: 19348
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
|
| Back to top |
|
 |
Houndoom<3 Apprentice


Joined: 30 Apr 2006 Posts: 219
Add Karma
 rated by 0 members
Add Comment
Show Comments
 |
Posted: Tue May 16, 2006 9:23 pm Post subject: |
|
|
i meant when you post you see:
admin
Site Admin
Chief Cook and Bottle Washer
rank
avatar
Joined: 22 May 2005
Posts: 6242
something here:then something here
like that but i kind of got it explained to me
|
|
| Back to top |
|
 |
MarkD Craftsman


Joined: 22 Nov 2005 Posts: 487 Location: Nottingham Add Karma
 rated by 1 members
Add Comment
Show Comments
 |
Posted: Tue May 16, 2006 10:11 pm Post subject: |
|
|
If I understand you right you are lookingto put the added fields so they are viewable when you post like this http://holidaychat.myfreeforum.org/ftopic136.php
To do this you need amend the viewtopic_body.tpl file. For example on one of my themes I wanted to add a birthday field that appeared when people posted. After adding the field using xprofile I then ammended the viewtopic_body.tpl file as follows.
The original code was: -
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
I amended it to: -
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}<br /><b>Birthday:</b> {postrow.Birthday}</span><br /></td>
Obviously the {postrow.Birthday} would need to be amended to whatever you called the field you want added. _________________ Childminders, Long Eaton, Sawley and Sandiacre - Nottingham
|
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42910
Joined: 22 May 2005 Posts: 19348
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Tue May 16, 2006 10:16 pm Post subject: |
|
|
thanks Mark, the "if I understand you right" is still my issue with the question. Maybe my powers of comprehension arn't great, but I still didn't understand.
To me a support question needs to have clear:
I want
I have done
This is where I am stuck
parts to it. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| Back to top |
|
 |
Houndoom<3 Apprentice


Joined: 30 Apr 2006 Posts: 219
Add Karma
 rated by 0 members
Add Comment
Show Comments
 |
Posted: Wed May 17, 2006 12:26 am Post subject: |
|
|
lol okay. thanks mark, thats it
|
|
| Back to top |
|
 |
Robby Pupil

Joined: 28 Apr 2006 Posts: 34
Add Karma
 rated by 0 members
Add Comment
Show Comments
 |
Posted: Wed May 31, 2006 3:14 pm Post subject: |
|
|
I got a small problem with this. I added the info into the Xprofile thing, and then i went to my profile and it was there and it was fine. BUT, when i save changes and go back, the box is empty again. All the other things save correctly except the new ones that I made. Any idea whats wrong? _________________

|
|
| Back to top |
|
 |