Need some help modifying admin_activate.tpl

Support for IntegraMOD 140

Moderator: Integra Moderator

Need some help modifying admin_activate.tpl

PostAuthor: maranate » Sun Apr 02, 2006 11:58 am

This is the first time I've had to post because so far I have been able to find the answer to every question I've had on the integramod.com forum, but I can't find this answer, so pardon me if this is the wrong place to post.

I am working on a private forum for a club. I have added required fields to the registration page of user_reallastname and user_memberlevel, and I modified the user_realname label to be First Name SO we are capturing First Name, Last Name and Member Level on registration. Registration has to be approved by the administrator. Right now the email that is sent to the administrator only has the user name. It says:

The account owned by "{USERNAME}" has been deactivated or newly created...

I would like to change it to say "First Name Last Name, Member Level has requested membership..."

I assumed that since the field for username is called username, that I could use {USER_REALNAME} etc. but that did not work. It just sends the email with blank spaces.

I'm sure there is a way to pull that information into the template, I just don't know how to do it. Could someone kindly point me in the right direction?

Thanks,
Last edited by maranate on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

maranate
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 02, 2006 11:35 am
Cash on hand: 0.00

Re: Need some help modifying admin_activate.tpl

PostAuthor: Helter » Sun Apr 02, 2006 3:36 pm

I think this will be a PCP field, but I dont know enough about PCP to find and edit that field. I think your 2 best choices here are to pm MrDSL on IM.com, or go to http://ptifo.clanmckeen.com/index.php and ask ptirhiik and gandalf directly if and who it can be done.
MrDSL is the IM PCP master and ptirhiik, is the creator. Teelk has also been very successful with PCP.
Because most of the staff at IM.com have gone on to different projects, to reach MrDSL, you may have beeter luck looking for his personal website. I believe it is "the hottub" and you should find a link to it on IM.com

I have found many times that mods I have added or coded into my own site could have easily been done with PCP
Last edited by Helter on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

Re: Need some help modifying admin_activate.tpl

PostAuthor: maranate » Mon Apr 03, 2006 3:22 pm

Yes, you're right - I added the fields using the PCP Wizard. It was super easy - but now how to actually USE the information... not as easy, LOL! Anyway, thanks for pointing me to others who might be able to help. I will look for them.
Last edited by maranate on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

maranate
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 02, 2006 11:35 am
Cash on hand: 0.00

PostAuthor: Simon N » Mon Apr 03, 2006 3:45 pm

I too need to add some extra fields when people register and for their profiles. Will have to take the plunge and learn this scaret monster they call PCP I guess.

Do I need pcp when working on PCP or does it just help <img>
Last edited by Simon N on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[marq=left][url=http][img=left]http://www.tau-designs.org.uk/pictures/im2_88x32.png[/img][/url] | [url=http][img=left]http://www.free-riders.co.uk/images/banners/freeriders_88_31.gif[/img][/url][/marq]
User avatar
Simon N
Sr Integra Member
Sr Integra Member
 
Posts: 242
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:43 pm
Cash on hand: 0.00

Re: Need some help modifying admin_activate.tpl

PostAuthor: IntegraMOD » Mon Apr 03, 2006 8:43 pm

This might help Here's a tutorial:

1) create your user fields in the database... using phpmyadmin...
-- a) click on the phpbb_users table
-- b) On the bottom of the page select "add new field"
-- c) give it a name starting with "user_" fox ex. "user_testfield" and set it's type...
----- For this example let's suppose I want a yes/no field. Meaning values 0 and 1 thus using TINYINT.
----- This resilves in this query
"ALTER TABLE `phpbb_users` ADD `user_testfield` TINYINT;"


2) Create a label and explanation for the field...
-- a) open languages/lang_xxxx/lang_extend_profile_control_panel.php and find ?>
-- b) add BEFORE


Code: Select all
 $lang['User_testfield'] = 'Is this the test field?'; $lang['User_testfield_explain'] = 'This field is put here as a test. If you see it, select YES';


-- c) save and upload the file

3) Define the field in the PCP
-- a) Go to ACP > PCP > PCP Wizard > Manage Fields
-- b) in "Select New Field:" select the user_testfield and hit select
-- c) the message "You selected the NEW field user_testfield" is shown
-- d) as "Legend of the field" put "User_testfield" ==> the entry made in the language file (CaSeSeNsItIvE)
-- e) as type, select the same type that is shown in green
-- f) as "Explanation of the field" put "User_testfield_explain" ==> the entry made in the language file (CaSeSeNsItIvE)
-- g) hit submit
-- h) a message is shown "Successfully updated the PCP files"

