Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Add avatar - member text field vs dropdown
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

LarryGam
Starting Member

USA
2 Posts

Posted - 12 August 2009 :  10:10:46  Show Profile
Hello, newbie here. I obtained a website with a previous version (06?) of Snitz and I'm trying to modify the avatar script to where it has a text box field for AvatarMemberID instead of a dropdown menu with all members. There are many members so it takes a while for the page to load because of populating the members dropdown list. I tried searching for a converted mod but could not find any. I did the following modifications in red below but still getting errors:

If Request.Form("Mode") = "Confirm_Avatar" then
	
	Err_Msg = ""
	
	avatarURL = ChkString(Request.Form("AvatarURL"),"url")
	avatarName = ChkString(Request.Form("AvatarName"),"")
	avatarMemberID = ChkString(Request.Form("AvatarMemberID"),"")
	
	if avatarURL = " "  then 
		Err_Msg = Err_Msg & "<li>You must enter a URL for this Avatar.</li>"
	end if
	
	if avatarName = " " then 
		Err_Msg = Err_Msg & "<li>You must enter a Name for this Avatar.</li>"
	end if	
	
	if avatarMemberID = " " then 
		Err_Msg = Err_Msg & "<li>You must enter a Username or type 0 for all.</li>"
	end if
	
	If Err_Msg <> "" then
	
	response.write"<p align=""center"" class=""text"">There was a problem with the submission.</p>" & vbnewLine & _
	"<table align=""center"" border=""0"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"	 <td class=""text""><ul>" & vbNewLine & _
	Err_Msg & vbNewLine & _
	"	</ul></td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table>" & vbNewLine & _
	"<p align=center class=""text""><a href=""JavaScript:history.go(-1)"">Go Back to Enter Data</a></p>"
	else
	'#### Inster into database
	strSql = "INSERT INTO " & strTablePrefix & "AVATAR ("
	strSql = strSql & "A_URL"
	strSql = strSql & ", A_NAME"
	strSql = strSql & ", A_MEMBER_ID"
	strSql = strSql & ") VALUES ("
	strSql = strSql & "'" & avatarURL & "'"
	strSql = strSql & ", '" & avatarName & "'"
	strSql = strSql & ", '" & avatarMemberID & "'"
	strSql = strSql & ")"

	my_Conn.Execute (strSql)
	
	response.write"<p align=""center"" class=""text"">Avatar " & avatarName & " Added!</p>" & vbNewLine & _
	"<meta http-equiv=""Refresh"" content=""2; URL=admin_avatar_home.asp"">" & vbNewLine & _
	"<p align=""center"" class=""text"">Congratulations!</p>" & vbNewLine & _
	"<p align=""center"" class=""text""><a href=""admin_avatar_home.asp"">Back to Avatar Setup</a></p><br />"
	end if
else	
Response.Write	"<table border=""0"" cellpadding=""0"" cellspacing=""0"" align=""center"">" & vbNewLine & _
       		" <tr>" & vbNewLine & _
       		"<form action=""admin_add_avatar.asp"" method=""post"">" & vbNewLine & _
		"<input type=""hidden"" name=""Mode"" value=""Confirm_Avatar"">" & vbNewLine & _
       		"  <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
       	       	"		<table border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
		"			<tr>" & vbNewLine & _
		"			<td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center"" class=""textb""> Add New Avatar </td>" & vbNewLine & _
		"			</tr>" & vbNewLine & _
		"			<tr>" & vbNewLine & _
		"			<td bgcolor=""" & strPopUpTableColor & """ align=""right"" class=""textb""> Avatar URL: </td>" & vbNewLine & _
		"			<td bgcolor=""" & strPopUpTableColor & """><input maxLength=""255"" name=""AvatarURL"" value=""" & Trim(ChkString(avatarUrl,"display")) & """ size=""40""></td>" & vbNewLine & _
		"			</tr>" & vbNewLine & _
		"			<tr>" & vbNewLine & _
		"			<td bgcolor=""" & strPopUpTableColor & """ align=""right"" class=""textb""> Avatar Display Name: </td>" & vbNewLine & _
		"			<td bgcolor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""AvatarName"" value=""" & Trim(ChkString(avatarName,"display")) & """ size=""40""></td>" & vbNewLine & _
		"			</tr>" & vbNewLine & _
		"			<tr>" & vbNewLine & _
		"			<td bgcolor=""" & strPopUpTableColor & """ align=""right"" class=""textb""> Reserve for Member: </td>" & vbNewLine & _
		"			<td bgcolor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""AvatarMemberID"" value=""" & Trim(ChkString(avatarMemberID,"display")) & """ size=""40"">" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"			</tr>" & vbNewLine & _
		"			<tr align=""center"">" & vbNewLine & _
		"				<td bgcolor=""" & strPopUpTableColor & """ colspan=""2""><input type=""submit"" value=""Submit Avatar"" id=""submit1"" name=""submit1"">   <input type=""reset"" value=""Reset Old Values"" id=""reset1"" name=""reset1""></td>" & vbNewLine & _
		"			</tr>" & vbNewLine & _
		"		</table>" & vbNewLine & _
		"  </td>" & vbNewLine & _
		"</form></table><br />" & vbNewLine
end if

Edited by - LarryGam on 14 August 2009 10:06:56

LarryGam
Starting Member

USA
2 Posts

Posted - 14 August 2009 :  10:09:26  Show Profile
Did I post this in the correct forum? I could not find a Modifying Mod Help forum.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 August 2009 :  10:17:51  Show Profile  Send ruirib a Yahoo! Message
This is the correct forum. You will need to state what errors you are experiencing.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 14 August 2009 :  15:29:25  Show Profile  Visit AnonJr's Homepage
You might get a little more help if you specify which Avatar MOD you are using... there are a couple floating around.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07