[Tutorial] How to add a new field to profile in 2.0.4

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
User avatar
Dragonwolf
Registered User
Posts: 603
Joined: Mon Aug 20, 2007 7:46 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Dragonwolf »

*hopeful bump*

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by RMcGirr83 »

You can do that.

to fix it so that it just shows hippo (or whatever it says) remove from viewtopic the $lang entry in viewtopic.php designation that you put for hippo

so instead of like this (for location eg)

Code: Select all

$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';
it would be like this

Code: Select all

$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $postrow[$i]['user_from'] : '';
as far as putting a bigger break between the two you could do this

Code: Select all

$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? '<br />' . $postrow[$i]['user_from'] : '';
and for coloring

Code: Select all

$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? '<br /><span style="color: #FF0000;">' . $postrow[$i]['user_from'] .'</span>': '';
#FF0000 = color red

capiche?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
Dragonwolf
Registered User
Posts: 603
Joined: Mon Aug 20, 2007 7:46 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Dragonwolf »

Thanks!

marcygiff
Registered User
Posts: 15
Joined: Mon Dec 10, 2007 8:55 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by marcygiff »

I got this to work (mostly), however, the field information displays as:

: *
: *

and the fields are blank. What am I missing?

I also need to know the following:
How do I make one of the fields a Yes/No radio button instead of a text field?

How do I make them required fields?

The administrator just needs the information so he can approve the registration. We are only allowing active club members to register. He needs to cross reference their RealName and Chapter # to ensure they are active. What is the best/easiest way to handle this? Can I hide them from the profile except for the Administrator?

User avatar
Dragonwolf
Registered User
Posts: 603
Joined: Mon Aug 20, 2007 7:46 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Dragonwolf »

If you don't add the code to view_profile it would only show up in the admin index. But I'm not sure about the other stuff

Russ Landis
Registered User
Posts: 2
Joined: Fri Mar 31, 2006 10:16 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Russ Landis »

I was able to complete this process with an earlier version of PHPBB2, but I am now setting up a new board with 2.0.22 and need to make the same changes... Adding a "Realname" field....

But the code is noticably different...

I have begun the difficult task for searching this subject for a point when these steps are updated for 2.0.22.. Can someone point me in the right direction?

Thanks

Russ
Russ

Russ Landis
Registered User
Posts: 2
Joined: Fri Mar 31, 2006 10:16 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Russ Landis »

I wonder if it wouldn't be a good idea to start a new Subject with the updated steps for 2.0.22...

Just a suggestion

Russ
Russ

User avatar
Dragonwolf
Registered User
Posts: 603
Joined: Mon Aug 20, 2007 7:46 pm

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Dragonwolf »

Yah, some parts I had to guess at a bit :/

TheHackMan
Registered User
Posts: 31
Joined: Sun Nov 19, 2006 4:05 am
Location: ......do you wana know?
Contact:

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by TheHackMan »

The instructions are pretty much the same for 2.0.22 although there are a few small changes in a couple parts just search for the largest portion of the code you can find and it should relatively resemble the original search but perhaps have minor differences. This really helped a lot though and allowed me to add custom titles for users which can be set by the admins. Great mod!

User avatar
exam4sure
Registered User
Posts: 2
Joined: Thu Apr 03, 2008 2:19 pm
Contact:

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by exam4sure »

thank you.

great job! :D
plz visit exam4sure get ccna, scjp, mcts cert Q&A.

User avatar
Zaid
Registered User
Posts: 590
Joined: Thu Nov 08, 2007 2:06 pm
Location: South Pacific Ocean

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Zaid »

thanks, i will give it a try today.

I need to add a real name field here..

User avatar
Zaid
Registered User
Posts: 590
Joined: Thu Nov 08, 2007 2:06 pm
Location: South Pacific Ocean

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Zaid »

What he hell! I Installed this mod just the way it told me to and i cant see any such fields in my Profile page, nothing! help needed///

im on phpbb 2.0.22

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51984
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Brf »

"this mod"?
There is no mod here... simply a tutorial on adding new profile fields. There is no formal mod here.

User avatar
Zaid
Registered User
Posts: 590
Joined: Thu Nov 08, 2007 2:06 pm
Location: South Pacific Ocean

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Zaid »

lol..mod..... i need some help here ..: :)

how do i add field to phpbb2.0.22

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51984
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [Tutorial] How to add a new field to profile in 2.0.4

Post by Brf »

You follow the instructions in this tutorial.

Post Reply

Return to “[2.0.x] MOD Writers Discussion”