4) Add the new field to the register page...
-- a) Go to ACP > PCP > PCP Wizard > Add / Remove Page Fields
-- b) In "Select a Page" find "Profile ÂÂÂ » Profile ÂÂÂ » Your profile ÂÂÂ » Registration information" and hit select
-- c) this message is shown: You selected the page Profile ÂÂÂ » Profile ÂÂÂ » Your profile ÂÂÂ » Registration information
-- d) On the left side, in the "Available Fields" box, find "user_testfield" and select it
-- e) click on the -> button
-- f) Check if the field is now on the right side box, called "Selected Fields", at the bottom...
-- g) select the field on the right side box, , called "Selected Fields".
-- h) move the field up to where you want, for example just after username, by using the "Move Up" button
-- i) hit the submit button when field is in your desired place
-- j) Now you come to the "Alter Form Display"; if so, go to 5) else do next steps
-- k) Go to ACP > PCP > PCP Wizard > Alter Form Display (!! that is FORM not PAGE)
-- l) In the "select a page" find Profile ÂÂÂ » Profile ÂÂÂ » Your profile ÂÂÂ » Registration information and hit select
-- m) a message "You selected the page Profile ÂÂÂ » Profile ÂÂÂ » Your profile ÂÂÂ » Registration information" is shown

5) Define the output of the field
-- a) Find your user_testfield, If you followed the example well, it's the second field.
-- b) Make it a required field by checking the "required" checkbox
-- c) As we wanted yes/no, select "radion bottons" as type
-- d) On the right "values list" will appear, select for that field "list_yes_no"
-- e) scroll down and hit the submit button
-- f) a message "Successfully updated the PCP files." is displayed

6) Validate the screen...
-- a) Go to the register page
-- b) see your new field
Last edited by IntegraMOD on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
Please do not PM for support
User avatar
IntegraMOD
Administrator
Administrator
 
Posts: 459
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 0.00
Bank: 100.00
Location: Seattle Wa

PostAuthor: Simon N » Tue Apr 04, 2006 1:13 am

Many thanks for that...saves me a lot of time.
Last edited by Simon N on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[marq=left][url=http][img=left]http://www.tau-designs.org.uk/pictures/im2_88x32.png[/img][/url] | [url=http][img=left]http://www.free-riders.co.uk/images/banners/freeriders_88_31.gif[/img][/url][/marq]
User avatar
Simon N
Sr Integra Member
Sr Integra Member
 
Posts: 242
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:43 pm
Cash on hand: 0.00

Re: Need some help modifying admin_activate.tpl

PostAuthor: maranate » Fri Apr 28, 2006 3:14 pm

I did not add the fields at the database level, but from within PCP. It's not really that scary! I'm have no SQL experience, and I am setting up a board which I will only administer for maybe a year and then it will need to go to someone else. I need to make sure that everything can be done by someone with even less experience than I have. So far, I think that's doable.

Anyway, I needed three fields - First Name, Last Name, Member Level.

I went into PCP/Field Definition
First, edited field user_realname to display as First Name (this is the Legend of the Field).

Next, I created a new field - user_reallastname. At the very bottom of the list of fields is a button "Add a new field." From there, I just copied the variables that were in user_realname except the Legend of the Field is Last Name.

Next, I needed a field that had a drop down box. So I head over to the Values List (still in PCP) scroll down to the bottom and click on the button "Add a new values list." That one is named list_memberlevel. I added the different options and saved. I had to look at one of the existing lists to see what this should look like. You should do the same.

Head back over to Create a new Field in the Field Definitions, call the field user_memberlevel. Legend of the field =Member Level. On the Input Tab, Get Mode option, select List_Drop from the drop down list. Same Tab, Values List option, select list_memberlevel from the drop down list and save it.

Now to add it to the registration form. Go to the PCP Wizard. Click on Add/Remove Page Fields . In the "Select a Page" drop down, make sure Profile>>Profile>>Your Profile>>Registration Information is showing, then in the Available Fields list, find the fields you just added and move them over to the Selected Fields box. You can then adjust their position with the up and down arrows. Submit that. You will be sent to the "Alter Form Display" page. Here you can make fields required if you did not do it when you created the field. You can also adjust authorization level, the type of field it is (text box, drop down, etc). You can see what it will look like if you scroll all the way down. Once you submit, it should work.
Hope that helps!
Last edited by maranate on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

maranate
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 02, 2006 11:35 am
Cash on hand: 0.00


Return to IntegraMOD 140

Who is online

Registered users: App360MonitorBot, Bing [Bot]