Author |
Topic  |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 22 January 2007 : 23:10:03
|
A quick question I have been working on the mod I asked shaggy about. I think I have all the changes made I need to in the admin_config_members.asp, and I also think I have gotten everything I need to insert into config.asp and also the new DBS inserts.
This mod and the code changes below are once someone sets in the admin options that a certain field is required that then the * shows up and that the user has to fill in that information.
My question though would be how do I handle the changes in the inc_profile.asp and in pop_profile.asp and om register.asp files.
This is just a test code and I believe this is a way to do it but I am sure there would be a better way so its less coding for when people do this themselves.
Now I believe there is a better way to word or write it in one paragraph to people just have to overwrite certain lines instead of add so much code but I am unsure what a better structure would be?
Thanks to anyone who would give some Direction. < |
Edited by - JJenson on 23 January 2007 01:30:13 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 23 January 2007 : 14:26:51
|
y not somthing like
by doing it this way u are only changing the 1 line and that is the line with the word "Aim"...if strReqAim = 1 then it ass a astericks (*).
seems a little easier and less code< |
© 1999-2010 MaD2ko0l |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 23 January 2007 : 15:36:09
|
Great thats what I needed. Thanks will give it a go today.< |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 24 January 2007 : 04:27:05
|
To keep the files size down, I'd do it like this:if strAIM = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
if strReqAIM = "1" then Response.Write "<font color=""" & strHiLiteFontColor & """>*</font> "
AIM: </font></b></td>" & vbNewLine&_
Response.Write " <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""AIM"" size=""25"" maxLength=""50"" value="""
if strMode <> "Register" then Response.Write(ChkString(rs("M_AIM"), "display"))
Response.Write """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if But, that's just me.
< |
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.” |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 24 January 2007 : 10:16:08
|
I like that shaggy maybe I will go back and change my inc_profile.asp page. I couldn't figure out how to do it simpler but. On the fullname part and like the links and then the birthdat drop down menu and country drop down menu would you do it the same way?
This would make it much simpler for anyone adding the mod. Right now I have just given them bog bulk changes to make it a little easier. It works perfect just makes the file much larger.< |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 24 January 2007 : 10:32:17
|
Another alternative, seeing as you have multiple fields which may be mandatory, would be to create a sub that would write the asterix if the variable passed through it was equal to 1. The added advantage of doing it that way would be that, should you ever wish to change the style, etc. of the asterix, you'd only need to make one edit.
< |
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.” |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 24 January 2007 : 11:18:25
|
How would I go about doing that? I am not sure if you have taken a look at the mod I did or not yet. But wondering if you did if you could give some pointers on a better way to write it?
All I did for the db was put a Req in the str before the name of the field.< |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 24 January 2007 : 11:33:42
|
Ay, I'll take a gallop through it tomorrow and post back with a any pointers 
< |
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.” |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 24 January 2007 : 11:37:36
|
Great thanks.
It works but I am sure there are alot better ways that save alot more space in the file. < |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 25 January 2007 : 15:37:44
|
Just wondering if you got to take a Gallop yet Shaggy. < |
 |
|
|
Topic  |
|