Author |
Topic  |
|
telson
Starting Member
4 Posts |
Posted - 15 September 2006 : 13:44:31
|
Hi,
I have used this forum before and it usually works well. I decided to try to add the avatar mod to the latest version of the forum. After completing the edits required to the various .asp files, I tried out the new mod.
Not surprisingly, I got quite a few different VB errors. So I proceeded to restore the original files that I had modified in order to implement the avatar mod.
I edited the config to reflect the database and it's location. For registered users the forum works properly. For new users, however, the register.asp won't load.
Using Firefox, you can see this error here. http://lastdays.myvnc.com/register.asp
Using Explorer you can see this error here. http://lastdays.myvnc.com/register.asp
Any ideas anyone?. Sure would appreciate some help with this. I'm stumped.
Also running the server on win2003 enterprise.
The forum worked fine until I attempted the mod addition.
|
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 15 September 2006 : 13:54:51
|
What version of the forums are you using? Did you make any changes to register.asp, policy.asp or inc_policy.asp? If you made changes to any of these files, post a link to a txt version of the file you edited so we can take a look at it. |
Support Snitz Forums
|
 |
|
telson
Starting Member
4 Posts |
Posted - 15 September 2006 : 15:32:01
|
Yes I did modify those files, but once I realized that they weren't going to work, I unzipped the originals and overwrote the ones affected with the mods.
The first mod I attempted to install was at this link. http://forum.snitz.com/forum/topic.asp?TOPIC_ID=62434
I installed the above through the mod section of the admin options
Then I realized that the above was really not complete without the original one the above author was adding on to. I have copied his readme.htm file so you can see the changes I attempted to make before restoring the originals.
Avatar Mod for 3.4
Original Author: Richard Kinser, adapted by Hamlin.
Download: www.ian-hamlin.co.uk/downloads.asp or www.snitzbitz.com/mods/details.asp?Version=All&mid=52" target="_blank">http://www.snitzbitz.com/mods/details.asp?Version=All&mid=52
Support: http://forum.snitz.com/forum
Background: It’s basically a complete rip off of the avatar mod 2 made by Richard Kinser. I did not add really add anything new just fiddled with the old mod so it worked for 3.4.
Tested On: 3.4.0.1, 3.4.0.3
UPDATE - 15/10/2002 - Added new files and updated the topic.asp section of the readme.
UPDATE - ??/??/???? - Added the mass add feature.
UPDATE - 10/01/2003 - Added upload support for admins. You can now upload avatars via the admin options.
New Files:
dbs_avatar.asp admin_avatar_home.asp admin_add_avatar.asp admin_review_avatar.asp admin_delete_avatar.asp admin_edit_avatar.asp admin_avatar_settings.asp inc_avatar.asp avatar_mass_add.asp adamin_avatar_upload.asp avatar_upload.asp Changed Files:
config.asp topic.asp pop_profile.asp inc_profile.asp register.asp admin_home.asp Installation
Upload all the files to your forum directory.
Update the database
Go to Admin Options > Mod Setup Select Avatar Mod for 3.4 from the dropdown list Click "Update" After the database has been updated you can delete the dbs_avatar.asp file.
Modify Existing Files
CONFIG.ASP
Look for this code around line 124
Dim strShowPrinterFriendly, strShowTimer, strTimerPhrase, strShowFormatButtons, strShowSmiliesTable, strShowQuickReply Dim SubCount, MySubCount
Directly after that code add the following
Dim intAvatarWidth, intAvatarHeight, intAvatarBorder, strShowAvatar
Look for this code around line 389
strShowQuickReply = Application(strCookieURL & "STRSHOWQUICKREPLY")
Directly after that code add the following
intAvatarWidth = cint(Application(strCookieURL & "INTAVATARWIDTH")) intAvatarHeight = cint(Application(strCookieURL & "INTAVATARHEIGHT")) intAvatarBorder = cint(Application(strCookieURL & "INTAVATARBORDER")) strShowAvatar = Application(strCookieURL & "STRSHOWAVATAR")
That's all for config.asp
--------------------------------------------------------------------------------
ADMIN_HOME.ASP
Look for this code around line 146
" <LI><span class=""spnMessageText""><a href=""admin_emaillist.asp"">E-mail List</a></span></LI>" & vbNewLine & _
Directly after that code add the following
" <LI><span class=""spnMessageText""><a href=""admin_avatar_home.asp"">Avatar Setup</a></span></LI>" & vbNewLine & _
That's all for admin_home.asp
--------------------------------------------------------------------------------
INC_PROFILE.ASP
Look for this code around line 202
end if Response.Write """></font></td>" & vbNewLine & _ " </tr>" & vbNewLine end if ' strPicture if (strBio + strHobbies + strLNews + strQuote) > 0 then if strMode <> "Register" then strMyHobbies = rs("M_HOBBIES") strMyLNews = rs("M_LNEWS")
In between the line end if ' strPicture and if (strBio + strHobbies + strLNews + strQuote) > 0 then add the following
<!--#INCLUDE FILE="inc_avatar.asp" -->
Note: Add a %> before and <% after the new line
It should now look like the following
end if ' strPicture %> <!--#INCLUDE FILE="inc_avatar.asp" --> <% if (strBio + strHobbies + strLNews + strQuote) > 0 then
That's all for inc_profile.asp
--------------------------------------------------------------------------------
REGISTER.ASP
Look for this code around line 86
", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_SHA256" & _ " FROM " & strMemberTablePrefix & "MEMBERS_PENDING" & _ " WHERE M_KEY = '" & key & "'"
Change the first line in that block so it looks like this
", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_SHA256, M_AVATAR_URL" & _
Look for this code around line 141
strSql = strSql & ", M_QUOTE" strSql = strSql & ", M_SHA256" strSql = strSql & ") "
Add the following code after the line strSql = strSql & ", M_SHA256"
strsql = strsql & ", M_AVATAR_URL"
So it will now look like this
strSql = strSql & ", M_QUOTE" strSql = strSql & ", M_SHA256" strsql = strsql & ", M_AVATAR_URL" strSql = strSql & ") "
Now look for this code around line 181
strSql = strSql & ", '" & chkString(rsKey("M_QUOTE"),"message") & "'" strSql = strSql & ", 1" strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Add the following code after the line strSql = strSql & ", 1"
strSql = strSql & ", '" & chkString(rsKey("M_AVATAR_URL"),"SqlString") & "'"
So it will now look like this
strSql = strSql & ", '" & chkString(rsKey("M_QUOTE"),"message") & "'" strSql = strSql & ", 1" strSql = strSql & ", '" & chkString(rsKey("M_AVATAR_URL"),"SqlString") & "'" strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Find the following code around line 435
strSql = strSql & ", M_QUOTE" strSql = strSql & ", M_SHA256" strSql = strSql & ") "
Add the following code after the line strSql = strSql & ", M_SHA256"
strSql = strSql & ", M_AVATAR_URL"
So it will now look like this
strSql = strSql & ", M_QUOTE" strSql = strSql & ", M_SHA256" strSql = strSql & ", M_AVATAR_URL" strSql = strSql & ") "
Find the following code around line 570
end if strSql = strSql & ", 1" strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Add the following code after the line strSql = strSql & ", 1"
strSql = strSql & ", '" & ChkString(Request.Form("Avatar_URL"),"SqlString") & "'"
So it will now look like this
end if strSql = strSql & ", 1" strSql = strSql & ", '" & ChkString(Request.Form("Avatar_URL"),"SqlString") & "'" strSql = strSql & ")"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
That's all for register.asp
--------------------------------------------------------------------------------
POP_PROFILE.ASP
Look for this code around line 188
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
Add the following code under the line strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
So it will now look like the following
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
Look for the following code around line 305
end if Response.Write "</td>" & vbNewLine & _ " </tr>" & vbNewLine end if ' strPicture
Directly under that code add the following
If strShowAvatar = "1" then if IsNull(rs("M_AVATAR_URL")) or rs("M_AVATAR_URL") = "" or rs("M_AVATAR_URL") = " " or rs("M_AVATAR_URL") = "noavatar.gif" then Response.write "<tr>" & vbNewLine & _ " <td colspan=""2"" bgColor=""" & strCategoryCellColor & """ align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """> Avatar </font></b></TD>" & vbNewLine & _ "</tr>" & vbNewLine & _ "<tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ align=""center"" colspan=""2""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> None Selected</font></b></td>" & vbNewLine & _ "</tr>" else Response.write "<tr>" & vbNewLine & _ " <td colspan=""2"" bgColor=""" & strCategoryCellColor & """ align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """> Avatar </font></b></TD>" & vbNewLine & _ "</tr>" & vbNewLine & _ "<tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ align=""center"" colspan=""2""><img src=""" & ChkString(rs("M_AVATAR_URL"), "url") & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ border=""" & intAvatarBorder & """></td>" & vbNewLine & _ "</tr>" end if end if
Look for the following code around line 838
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
Add the following after the line strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
So it will now look like this
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
Look for the following code around line 971
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
Add the following after the line strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
So it will now look like this
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_PHOTO_URL" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE"
Look for this code around line 1185
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 under that code add the following
regAvatar_Image = Request.Form("AVATAR_URL")
Look for the following code around line 1249
if strPicture = "1" then strsql = strsql & ", M_PHOTO_URL = '" & ChkString(Trim(regPhoto_URL),"SQLString") & "'" end if
Directly after that code add the following
strsql = strsql & ", M_AVATAR_URL = '" & ChkString(regAvatar_Image,"SQLString") & "'"
Look for this code around line 1465
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 after that code add this
regAvatar_Image = Request.Form("AVATAR_URL")
Look for this code on line 1530
if strPicture = "1" then strsql = strsql & ", M_PHOTO_URL = '" & chkString(Trim(regPhoto_URL),"SQLString") & "'" end if
Directly after that add the following
strsql = strsql & ", M_AVATAR_URL = '" & ChkString(Trim(regAvatar_Image),"SQLString") & "'"
Thats all for pop_profile.asp
--------------------------------------------------------------------------------
TOPIC.ASP
Find the following code around line 96
'## Forum_SQL - Get original topic and check for the Category, Forum or Topic Status and existence strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _ ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY" & _
Replace the line ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY" & _ with this code
", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_AVATAR_URL" & _
Look for this code around line 131
Member_Level = rsTopic("M_LEVEL") Member_Posts = rsTopic("M_POSTS") Member_Country = rsTopic("M_COUNTRY")
Directly after that add this code
Member_Avatar = rsTopic("M_AVATAR_URL")
Look for this code around line 309
'## Forum_SQL strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY"
Replace the line strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY" with this code
strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_AVATAR_URL"
Look for this block of code around line 515
rM_NAME = 0 rM_RECEIVE_EMAIL = 1 rM_AIM = 2 rM_ICQ = 3 rM_MSN = 4 rM_YAHOO = 5 rM_TITLE = 6 rMEMBER_ID = 7 rM_HOMEPAGE = 8 rM_LEVEL = 9 rM_POSTS = 10 rM_COUNTRY = 11 rREPLY_ID = 12 rFORUM_ID = 13 rR_AUTHOR = 14 rTOPIC_ID = 15 rR_MESSAGE = 16 rR_LAST_EDIT = 17 rR_LAST_EDITBY = 18 rR_SIG = 19 rR_STATUS = 20 rR_DATE = 21 if CanShowSignature = 1 then rM_SIG = 22 end if
Replace all of that with this code
rM_NAME = 0 rM_RECEIVE_EMAIL = 1 rM_AIM = 2 rM_ICQ = 3 rM_MSN = 4 rM_YAHOO = 5 rM_TITLE = 6 rMEMBER_ID = 7 rM_HOMEPAGE = 8 rM_LEVEL = 9 rM_POSTS = 10 rM_COUNTRY = 11 rM_Avatar = 12 rREPLY_ID = 13 rFORUM_ID = 14 rR_AUTHOR = 15 rTOPIC_ID = 16 rR_MESSAGE = 17 rR_LAST_EDIT = 18 rR_LAST_EDITBY = 19 rR_SIG = 20 rR_STATUS = 21 rR_DATE = 22 if CanShowSignature = 1 then rM_SIG = 23 end if
Look for this code around line 552
Reply_MemberLevel = arrReplyData(rM_LEVEL, iForum) Reply_MemberPosts = arrReplyData(rM_POSTS, iForum) Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)
Directly after that add this code
Reply_MemberAvatar = arrReplyData(rM_Avatar, iForum)
########################################################
For snitz 3.4, 3.4.0.1 and 3.4.0.2 follow this step
Look for this code arond line 584
Response.Write " </p>" & vbNewLine & _ " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine & _
Replace that with the following code
Response.Write " </p>" & vbNewLine if Reply_MemberAvatar <> "noavatar.gif" then response.write" <img src=""" & Reply_MemberAvatar & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ border=""" & intAvatarBorder & """>" end if response.write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine & _
########################################################
For snitz 3.4.0.3 follow this step
Look for this code arond line 584
if strCountry = "1" and trim(Reply_MemberCountry) <> "" then Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine end if
Directly above that add this code
if Reply_MemberAvatar <> "noavatar.gif" then response.write" <img src=""" & Reply_MemberAvatar & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ border=""" & intAvatarBorder & """><br /><br />" end if
########################################################
########################################################
For snitz 3.4, 3.4.0.1 and 3.4.0.2 follow this step
Look for this code around line 789
Response.Write " </p>" & vbNewLine & _ " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine & _
Replace that with the following code
Response.Write " </p>" & vbNewLine if Member_Avatar <> "noavatar.gif" then response.write" <img src=""" & Member_Avatar & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ border=""" & intAvatarBorder & """>" end if
response.write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine & _
########################################################
########################################################
For snitz 3.4.0.3 follow this step
Look for this code arond line 796
if strCountry = "1" and trim(Member_Country) <> "" then Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine end if
Directly above that add this code
if Member_Avatar <> "noavatar.gif" then response.write" <img src=""" & Member_Avatar & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ border=""" & intAvatarBorder & """><br /><br />" end if
########################################################
that all for topic.asp, and that should be it for the mod as well!
What's that nothing's working?
Then pop along to http://forum.snitz.com/forum/forum.asp?FORUM_ID=94
I appologize for all of this text, but hopefully it'll tell you what I did.
Thanks so much for your reply.
Tim.
|
 |
|
telson
Starting Member
4 Posts |
Posted - 15 September 2006 : 21:11:13
|
I got this fixed by replacing all files but the config.asp and the database file... |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 16 September 2006 : 01:49:48
|
Please remove all that info you posted about the Avatar mod. All I needed was for you to post a link to a txt version of your files so I could take a look at them.
You are using files from older versions of the snitz forums with the latest version of the forum. That's not the wisest thing to do.
Again, remove all that info you posted about the mod, and post the links I have asked.
Thanks |
Support Snitz Forums
|
 |
|
|
Topic  |
|
|
|