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)
 2 mods for the member profile
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 September 2004 :  10:42:00  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I would like to have help creating 2 mods for the member profile..

1. A date in the db when the profile was last updated, this way you can list the 5 latest updated profile or something like that

2. A counter for how many visits every member profile has

The update-date probably already is there? The other one shouldn't be that hard either but maybe someone can point me in the right direction. The profile code is kinda messy I noticed from earlier edits =)

/Tribaliztic
- www.gotlandrace.se -

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 02 September 2004 :  15:53:16  Show Profile  Visit MarcelG's Homepage
They are both very doable, if not done already by someone else. They sound familiar anyhow.
However, I am sorry, but I do not have the time to dive in right now...

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 02 September 2004 :  16:27:55  Show Profile
Add two fields to your forum_members and forum_members_pending table. #1 m_profile_update char(14) and #2 m_profile_viewcount int. You'll want a default value of 0 for the viewcount and should update all previous members with 0. Update the profileupdate column for previous members with the value in m_date.

Replace line #1240 in pop_profile.asp
Before:

----------
end if
strSql = strSql & " WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "' "
----------

After:

----------
end if
strSql = strSql & ", M_PROFILEUPDATE_DT = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & " WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "' "
----------


Replace line #225 in pop_profile.asp
Before:

----------
else
    strMyHobbies = rs("M_HOBBIES")
----------

After:

----------
else
    strSql = "UPDATE " & strMemberTablePrefix & "MEMBER "
    strSql = strSql & " SET M_PROFILE_VIEWCOUNT = (M_PROFILE_VIEWCOUNT + 1) "
    strSql = strSql & " WHERE (MEMBER_ID = " & ppMember_ID & ")"
    my_conn.Execute (strSql),,adCmdText + adExecuteNoRecords

    strMyHobbies = rs("M_HOBBIES")
----------


Replace line #83 in register.asp
Before:

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

After:

----------
 ", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_SHA256, M_PROFILE_VIEWCOUNT, M_PROFILE_UPDATE" & _
----------


Replace line #180 and line #566 in register.asp
Before:

----------
strSql = strSql & ")"
----------

After:

----------
strSql = strSql & ", 0"
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ")"
----------


Replace line #140 and line #433 in register.asp
Before:

----------
strSql = strSql & ") "
----------

After:

----------
strSql = strSql & ", M_PROFILE_VIEWCOUNT"
strSql = strSql & ", M_PROFILE_UPDATE"
strSql = strSql & ") "
----------


All line number references are before changes are made. I don't think I missed anything, but implement and use at your own risk.

KawiForums.com



Edited by - -gary on 02 September 2004 16:31:26
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 02 September 2004 :  17:54:27  Show Profile  Visit masterao's Homepage
Profile Views

Description: The Profile Views MOD keeps count of how many times a member's profile is viewed by other members.

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

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 03 September 2004 :  03:46:39  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
-gary: is that both my wishes in one answer? =) Does that one include all features that OWM has in his "Profile Views MOD"?

Thanks alot for such good and fast replies! =)

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 03 September 2004 :  07:11:54  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I got this working now! Thanks alot!! =)

Will try and modify the "member spotlight" to show the latest updated member profile instead.

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 03 September 2004 :  09:37:44  Show Profile
OneWay's script is more involed in that it doesn't increment your own profile and says it stops stuffing. I haven't looked at the code though, so I don't know what else is there.

What I posted above is a quick and dirty way to get you started, I wouldn't call them mods, but suggestions that either need to be expanded on by others, or worked out yourself.

KawiForums.com


Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 04 September 2004 :  16:27:29  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I pulled out the update date stuff from your code gary, and then used OWM:s code for the views.
Right now I'm working on the spotlight thingy, brb with that one! =)

/Tribaliztic
- www.gotlandrace.se -
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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07