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)
 Creating a mod

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
Max0005 Posted - 27 November 2006 : 10:20:32
I'm creating a mod to let people put their telephone number in their profile. I added a file in the database, added a string in pop_profile.asp, and then, this is what I think I should add in inc_profile.asp:

else
				Response.Write("http://")
			end if
			Response.Write	"""></font></td>" & vbNewLine & _
					"                    </tr>" & vbNewLine & _
					"                    <tr>" & vbNewLine & _
					"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></b></td>" & vbNewLine & _
					"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Link2"" size=""25"" maxLength=""255"" value="""
			if strMode <> "Register" then
				if rs("M_LINK2") <> " " and lcase(rs("M_LINK2")) <> "http://" then Response.Write(ChkString(rs("M_LINK2"), "display")) else Response.Write("http://")
			else
				Response.Write("http://")
			end if
			if strAge = "1" then
		Response.Write	"                    <tr>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Telephone Number:</font></b></td>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Telephone Number"" size=""5"" maxLength=""20"" value="""
		if strMode <> "Register" then Response.Write(ChkString(rs("M_TELEPHONE"), "display"))
		Response.Write	"""></font></td>" & vbNewLine & _
				"                    </tr>" & vbNewLine
	end if                                Response.Write	"""></font></td>" & vbNewLine & _
					"                    </tr>" & vbNewLine
		end if
	end if
	Response.Write	"                  </table>" & vbNewLine & _
			"                </td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"            </table>" & vbNewLine & _
			"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _


Should I do something different?

PS: The new row in the database, is named
M_TELEPHONE
.

<moved from="Help: General / Current Version (Old)" by="Shaggy" /><
1   L A T E S T    R E P L I E S    (Newest First)
Etymon Posted - 28 November 2006 : 15:16:08
You've got your code nested within the strAge variable. If you were to turn the Age feature off in admin_config_members.asp, then it would also turn off your telephone feature.

You might want to try something different so that your telephone mod has an equal standing with the other features in the profile. Add the variable strTelephone to config.asp, add the same variable to your CONFIG_NEW table, and then mimic some code (for example, the Homepage code) in admin_config_members.asp. You will then be able to control the mod from the Member Details Configuration panel as to whether or not the feature is available. It also helps with testing. Also, anytime you add a variable to the CONFIG_NEW table it is a good practice to use Check Installation in the Admin Section.

The best way to learn how to create a new MOD like you are doing is to repeat what has already been done in the code for something else. For learning purposes, as mentioned above ... you could use a field like the Homepage field and then follow how it is controlled throughout the membership (during registration and after) process by doing a search for the field name and the variable (for example, M_HOMEPAGE and STRHOMEPAGE) throughout the register.asp, inc_profile.asp, pop_profile.asp, config.asp, and admin_config_members.asp files as well as the CONFIG_NEW table. This will give you a good idea of what is going on in the code.

It's not as easy as copy and paste but it's pretty close once you get a feel for it.

If you want your telephone feature to be a required feature, then take a look at how the Email Address field is coded.
<

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