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
 avators
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gorthaur
Starting Member

Netherlands
6 Posts

Posted - 20 May 2003 :  18:09:36  Show Profile
Hi all,

Im verry happy with the forums but i wanna install avators on my forum some avators i put on my server and a way people can put a link to their own avator.
Ive seen this on other snitz forums but i cant seem to find the code for it.
I hope you guys can help me.

Greetings,

Gorthaur

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 20 May 2003 :  18:14:25  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
You can download that MOD at SnitzBitz here.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 20 May 2003 18:14:49
Go to Top of Page

Gorthaur
Starting Member

Netherlands
6 Posts

Posted - 23 May 2003 :  04:23:15  Show Profile
Thnx i have a mod now that they can give a link from their own avator but it gives a problem with registering a new user it says that a avator field cant leave blank.
I will check your site out.
thnx

Greetings,

Gorth
Go to Top of Page

Gorthaur
Starting Member

Netherlands
6 Posts

Posted - 25 May 2003 :  16:17:43  Show Profile
Hi again.
I solved the registering problem but i have a problem with my avator mod now.
It says if registering a new member the avator field cant be left empty now this is fine by me but i wanna give a URL of a basic avator and the basic size.
So its allready filled in and they only have to change it.
I mean the same thing as with a URL allready says the http://
At what asp script i need to change this?
I will say the things i had to change.
Thats this:


---------------------------
------Avatar Mod V1.3------
---------------------------
Made by Craig Bovis (cbovis)
---------------------------
V1.3
---------------------------
Some registration bugs corrected
Problem with admin editing members fixed (thanks BWJM)
---------------------------
V1.2
---------------------------
Small fix concerning replies fixed
Note added to part of code telling you to check the code
---------------------------
V1.1
---------------------------
Problem with array bug sorted
Problem with avatar details not showing when admin modify's a member
New installation instructions (easier to follow)

Tested on a clean install of snitz 3.4.03
---------------------------
V1.0
---------------------------

First Release of this mod

---------------------------
Description
---------------------------

This mod will allow your members to specify their avatar
as an image located elsewhere,

e.g. http://www.domain.com/avatar.jpg

They can set the avatar width/height and location.

You can set the maximum width/height and turn avatars on/off
via the "feature configuration" in "admin options"

---------------------------
Installation
---------------------------

DO NOT OVERWRITE EXISTING FILES

1. extract dbs_CustomAvatar.asp to your forums diretcory
2. Goto admin options > mod setup
3. Select "Custom Avatar Mod (Default)" and click update!
4. Follow the instructions below for altering the code for,

admin_config_features.asp
config.asp
inc_profile.asp
pop_profile.asp
topic.asp
register.asp

5. Go into admin options > Feature Configuration and set a max width/height and turn them on.
6. All Done!

'#############################
Instructions for topic.asp
'#############################

'#################
Around Line 106 You will find the following
'#################

strSql = strSql & " FROM " & strActivePrefix & "TOPICS T, " & strTablePrefix & "FORUM F, " & _
strTablePrefix & "CATEGORY C, " & strMemberTablePrefix & "MEMBERS M " & _
" WHERE T.TOPIC_ID = " & Topic_ID & _
" AND F.FORUM_ID = T.FORUM_ID " & _
" AND C.CAT_ID = T.CAT_ID " & _
" AND M.MEMBER_ID = T.T_AUTHOR "

'#################
Directly Above This Add The Following
'#################

strSQL = strSQL & ", M.M_Avatar, M.M_AVATAR_WIDTH, M.M_AVATAR_HEIGHT"

'#################
Around Line 154 You will find the following
'#################

if CanShowSignature = 1 then
Topic_MemberSig = trim(rsTopic("M_SIG"))
end if

'#################
Directly Below This Add The Following
'#################

Member_Avatar = rsTopic("M_AVATAR")
Member_AvatarW = rsTopic("M_AVATAR_WIDTH")
Member_AvatarH = rsTopic("M_AVATAR_HEIGHT")

'#################
Around Line 313 You will find the following
'#################

if CanShowSignature = 1 then
strSql = strSql & ", M.M_SIG"
end if

'#################
Directly Above This Add The Following
'#################

strSQL = strSQL & ", M.M_Avatar, M.M_AVATAR_WIDTH, M.M_AVATAR_HEIGHT"

'#################
Around Line 533 You will find the following
'#################

if CanShowSignature = 1 then
rM_SIG = 22
end if

