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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Need a little help rebuilding Hamlin's avatar mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GenEdge
Starting Member

7 Posts

Posted - 04 February 2004 :  19:48:19  Show Profile  Visit GenEdge's Homepage
I decided that DoraMoon's avatar addon was a little much more than I wanted. I want my members able to add, review, edit, and delete their own avatars using Hamlin's avatar mod that I have been using since it came out for version 3.4.

I'm not sure that it will work totally like I want but I have been able to copy all the admin files and make new ones that registered members are able to access. I revised the add_avatar.asp so that they are able to add there own. My problem is getting the code right so that when members view the review_avatar.asp they see ONLY their avatars and NOT all avatars in the DB. Can some please help with this coding issue?

Text File of Avatar Review

Edited by - GenEdge on 04 February 2004 23:22:48

masterao
Senior Member

Sweden
1678 Posts

Posted - 04 February 2004 :  19:55:21  Show Profile  Visit masterao's Homepage
This should work for that you want it to do, although I haven't tested it. I assume that AVATAR.A_MEMBER_ID is the memberid of the member who uploaded the avatar. If not, then the following will not work.

Add the line marked red:

'##### Get Avatar's from DB
strSql = "SELECT " & strTablePrefix & "AVATAR.A_ID"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_URL"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_NAME"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_MEMBER_ID"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR "
strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID = " & MemberID
strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC;"

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

GenEdge
Starting Member

7 Posts

Posted - 04 February 2004 :  20:06:18  Show Profile  Visit GenEdge's Homepage
quote:
Originally posted by masterao

This should work for that you want it to do, although I haven't tested it. I assume that AVATAR.A_MEMBER_ID is the memberid of the member who uploaded the avatar. If not, then the following will not work.

Add the line marked red:

'##### Get Avatar's from DB
strSql = "SELECT " & strTablePrefix & "AVATAR.A_ID"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_URL"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_NAME"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_MEMBER_ID"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR "
strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID = " & MemberID
strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC;"


That did it. Thanks masterao
Go to Top of Page

GenEdge
Starting Member

7 Posts

Posted - 04 February 2004 :  23:35:16  Show Profile  Visit GenEdge's Homepage
Everything with this modification is working smoothly except one last thing that I can't pin-point. How do I change the drop down menu in add_avatar.asp and edit_avatar.asp to just be the member viewing the page? I don't need a drop down menu for all members but for the member viewing the page. I have attached my add_avatar.asp which is modified.

Add Avatar Text

Edited by - GenEdge on 04 February 2004 23:36:08
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 05 February 2004 :  08:56:08  Show Profile  Visit masterao's Homepage
I cannot guarantee that this will work, but I think it will. Locate the sql-query which gets all members (lines 142-145), and replace it with the following:

'## Forum_SQL - Get all members
strSql = "SELECT MEMBER_ID, M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME <> 'n/a'"
  if mLev < 4 then
    strSql = strSql & " AND MEMBER_ID = " & MemberID
  end if
strSql = strSql & " ORDER BY M_NAME ASC;"
'response.write(strSql)
'response.end

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07