Author |
Topic  |
Joey D
Starting Member
USA
19 Posts |
Posted - 03 May 2007 : 14:40:38
|
Hi guys,
i have installed Marcel's Sponsor level mod.. it works fine to go into a members profile.. i can set the level and it will keep the level i set.. however,
is the additional level supposed to show up when the user posts or do i have to do extra coding for that to work.. and if so can someone advise as to what the code should be and where it should be placed ?
thanks,
Joe |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 04 May 2007 : 03:35:39
|
It does not show up anywhere else, unless you specifically code it. I will give some examples later today.
Will have to rush to get to work now. |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 04 May 2007 03:35:51 |
 |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 04 May 2007 : 09:53:04
|
Marcel...
thanks !!!
Joe |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 04 May 2007 : 16:42:22
|
Marcel,
that source code box is cool !!
ill check it out tonite...
thanks,
Joe |
 |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 06 May 2007 : 22:17:00
|
Marcel,
i poured over your topic.asp code for a couple hours.. i then tried to copy the parts that related to the sponsor mod,,, now i get errors on the inc_function_common.asp.. am i on the wrong track ?
thanks,
Joe |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 07 May 2007 : 05:51:54
|
That depends on the errors you're getting.
In my opinion there are two different ways of using the SLEV: 1: Show/Hide options for sponsors, such as ads, or upload priviliges. 2: Change appearance of the user in the forum, such as a sponsor icon next to the users name in a topic.
The first one only applies in the users own session ; this is achieved similar to how the mlev (member level) is retrieved. In inc_header.asp there's a call to retrieve a users Mlev:
if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
chkCookie = 1
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
chkCookie = 0
'MarcelG's Sponsormod
'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_SPONSORLEVEL"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
set rsSponsor = my_Conn.Execute (strSql)
if rsSponsor.EOF or rsSponsor.BOF then
sLev = 0
else
sLev = rsSponsor("M_SPONSORLEVEL")
end if
rsSponsor.close
set rsSponsor = nothing
'end of MarcelG's Sponsormod
else
MemberID = -1
mLev = 0
end if I added the red part, to determine the users sponsor-level. With this value, I can later on disable ads, for instance via this:
if slev = 0
'show ads
else
'show blank space
end if
The other one, is a value you need to retrieve along with the rest of the users data. For instance in topic.asp, we retrieve a lot of info about the poster, such as the name, the title etc. I've added the M_SPONSORLEVEL to that query:
'## 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_PMRECEIVE" & _
", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_AVATAR_URL, M.M_SPONSORLEVEL" & _
", T.T_DATE, T.T_SUBJECT, T_VIEW_COUNT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS, T.T_ISPOLL, T.T_POLLSTATUS, T.T_LAST_EDIT" & _
", T.T_LAST_EDITBY, T.T_LAST_POST, T.T_SIG, T.T_REPLIES" & _ and further on:
Member_Avatar = rsTopic("M_AVATAR_URL")
Member_Sponsoring = rsTopic("M_SPONSORLEVEL")
Topic_Date = rsTopic("T_DATE") Which is used further on to change the way the name is diaplayed:
|
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 07 May 2007 06:23:49 |
 |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 07 May 2007 : 10:06:50
|
Marcel,
ive added the M.M_SPONSORLEVEL and the Member Sponsoring = rsTopic("M_SPONSORLEVEL") to the topic.asp page... i have also added the code as per your instructions to the inc_header.asp page.. still resulting in the inc_function_common.asp error...
here is the exact error...
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'cLng'
/forum/inc_func_common.asp, line 933
my topic page isnt exactly like your as i dont have the rest of the mods on it...
thanks for your continuing patience and help !!!!
Joe |
Edited by - Joey D on 07 May 2007 10:08:10 |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 07 May 2007 : 15:22:37
|
Marcel,
i have just added the parts in red !!
J |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 07 May 2007 : 17:06:35
|
Marcel,
does this have to be in any kind of specific order ?
'## 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_PMRECEIVE" & _ ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_AVATAR_URL, M.M_SPONSORLEVEL" & _ ", T.T_DATE, T.T_SUBJECT, T_VIEW_COUNT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS, T.T_ISPOLL, T.T_POLLSTATUS, T.T_LAST_EDIT" & _ ", T.T_LAST_EDITBY, T.T_LAST_POST, T.T_SIG, T.T_REPLIES" & _
as i have the serverhacker mod on the forum and i dont have a M.M_AVATAR_URL in the aformentioned string...
Joe
|
 |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 07 May 2007 : 23:08:51
|
Marcel,
hope you dont mind i used your source code viewer for this....
here is my topic.asp code maybe i missed something ??
http://beta.railroad-line.com/forum/source.asp?page=topic.asp
there arent any errors with topics with no replies
thanks,
Joe |
Edited by - Joey D on 07 May 2007 23:10:37 |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 08 May 2007 : 02:05:54
|
Joey, in this specific query the order isn't important. In the other query, used to retrieve the details about the replies and people who replied, the order *is* important.
About the sourcecode viewer: no problem! But...I cannot access your site here ; I'm getting a 404 |
portfolio - linkshrinker - oxle - twitter |
 |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 08 May 2007 : 09:05:38
|
Marcel,
sorry about that.. looks like i dont have forums.asp as a page on that website... part of your source code code.. interesting.. looks like you have to be logged into the forum to view the code
i set up an account... username demo password demo you should be able to log in and view the page now !!
thanks,
Joe |
 |
|
Joey D
Starting Member
USA
19 Posts |
Posted - 11 May 2007 : 21:38:43
|
TTT |
 |
|
Topic  |
|