'#################
Replace this with the following
*NOTE* When Changing this line, if you have other mods installed make sure you check the numbers go in order. *NOTE*
'#################

rM_AVATAR = 22
rM_AVATAR_WIDTH = 23
rM_AVATAR_HEIGHT = 24

if CanShowSignature = 1 then
rM_SIG = 25
end if

'#################
Around line 561 You will find the following
'#################

if CanShowSignature = 1 then
Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
end if

'#################
Directly Below This Add The Following
'#################

Reply_MemberAvatar = arrReplyData(rM_AVATAR, iForum)
Reply_MemberAvatarW = arrReplyData(rM_AVATAR_WIDTH, iForum)
Reply_MemberAvatarH = arrReplyData(rM_AVATAR_HEIGHT, iForum)

'#################
Around Line 571 You will find the following
'#################

Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & CColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
Response.Write ">" & vbNewLine & _
" <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & vbNewLine

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" then
if not Reply_MemberAvatar = "" then
Response.Write "<br><img width=""" & Reply_MemberAvatarW & """ height=""" & Reply_MemberAvatarH & """ src='" & Reply_MemberAvatar & "'><br><br>"
end if
end if

'#################
Around Line 776 You will find the following
'#################

Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
Response.Write ">" & vbNewLine & _
" <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & vbNewLine

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" and not Member_Avatar = "" then
Response.Write "<br><img width=""" & Member_AvatarW & """ height=""" & Member_AvatarH & """ src='" & Member_Avatar & "'><br><br>"
end if

'#############################
Thats all for topic.asp
'#############################



'#############################
Instructions for config.asp
'#############################

'#################
Around line 126 You will find the following
'#################

Dim SubCount, MySubCount

'#################
Directly Below This Add The Following
'#################

Dim StrShowAvatar, StrAvatarMaxW, StrAvatarMaxH

'#################
Around line 390 You will find the following
'#################

strShowQuickReply = Application(strCookieURL & "STRSHOWQUICKREPLY")

'#################
Directly Below This Add The Following
'#################

strShowAvatar = Application(strCookieURL & "STRSHOWAVATAR")
strAvatarMaxW = Application(strCookieURL & "STRAVATARMAXW")
strAvatarMaxH = Application(strCookieURL & "STRAVATARMAXH")

'#############################
Thats all for config.asp
'#############################



'#############################
Instructions for inc_profile.asp
'#############################

'#################
Around line 293 You Will Find The Following
'#################

if strMode = "goEdit" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> New Password Again: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Password2"" type=""Password"" size=""25"" maxLength=""25"" value=""""></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
end if
end if

'#################
Directly Below This Add The Following
'#################

StrMyAvatar = rs("M_AVATAR")
StrMyAvatarW = rs("M_AVATAR_WIDTH")
StrMyAvatarH = rs("M_AVATAR_HEIGHT")

if StrShowAvatar = "1" then

if not StrMyAvatar = "" then

Response.Write "<tr>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Current Avatar:</b></font></td>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""left"" nowrap valign=""top"">" &_
"<img width=""" & strMyAvatarW & """ height=""" & strMyAvatarH & """ src=""" & strMyAvatar & """>" & vbnewline &_
"</td>" & vbnewline &_
"</tr>" & vbnewline
end if


Response.Write "<tr>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Avatar URL:</b></font></td>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""left"" nowrap valign=""top"">" & vbnewline &_
"<input type=""text"" name=""Avatar"" value=""" & strMyAvatar & """>" & vbnewline &_
"</td>" & vbnewline &_
"</tr>" & vbnewline &_
"<tr>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Avatar Size:</b></font></td>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""left"" nowrap valign=""top"">" & vbnewline &_
"<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbnewline &_
"<input type=""text"" name=""AvatarW"" size=""3"" value=""" & strMyAvatarW & """> x <input type=""text"" name=""AvatarH"" size=""3"" value=""" & StrMyAvatarH & """> (Max: " & strAvatarMaxW & "x" & StrAvatarMaxH & ")" & vbnewline &_
"</font>" & vbnewline &_
"</td>" & vbnewline &_
"</tr>" & vbnewline
end if

'#############################
Thats all for inc_profile.asp
'#############################



'#############################
Instructions for pop_profile.asp
'#############################

'#################
Around line 202 You will find the following
'#################

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"

'#################
Directly Below This Add The Following
'#################

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_WIDTH"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_HEIGHT"

'#################
Around line 233 You will find the following
'#################

strMyBio = rs("M_BIO")

'#################
Directly Below This Add The Following
'#################

strMyAvatar = rs("M_AVATAR")
strMyAvatarW = rs("M_AVATAR_WIDTH")
strMyAvatarH = rs("M_AVATAR_HEIGHT")

'#################
Around line 499 You will find the following
'#################

if strAuthType = "nt" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Your Account: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_USERNAME"),"display") & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" and not strMyAvatar = "" then
Response.Write "<tr>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""left"" nowrap valign=""top""> </td>" & vbnewline &_
"<td bgColor=""" & strPopUpTableColor & """ align=""left"" nowrap valign=""top"">" &_
"<img width=""" & strMyAvatarW & """ height=""" & strMyAvatarH & """ src=""" & strMyAvatar & """>" & vbnewline &_
"</td>" & vbnewline &_
"</tr>" & vbnewline
end if

'#################
Around line 837 You will find the following
'#################

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG"

'#################
Directly Below This Add The Following
'#################

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_WIDTH"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_HEIGHT"

'#################
Around line 1150 You will find the following
'#################

if Trim(Request.Form("Photo_URL")) <> "" and lcase(trim(Request.Form("Photo_URL"))) <> "http://" and Trim(lcase(Request.Form("Photo_URL"))) <> "https://" then
regPhoto_URL = ChkString(Request.Form("Photo_URL"),"SQLString")
else
regPhoto_URL = " "
end if

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" then
if not len(request.form("AvatarW")) <> 0 OR not len(request.form("AvatarH")) <> 0 and len(request.form("Avatar")) <> 0 then
Err_Msg = Err_Msg & "<li>The Avatar Size field cannnot be left empty</li>"
end if

if not IsNumeric(request.form("AvatarW")) OR not IsNumeric(request.form("AvatarH")) and len(request.form("Avatar")) <> 0 then
Err_Msg = Err_Msg & "<li>The Avatar Size fields must be numeric</li>"
else

If cint(Request.Form("AvatarW")) > cint(StrAvatarMaxW) OR cint(Request.Form("AvatarH")) > cint(StrAvatarMaxH) then
Err_Msg = Err_Msg & "<li>Avatar Size can be no greater than " & StrAvatarMaxW & "x" & StrAvatarMaxH & "</li>"
End If

end if
end if

'#################
Around line 1238 You will find the following
'#################

if strBio = "1" then
strSql = strSql & ", M_BIO = '" & ChkString(Request.Form("Bio"),"message") & "'"
end if

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" then
strSql = strSQL & ", M_AVATAR = '" & Request.Form("Avatar") & "'"
strSql = strSQL & ", M_AVATAR_WIDTH = '" & Request.Form("AvatarW") & "'"
strSql = strSQL & ", M_AVATAR_HEIGHT = '" & Request.Form("AvatarH") & "'"
end if

'#################
Around line 986 You will find the following
'#################

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG"

'#################
Directly Below This Add The Following
'#################

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_WIDTH"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_HEIGHT"

'#############################
Thats all for pop_profile.asp
'#############################



'#############################
Instructions for admin_config_features.asp
'#############################

'#################
Around line 107 You will find the following
'#################

if strModeration = "1" and Request.Form("strModeration") = "0" then
if CheckForUnmoderatedPosts("BOARD", 0, 0, 0) > 0 then
Err_Msg = Err_Msg & "<li>Please Approve or Delete all UnModerated/Held posts before turning Moderation off.</li>"
end if
end if

'#################
Directly Below This Add The Following
'#################

if not len(request.form("StrAvatarMaxW")) <> 0 or not len(request.form("StrAvatarMaxH")) <> 0 then
Err_Msg = Err_Msg & "<li>You must provide a maximum avatar size</li>"
end if
if not IsNumeric( request.form("AvatarMaxW")) or not Isnumeric(request.form("AvatarMaxH")) then
Err_Msg = Err_Msg & "<li>The maximum avatar size must be numeric</li>"
end if

'#################
Around line 413 You will find the following
'#################

" <input type=""text"" name=""strTimerPhrase"" size=""45"" maxLength=""50"" value=""" & chkExistElse(strTimerPhrase,"This page was generated in [TIMER] seconds.") & """>" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=features#timerphrase')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _

'#################
Directly Below This Add The Following
'#################

" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Avatar Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Show Avatars:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" On:<input type=""radio"" class=""radio"" name=""strShowAvatar"" value=""1""" & chkRadio(strShowAvatar,0,false) & "> " & vbNewLine & _
" Off:<input type=""radio"" class=""radio"" name=""strShowAvatar"" value=""0""" & chkRadio(strShowAvatar,0,true) & ">" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Maximum Size:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <input type=""text"" name=""strAvatarMaxW"" size=""3"" value=""" & chkExistElse(strAvatarMaxW,64) & """> x <input type=""text"" name=""strAvatarMaxH"" size=""3"" value=""" & chkExistElse(strAvatarMaxH,64) & """>" & vbNewLine &_
" </tr>" & vbNewLine &_

'#############################
Thats all for admin_config_features.asp
'#############################



'#############################
Instructions for register.asp
'#############################

'#################
Around line 87 You will find the following
'#################

", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_SHA256" & _

'#################
Directly Below This Add The Following
'#################

", M_AVATAR, M_AVATAR_WIDTH, M_AVATAR_HEIGHT" & _

'#################
Around line 144 You will find the following
'#################

strSql = strSql & ", M_SHA256"

'#################
Directly Below This Add The Following
'#################

strSql = strSql & ", M_AVATAR"
strSql = strSql & ", M_AVATAR_WIDTH"
strSql = strSql & ", M_AVATAR_HEIGHT"

'#################
Around line 187 You will find the following
'#################

strSql = strSql & ", 1"

'#################
Directly Below This Add The Following
'#################

strSql = strSql & ", '" & chkString(rsKey("M_AVATAR"),"message") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_AVATAR_WIDTH"),"message") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_AVATAR_HEIGHT"),"message") & "'"

'#################
Around line 359 You will find the following
'#################

if not IsValidURL(trim(Request.Form("Photo_URL"))) then
Err_Msg = Err_Msg & "<li>Photo URL: Invalid URL" & strURLError & "</li>"
end if

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" then
if not len(request.form("AvatarW")) <> 0 OR not len(request.form("AvatarH")) <> 0 and len(request.form("Avatar")) <> 0 then
Err_Msg = Err_Msg & "<li>The Avatar Size field cannnot be left empty</li>"
end if

if not IsNumeric(request.form("AvatarW")) OR not IsNumeric(request.form("AvatarH")) and len(request.form("Avatar")) <> 0 then
Err_Msg = Err_Msg & "<li>The Avatar Size fields must be numeric</li>"
else

If cint(Request.Form("AvatarW")) > cint(StrAvatarMaxW) OR cint(Request.Form("AvatarH")) > cint(StrAvatarMaxH) then
Err_Msg = Err_Msg & "<li>Avatar Size can be no greater than " & StrAvatarMaxW & "x" & StrAvatarMaxH & "</li>"
End If

end if
end if

'#################
Around line 455 You will find the following
'#################

strSql = strSql & ", M_SHA256"

'#################
Directly Below This Add The Following
'#################

strSql = strSql & ", M_AVATAR"
strSql = strSql & ", M_AVATAR_WIDTH"
strSql = strSql & ", M_AVATAR_HEIGHT"

'#################
Around line 591 You will find the following
'#################

strSql = strSql & ", 1"

'#################
Directly Below This Add The Following
'#################

if strShowAvatar = "1" then
strSql = strSql & ", '" & ChkString(Request.Form("Avatar"),"message") & "'"
strSql = strSql & ", '" & ChkString(Request.Form("AvatarW"),"message") & "'"
strSql = strSql & ", '" & ChkString(Request.Form("AvatarH"),"message") & "'"
else
strSql = strSql & ", ''" & 1
strSql = strSql & ", ''" & 1
strSql = strSql & ", ''" & 1
end if

'#################
Around line 591 You will find the following
'#################

if strBio = "1" then
strSql = strSql & ", M_BIO = '" & chkString(Request.Form("Bio"),"message") & "'"
end if

'#################
Directly Below This Add The Following
'#################

if StrShowAvatar = "1" then
strSql = strSQL & ", M_AVATAR = '" & chkString(Request.Form("Avatar"),"SQLString") & "'"
strSql = strSQL & ", M_AVATAR_WIDTH = '" & chkString(Request.Form("AvatarW"),"SQLString") & "'"
strSql = strSQL & ", M_AVATAR_HEIGHT = '" & chkString(Request.Form("AvatarH"),"SQLString") & "'"
end if

'#############################
Thats all for register.asp
'#############################

Thats all of the files edited, now you should be ready to go!


I hope you guys can help me out.
Thnx
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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07