Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Required Mod For Members Info

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
JJenson 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.


if strAIM = "1" then
         Response.Write "                    <tr>" & vbNewLine & _
               "                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>AIM: </font></b></td>" & vbNewLine & _
               "                      <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
else
if strReqAIM = "1" then
         Response.Write "                    <tr>" & vbNewLine & _
               "                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> AIM: </font></b></td>" & vbNewLine & _
               "                      <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


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.<
9   L A T E S T    R E P L I E S    (Newest First)
JJenson Posted - 25 January 2007 : 15:37:44
Just wondering if you got to take a Gallop yet Shaggy. <
JJenson 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. <
Shaggy Posted - 24 January 2007 : 11:33:42
Ay, I'll take a gallop through it tomorrow and post back with a any pointers

<
JJenson 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 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.

<
JJenson 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 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:&nbsp;</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.

<
JJenson Posted - 23 January 2007 : 15:36:09
Great thats what I needed. Thanks will give it a go today.<
MaD2ko0l Posted - 23 January 2007 : 14:26:51
y not somthing like


if strAIM = "1" then
         Response.Write "                    <tr>" & vbNewLine
		if strReqAIM = "1" then
         		Response.Write "                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> AIM: </font></b></td>" & vbNewLine
		else
         		Response.Write "                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>AIM: </font></b></td>" & vbNewLine
		end if
         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


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<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07