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

Webbo
Average Member

United Kingdom
982 Posts

Posted - 25 October 2008 :  18:11:17  Show Profile  Visit Webbo's Homepage
Having found this mod: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=51932

I've tried implementing it into a test forum so that it shows 'Site Supporter' underneath a member's name if they are either Gold or Silver level, unfortunately it shows it regardless of what status the member is set at.

The changes I've made to a fresh install of Snitz are as follows:

quote:
In topic.asp:

Line 97:

Changed


--------------------------------------------------------------------------------
 ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY" & _
--------------------------------------------------------------------------------



to this:



--------------------------------------------------------------------------------
 ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_SPONSORLEVEL" & _
--------------------------------------------------------------------------------




Line 160:

Added:
-------------------------------------------------------------------------
  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
------------------------------------------------------------------------------------------





Found this around line 565:



--------------------------------------------------------------------------------
         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
--------------------------------------------------------------------------------



and added this immediately afterwards:



--------------------------------------------------------------------------------
                  if sLev > 0  then
            Response.Write "                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Site Sponsor</small></font><br />" & vbNewLine
         end if
--------------------------------------------------------------------------------



Found this around line 775:



--------------------------------------------------------------------------------
   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
--------------------------------------------------------------------------------



and added this immediately afterwards:



--------------------------------------------------------------------------------
                   if sLev > 0  then
            Response.Write "                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Site Sponsor</small></font><br />" & vbNewLine
         end if
--------------------------------------------------------------------------------




I've checked the database (MySql) and the sLev for four test members are set at 2, 1, 0, & 0 , and using the above I would have thought that 'Site Supporter' would have shown under just the first and second member's names, not all four.

Could someone please advise where I'm going wrong?

Thanks<

balexandre
Junior Member

Denmark
418 Posts

Posted - 25 October 2008 :  18:29:56  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
quote:
the sLev for four test members are set at 2, 1, 0, & 0 , and using the above I would have thought that 'Site Supporter' would have shown under just the first and second member's names, not all four.


witch is correct...

only members 1 and 2 have respectively "2" and "1" values, and the code says:

is sLev > 0 then ...

so, only members that have the sLev variable above zero (and not included)

my question is: What do you want to accomplish?

quote:
if they are either Gold or Silver level


for this you need to edit the code like:

if sLev = 2 then 
 ' Member is Gold code
ifelse sLev = 1 then
 ' Member is Silver code
end if


instead of all codes that have

if sLev >= 0 then ...

<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 25 October 2008 18:34:42
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 25 October 2008 :  18:42:35  Show Profile  Visit Webbo's Homepage
The problem I have is that all test members have 'Site Supporter' showing under their names and for some reason sLev > 0 is not filtering them out as I would have expected

Here's my test forum showing it in more detail: http://www.maggotdrowning.com/testforum/topic.asp?TOPIC_ID=3<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 October 2008 :  00:23:49  Show Profile
Did you Dim the value in "config.asp" and add the lines to "inc_header.asp"? If so, you didn't need to re-specify what the value was in "topic.asp" - you could eliminate the first two bits of code and it should still work. If not, you should dimension the value in "config.asp" and see if that solves your issue.

Also, since you've already called the value of m_sponsorlevel from the database, you don't have to use this whole bit:
quote:
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

Instead, just after this line:
	Member_Level = rsTopic("M_LEVEL")
Add this:
	sLev=rsTopic("M_SPONSORLEVEL")
<

Edited by - Carefree on 26 October 2008 00:43:44
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 26 October 2008 :  04:05:56  Show Profile  Visit Webbo's Homepage
Hi Carefree,

I've Dim'd the value in config.asp but without M.M_SPONSORLEVEL added in topic.asp (line 97) I get the following error message:

quote:
ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/testforum/topic.asp, line 129




Which is refering to this line that I added as per your advice:

sLev=rsTopic("M_SPONSORLEVEL")

The forum still shows everyone as a site sponsor regardless of sponsor level<
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 26 October 2008 :  04:12:08  Show Profile  Visit Webbo's Homepage
Okay, I've just had a play and if I set the topic starter as a 'Freerider' ie sponsor level 0 then all the other sponsor titles underneath the member names stop showing, therefore it looks like the sponsor level of the topic starter is determining wether or not 'Site Sponsor' shows underneath members who reply to the topic and not the individual member's sponsor level

(if you understand what Imean )<
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 26 October 2008 :  05:21:54  Show Profile  Visit Webbo's Homepage
I've just played with it a bit further to try to show the actual sponsor level of the member under their membername and it now shows the sponsor level of the topic starter underneath the topic starter, but also the topic starter's sponsor level under the replying members

Here's a link to topic.txt if anyone can take a look, as I need to now put my head in a fridge lol: Please Click Here<
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 26 October 2008 :  08:17:02  Show Profile  Visit modifichicci's Homepage
Because in te first occourrence of the calling to sponsor level you have
& Member_Sponsorlevel &

you need
Reply_MemberSponsorlevel for reply

that is about your line 570<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 26 October 2008 :  12:21:18  Show Profile  Visit Webbo's Homepage
Did that but for some strange reason it then showed the member's name instead of the sponsor level ???

Finally worked out how and why though as it needed line #292 changing to:
strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE, M.M_SPONSORLEVEL"

All works well now, thanks

....now on to the next stage lol<
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.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07