FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Who is OnlineWho is Online   Join! (free) Join! (free)  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  • Welcome
  • Guest

Adding user profile fields
Page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    myfreeforum.org Forum Index -> PhpBB2 General Support
View previous topic :: View next topic  
Author Message
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Thu Apr 27, 2006 12:08 pm    Post subject: Adding user profile fields  Reply with quote

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 myff admin on Thu May 11, 2006 11:56 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Billgar
Apprentice
Apprentice


Joined: 05 Sep 2005
Posts: 243



Add Karma

rated by 1 members
Add Comment
Show Comments


online/offline
PostPosted: Thu Apr 27, 2006 11:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Fri Apr 28, 2006 12:32 am    Post subject: Reply with quote

Aside from multiline entries what is can't you do with this set up?

multiline will be along in a bit.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums
Back to top
View user's profile Send private message Visit poster's website
Billgar
Apprentice
Apprentice


Joined: 05 Sep 2005
Posts: 243



Add Karma

rated by 1 members
Add Comment
Show Comments


online/offline
PostPosted: Sat Apr 29, 2006 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Sat Apr 29, 2006 2:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Billgar
Apprentice
Apprentice


Joined: 05 Sep 2005
Posts: 243



Add Karma

rated by 1 members
Add Comment
Show Comments


online/offline
PostPosted: Thu May 04, 2006 11:59 pm    Post subject: Reply with quote

Any updates on this?
_________________

DarkRoostermusic
Back to top
View user's profile Send private message Visit poster's website AIM Address
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Fri May 05, 2006 12:51 am    Post subject: Reply with quote

http://forum.myfreeforum.org/ftopic3033.php
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums
Back to top
View user's profile Send private message Visit poster's website
symon
Moderator
Moderator
FLAG

Virtual Cash: 37350

Joined: 04 Sep 2005
Posts: 11952


Location: Surrey,England
Add Karma

rated by 92 members
Add Comment
Show Comments

http://howtodoit.myfreeforum.org/index.php
online/offline
PostPosted: Fri May 12, 2006 12:19 pm    Post subject: Reply with quote

You can view a walk though of this here

http://howtodoit.myfreeforum.org/sutra699.php#699
_________________
Back to top
View user's profile Send private message Visit poster's website
Houndoom<3
Apprentice
Apprentice
FLAG


Joined: 30 Apr 2006
Posts: 219



Add Karma

rated by 0 members
Add Comment
Show Comments


online/offline
PostPosted: Tue May 16, 2006 8:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Tue May 16, 2006 8:08 pm    Post subject: Reply with quote

I can't make sens of your post
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums
Back to top
View user's profile Send private message Visit poster's website
Houndoom<3
Apprentice
Apprentice
FLAG


Joined: 30 Apr 2006
Posts: 219



Add Karma

rated by 0 members
Add Comment
Show Comments


online/offline
PostPosted: Tue May 16, 2006 8:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MarkD
Craftsman
Craftsman


Joined: 22 Nov 2005
Posts: 487


Location: Nottingham
Add Karma

rated by 1 members
Add Comment
Show Comments


online/offline
PostPosted: Tue May 16, 2006 9:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
myff admin
Site Admin
Site Admin
FLAG

Virtual Cash: 92890

Joined: 22 May 2005
Posts: 32203



Add Karma

rated by 281 members
Add Comment
Show Comments


online/offline
PostPosted: Tue May 16, 2006 9:16 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Houndoom<3
Apprentice
Apprentice
FLAG


Joined: 30 Apr 2006
Posts: 219



Add Karma

rated by 0 members
Add Comment
Show Comments


online/offline
PostPosted: Tue May 16, 2006 11:26 pm    Post subject: Reply with quote

lol okay. thanks mark, thats it
Back to top
View user's profile Send private message Visit poster's website
Robby
Pupil
Pupil


Joined: 28 Apr 2006
Posts: 34



Add Karma

rated by 0 members
Add Comment
Show Comments


online/offline
PostPosted: Wed May 31, 2006 2:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    myfreeforum.org Forum Index -> PhpBB2 General Support All times are GMT
Page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6
 
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum