Author |
Topic |
mtercek
New Member
56 Posts |
Posted - 12 January 2005 : 13:36:23
|
We would like to add a phone ext to the member info. I could probably use the country code field as we do not need that.
Which file would I change to do that? |
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 12 January 2005 : 13:44:45
|
inc_profile.asp and pop_profile.asp, if I remember correct you have to edit both.
|
/Tribaliztic - www.gotlandrace.se -
|
|
|
mtercek
New Member
56 Posts |
Posted - 12 January 2005 : 16:05:52
|
I was able to change the heading from country to Phone Ext so I am half way there.
Where is the list of countrys kept? I thought it would be in the access .mdb but the list isn't there.
Anyone tell me where I can go edit that list? I will just add all of our possible ext. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 12 January 2005 : 16:14:01
|
Look in inc_countrylist.asp
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
mtercek
New Member
56 Posts |
Posted - 12 January 2005 : 16:19:07
|
Yep, there they are. Thanks! |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 12 January 2005 : 16:25:45
|
You're welcome
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
mtercek
New Member
56 Posts |
Posted - 12 January 2005 : 16:29:51
|
OK, while I am on a roll here...
How could I change this file to allow a user to enter their ext themselves?
Here's one of the current lines for the country file:
Response.Write " <option value=""Afghanistan"">Afghanistan</option>" & vbNewLine & _
I could comment out the current lines and add one that allows entry? Or am I stuck with adding a line for everyone existing phone ext?
TIA
|
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 12 January 2005 : 16:49:47
|
Remove the part with the options and copy code from another field where the user can enter data. That's how I do most of my coding, stealing snippets of code here and there and putting together to something new =) It's a great way to learn how the code work anyways..
|
/Tribaliztic - www.gotlandrace.se -
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 January 2005 : 05:58:49
|
To elaborate, to replace the country dropdown with a text input, find the following block of code beginning on approximately line 327 (fresh 3.4.04+):if strCountry = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Country: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""Country"" size=""1"">" & vbNewLine
if strMode <> "Register" then
Response.Write(" <option selected value=""" & rs("M_COUNTRY") & """>" & ChkString(rs("M_COUNTRY"), "display") & "</option>" & vbNewLine)
else
Response.Write " <option value=""""></option>" & vbNewLine
end if
Response.Write " <option value="""">None</option>" & vbNewLine
%>
<!--#INCLUDE FILE="inc_countrylist.asp"-->
<%
Response.Write " </select></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if and replace it with the following:if strCountry = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Country: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <input type=""text"" size=""25"" name=""Country"" value="""
if strMode <> "Register" then
Response.Write ChkString(rs("M_COUNTRY"), "display")
end if
Response.Write """ maxlength=""12"" /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if You may wish to alter the maxlength attribute of the input (highlighted in blue above) or remove it completely.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
mtercek
New Member
56 Posts |
Posted - 13 January 2005 : 11:27:47
|
Yes! Awesome! That worked!
thanks very much everyone!
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 January 2005 : 11:48:32
|
No problem; glad to be of service.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
cchouse
Starting Member
4 Posts |
Posted - 07 February 2005 : 22:33:03
|
Hi, if I may ask a question about the above, when changing the member info category name, ie from country to phone ext, do you have to change all occurances of the 'country' name in the inc_profile and pop_profile files?
I ask because i can change the displayed name but when i go into the database file the input is not saved.
Thanks for your help!
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 08 February 2005 : 05:36:12
|
No, it will still be saved to the M_COUNTRY field in the MEMBERS database.
The only thing you may need to change are the labels that read "Country:" in the various files.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
cchouse
Starting Member
4 Posts |
Posted - 08 February 2005 : 17:45:10
|
Thanks Shaggy but i'm still having a problem with the database saving the result in the country field. To check again, I logged in as an admin and manually updated this 'renamed' field, saved the results, then went back into the member record, and the update was not there. So its not saving it and I'm wondering if its due to the label change? I would not have thought so....thanks again! |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 09 February 2005 : 06:08:21
|
The value of the name attribute of the input field you're using must be Country for it to work.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
cchouse
Starting Member
4 Posts |
Posted - 09 February 2005 : 13:00:06
|
Not sure if i understand. What i did was use the occupation field and renamed it 'community name'. the field attribute for occupation should be just text, correct? I have only a limited knowledge of databases but i thought if i didnt change the underlying field, just the text name of that field, it should post normally to the occupation field? I know i'm missing something easy so i apologize for my further questions. |
|
|
Topic |
|