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: General / Classic ASP versions(v3.4.XX)
 Private Groups
 New Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

MaGraham
Senior Member

USA
1297 Posts

Posted - 15 October 2013 :  12:19:55  Show Profile
quote:
Originally posted by Carefree

In the usergroups manager within the admin panel, set the values of "UserGroup Information" and "UserGroup Members" visible to UserGroup Members, and undo that last modification.


I'll get to this later.

THANK YOU!!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 15 October 2013 :  15:49:13  Show Profile
You're welcome.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 16 October 2013 :  02:01:58  Show Profile
quote:
Originally posted by Carefree

In the usergroups manager within the admin panel, set the values of "UserGroup Information" and "UserGroup Members" visible to UserGroup Members, and undo that last modification.


I just now did this and it works perfect!

Thank you so much, Carefree!

Sure hope you are feeling better!!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 16 October 2013 :  03:39:42  Show Profile

In groupjoin.asp, is there a means of making the list of groups display in alphabetical order?


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 16 October 2013 :  17:31:33  Show Profile
Look for the following line (appx 246):

strSql="SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE ALLOWJOIN=1 AND MEM_HIDE=0"


Change it to say:

strSql="SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE (ALLOWJOIN=1 AND MEM_HIDE=0) ORDER BY USERGROUP_NAME ASC"

Edited by - Carefree on 16 October 2013 17:32:56
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 16 October 2013 :  23:10:04  Show Profile

PERFECT!

Thank you so much, Carefree!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 27 January 2014 :  16:56:14  Show Profile

When members click to join a group they are having to wait 10-15 before they can gain access to the group.

Is there a means of making them have instant access?

Here's my groupjoin.asp.



<%
'###############################################################################
'##
'##                 Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'##             Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; If not, write to:
'##
'##             Free Software Foundation, Inc.
'##             59 Temple Place, Suite 330
'##             Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##               http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##                manderson@snitz.com
'##
'###############################################################################
'##
'##   "groupjoin.asp"  For User Groups Mod - Allowed Joining
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
Response.Write "      <table border=""0"" width=""100%"">" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
      "          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">COMMUNITY HOME</a><br />" & vbNewLine & _
      "          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""groupjoin.asp"">User Groups </a><br />" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table><br />" & vbNewLine
If Request.QueryString("VG")="1" and len(Request.QueryString("IG"))>0 Then
   If isNumeric(Request.QueryString("IG")) Then
      intGroup=cInt(Request.QueryString("IG"))
      strSql = "SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE USERGROUP_ID=" & intGroup
      Set rsGroup=my_Conn.Execute(strSql)
      If not rsGroup.EOF Then
         strName=rsGroup("usergroup_name")
         strDesc=rsGroup("usergroup_desc")
         intHide=rsGroup("mem_hide")
         intAllow=rsGroup("allowjoin")
         rsGroup.Close
         If intHide<>1 and intAllow=1 Then
            strSqll="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
            Set rsMem=my_Conn.Execute(strSqll)
            If not rsMem.EOF Then
               intJoin=1
               rsMem.Close
            Else
               intJoin=0
            End If
            Set rsMem=Nothing
            strSql="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup
            Set rsMem=my_Conn.Execute(strSql)
            If not rsMem.EOF Then
               Response.Write "<table align=""center"" width=""95%"" cellpadding=""0"" cellspacing=""0"" bgColor=""transparent"">" & vbNewLine & _
                  "  <tr valign=""middle"">" & vbNewLine & _
                  "     <td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
                  "        <table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" border=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
                  "           <tr valign=""middle"" height=""60px;"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
                  "              <td align=""center"" colspan=""4"" width=""100%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+2 & """><b>USER GROUPS</b>" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "           </tr>" & vbNewLine & _
                  "           <tr valign=""middle"" bgColor=""" & strHeadCellColor & """>" & vbNewLine & _
                  "              <td align=""center"" width=""25%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Group Name</b>" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "              <td align=""center"" width=""30%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Group Description</b>" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "              <td align=""center"" width=""40%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Group Members</b>" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "              <td align=""center"" width=""5%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Action</b>" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "           </tr>" & vbNewLine & _
                  "           <tr bgColor=""" & strForumCellColor & """>" & vbNewLine & _
                  "              <td valign=""top"" align=""left"" width=""25%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & strName & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "              <td valign=""top"" align=""left"" width=""30%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & FormatStr(strDesc) & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "              <td valign=""top"" align=""left"" width=""40%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & vbNewLine
               rsMem.MoveFirst
               Do while not rsMem.EOF
                  strSql2 = "SELECT * FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & rsMem("MEMBER_ID") & " AND M_STATUS>0"
                  Set rsData=my_Conn.Execute(strSql2)
                  If not rsData.EOF Then
                     Response.Write "<a href=""pop_profile.asp?mode=display&id=" & rsData("MEMBER_ID") & """ target=""_blank""><acronym style=""border:none; text-decoration:none"" title=""View " & rsData("M_NAME") & "'s Profile"">"
                     If strShowAvatar=1 and len(rsData("M_Avatar_URL"))>4 Then
                        Response.Write "<img src=""" & rsData("M_Avatar_URL") & """ height=""35"" alt=""" & rsData("M_NAME") & """ style=""border:none"" />"
                     Else
                        Response.Write rsData("M_NAME")
                     End If
                     Response.Write "</acronym></a>"
                     rsData.Close
                  End If
                  Set rsData=Nothing
                  rsMem.MoveNext
                  If not rsMem.EOF Then Response.Write   " "
               Loop
               rsMem.Close
               Response.Write "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "              <td align=""center"" valign=""top"" width=""5%"">" & vbNewLine
               If intJoin=0 Then
                  Response.Write "                 <a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Join Group") & "><acronym style=""border:none; text-decoration:none"" title=""Join Group""><img src="""& strImageURL &"icon_join.png"" width=""35"" height=""20"" style=""border:none"" alt=""Join Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
               Else
                  Response.Write "                 <a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Quit Group") & "><acronym style=""border:none; text-decoration:none"" title=""Quit Group""><img src="""& strImageURL &"icon_quit.png"" width=""35"" height=""20"" style=""border:none"" alt=""Quit Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
               End If
               If intHide<>1 Then
                  Response.Write "                 <a href=""groupjoin.asp?IG="&intGroup&"&VG=1""" & dWStatus("View Group") & "><acronym style=""border:none; text-decoration:none"" title=""View Group""><img src="""& strImageURL &"icon_view.png"" width=""35"" height=""20"" height=""20"" style=""border:none"" alt=""View Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
               End If
               Response.Write "              </td>" & vbNewLine & _
                  "           </tr>" & vbNewLine & _
                  "        </table>" & vbNewLine & _
                  "     </td>" & vbNewLine & _
                  "  </tr>" & vbNewLine & _
                  "</table>" & vbNewLine
            Else
               Response.Write "<table align=""center"" width=""95%"" cellpadding=""0"" cellspacing=""0"" bgColor=""transparent"">" & vbNewLine & _
                  "  <tr valign=""middle"">" & vbNewLine & _
                  "     <td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
                  "        <table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" border=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
                  "           <tr valign=""middle"" height=""60px;"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
                  "              <td align=""center"" colspan=""4"" width=""100%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+2 & """><b>User Groups</b>" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "           </tr>" & vbNewLine & _
                  "           <tr valign=""middle"" height=""60px;"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
                  "              <td align=""center"" colspan=""4"" width=""100%"">" & vbNewLine & _
                  "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>No Members" & vbNewLine & _
                  "                 </font>" & vbNewLine & _
                  "              </td>" & vbNewLine & _
                  "           </tr>" & vbNewLine & _
                  "        </table>" & vbNewLine & _
                  "     </td>" & vbNewLine & _
                  "  </tr>" & vbNewLine & _
                  "</table>" & vbNewLine
            End If
            Set rsMem=Nothing
         End If
      End If
      Set rsGroup=Nothing
   End If
   WriteFooter
   Response.End
End If
If len(Request.QueryString("IG"))>0 Then
   If isNumeric(Request.QueryString("IG")) Then
      intGroup=cInt(Request.QueryString("IG"))
      strSql="SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE USERGROUP_ID=" & intGroup
      Set rsCheck=my_Conn.Execute(strSql)
      If not rsCheck.EOF Then
         intAllow=rsCheck("AllowJoin")
         rsCheck.Close
      End If
      Set rsCheck=Nothing
      If intAllow=1 Then
         strSql="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
         Set rsGroup=my_Conn.Execute(strSql)
         If not rsGroup.EOF Then
            rsGroup.Close
            Set rsGroup=Nothing
            strSql="DELETE FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
            If strDBType="access" Then
               strSql="DELETE * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
            End If
            my_Conn.Execute(strSql)
            Response.Write "<p align=""center"">Quit Group</p>" & vbNewLine
         Else
            Set rsGroup=Nothing
            my_Conn.Execute("INSERT INTO " & strTablePrefix & "USERGROUP_USERS (USERGROUP_ID, MEMBER_ID, MEMBER_TYPE) VALUES (" & intGroup & ", " & MEMBERID & ", 1)")
            Response.Write "<p align=""center"">Joined Group</p>" & vbNewLine
         End If
      Else
         Response.Write "<p align=""center"">Not found!</p>"
      End If
      Response.Write "<meta http-equiv=""Refresh"" content=""4; URL=groupjoin.asp"" />" & vbNewLine
      WriteFooter
      Response.End
   End If
End If
Response.Write "<table align=""center"" width=""95%"" cellpadding=""0"" cellspacing=""0"" bgColor=""transparent"">" & vbNewLine & _
   "  <tr valign=""middle"">" & vbNewLine & _
   "     <td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
   "        <table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" border=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
   "           <tr valign=""middle"" height=""60px;"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
   "              <td align=""center"" colspan=""3"" width=""100%"">" & vbNewLine & _
   "                 <font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+2 & """><b>User Groups</b>" & vbNewLine & _
   "                 </font>" & vbNewLine & _
   "              </td>" & vbNewLine & _
   "           </tr>" & vbNewLine & _
   "           <tr valign=""middle"" bgColor=""" & strHeadCellColor & """>" & vbNewLine & _
   "              <td align=""center"" width=""40%"">" & vbNewLine & _
   "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Group Name</b>" & vbNewLine & _
   "                 </font>" & vbNewLine & _
   "              </td>" & vbNewLine & _
   "              <td align=""center"" width=""55%"">" & vbNewLine & _
   "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Group Description</b>" & vbNewLine & _
   "                 </font>" & vbNewLine & _
   "              </td>" & vbNewLine & _
   "              <td align=""center"" width=""5%"">" & vbNewLine & _
   "                 <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Action</b>" & vbNewLine & _
   "                 </font>" & vbNewLine & _
   "              </td>" & vbNewLine & _
   "           </tr>" & vbNewLine
strSql="SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE (ALLOWJOIN=1 AND MEM_HIDE=0) ORDER BY USERGROUP_NAME ASC"
Set rsToggle=my_Conn.Execute(strSql)
If not rsToggle.EOF Then
   intI=0
   rsToggle.MoveFirst
   Do while not rsToggle.EOF
      If intI=0 Then CColor=strForumFirstCellColor Else CColor=strAltForumCellColor
      intGroup=rsToggle("USERGROUP_ID")
      strGroup=rsToggle("USERGROUP_NAME")
      strDesc=rsToggle("USERGROUP_DESC")
      intHide=rsToggle("MEM_HIDE")
      strSql1="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
      Set rsJoin=my_Conn.Execute(strSql1)
      If not rsJoin.EOF Then
         intJoin=1
         rsJoin.Close
      Else
         intJoin=0
      End If
      Set rsJoin=Nothing
      Response.Write "           <tr valign=""middle"" bgColor=""" & CColor & """>" & vbNewLine & _
         "              <td align=""left"" size=""40%"">" & vbNewLine & _
         "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & strGroup & vbNewLine & _
         "                 </font>" & vbNewLine & _
         "              </td>" & vbNewLine & _
         "              <td align=""left"" size=""55%"">" & vbNewLine & _
         "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & formatstr(strDesc) & vbNewLine & _
         "                 </font>" & vbNewLine & _
         "              </td>" & vbNewLine & _
         "              <td align=""absmiddle"" size=""5%"">" & vbNewLine
      If intJoin=0 Then
         Response.Write "                 <a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Join Group") & "><acronym style=""border:none; text-decoration:none"" title=""Join Group""><img src="""& strImageURL &"icon_join.png"" width=""35"" height=""20"" style=""border:none"" alt=""Join Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
      Else
         Response.Write "                 <a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Quit Group") & "><acronym style=""border:none; text-decoration:none"" title=""Quit Group""><img src="""& strImageURL &"icon_quit.png"" width=""35"" height=""20"" style=""border:none"" alt=""Quit Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
      End If
      If intHide<>1 Then
         Response.Write "                 <a href=""groupjoin.asp?IG="&intGroup&"&VG=1""" & dWStatus("View Group") & "><acronym style=""border:none; text-decoration:none"" title=""View Group""><img src="""& strImageURL &"icon_view.png"" width=""35"" height=""20"" style=""border:none"" alt=""View Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
      End If
      Response.Write "              </td>" & vbNewLine & _
         "           </tr>" & vbNewLine
      intI=1-intI
      rsToggle.MoveNext
   Loop
   rsToggle.Close
Else
   Response.Write "           <tr valign=""middle"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
      "              <td align=""center"" colspan=""3"" width=""100%"">" & vbNewLine & _
      "                 <font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>No available groups found." & vbNewLine & _
      "                 </font>" & vbNewLine & _
      "              </td>" & vbNewLine & _
      "           </tr>" & vbNewLine
End If
Set rsToggle=Nothing
Response.Write "        </table>" & vbNewLine & _
   "     </td>" & vbNewLine & _
   "  </tr>" & vbNewLine & _
   "</table>" & vbNewLine
WriteFooter
%>

"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 28 January 2014 :  01:20:25  Show Profile

Look for the following line (appx 217):

      Response.Write "<meta http-equiv=""Refresh"" content=""4; URL=groupjoin.asp"" />" & vbNewLine

Change it to say:

      Response.Write "<meta http-equiv=""Refresh"" content=""1; URL=groupjoin.asp"" />" & vbNewLine

Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 28 January 2014 :  02:28:05  Show Profile


No, it's still the same, Carefree.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 28 January 2014 :  02:35:44  Show Profile

I think what's happening is: after joining a group the member must log out and then log back in to be able to access the group.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 28 January 2014 :  03:03:24  Show Profile
User group membership is being read into the session variables from "inc_header.asp". That can be updated by the "groupjoin.asp" file. Immediately prior to line 217, insert these lines, it should fix your problem.


			'	##	Update Session Below
			strGroupMembership = getGroupMembership(MemberID,1)
			Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
			Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
			'	##	Update Session Above



Edited by - Carefree on 28 January 2014 03:03:53
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 28 January 2014 :  09:02:56  Show Profile

Nothing changed, Carefree.

I used a regular account to join a group and still had to log out and then log back in to access group.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 28 January 2014 :  09:54:46  Show Profile
Tested it here, it worked. Tested it on your server, it worked there, too. Quit a group, updated instantly. Rejoined, updated instantly.

Edited by - Carefree on 28 January 2014 10:04:26
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 28 January 2014 :  10:57:54  Show Profile

Carefree, could you try again using the login info I just now emailed you?

It's still not working for me.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 28 January 2014 :  20:13:19  Show Profile
OK, it's fixed. Notice the part in red within the code below. I had to use the "Session.Contents.Remove" command to eliminate the values of two different variables (usergroups & allowedforums) when either joining or quitting the groups. That forces the system to re-acquire them and function properly.


<%
'###############################################################################
'##
'##	              Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'##	          Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; If not, write to:
'##
'##	          Free Software Foundation, Inc.
'##	          59 Temple Place, Suite 330
'##	          Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##	            http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##	             manderson@snitz.com
'##
'###############################################################################
'##
'##	"groupjoin.asp"  For User Groups Mod - Allowed Joining
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
		"          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
		"          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""groupjoin.asp"">User Group Joiner</a><br />" & vbNewLine & _
		"        </tr>" & vbNewLine & _
		"      </table><br />" & vbNewLine
If Request.QueryString("VG")="1" and len(Request.QueryString("IG"))>0 Then
	If isNumeric(Request.QueryString("IG")) Then
		intGroup=cInt(Request.QueryString("IG"))
		strSql = "SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE USERGROUP_ID=" & intGroup
		Set rsGroup=my_Conn.Execute(strSql)
		If not rsGroup.EOF Then
			strName=rsGroup("usergroup_name")
			strDesc=rsGroup("usergroup_desc")
			intHide=rsGroup("mem_hide")
			intAllow=rsGroup("allowjoin")
			rsGroup.Close
			If intHide<>1 and intAllow=1 Then
				strSqll="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
				Set rsMem=my_Conn.Execute(strSqll)
				If not rsMem.EOF Then
					intJoin=1
					rsMem.Close
				Else
					intJoin=0
				End If
				Set rsMem=Nothing
				strSql="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup
				Set rsMem=my_Conn.Execute(strSql)
				If not rsMem.EOF Then
					Response.Write	"<table align=""center"" width=""95%"" cellpadding=""0"" cellspacing=""0"" bgColor=""transparent"">" & vbNewLine & _
						"	<tr valign=""middle"">" & vbNewLine & _
						"		<td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
						"			<table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" border=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
						"				<tr valign=""middle"" height=""60px;"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
						"					<td align=""center"" colspan=""4"" width=""100%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+2 & """><b>Usergroup Joiner</b>" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"				</tr>" & vbNewLine & _
						"				<tr valign=""middle"" bgColor=""" & strHeadCellColor & """>" & vbNewLine & _
						"					<td align=""center"" width=""25%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Usergroup Name</b>" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"					<td align=""center"" width=""30%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Description</b>" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"					<td align=""center"" width=""40%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Members</b>" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"					<td align=""center"" width=""5%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Action</b>" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"				</tr>" & vbNewLine & _
						"				<tr bgColor=""" & strForumCellColor & """>" & vbNewLine & _
						"					<td valign=""bottom"" align=""left"" width=""25%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & strName & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"					<td valign=""bottom"" align=""left"" width=""30%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & FormatStr(strDesc) & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"					<td valign=""bottom"" align=""left"" width=""40%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & vbNewLine
					rsMem.MoveFirst
					Do while not rsMem.EOF
						strSql2 = "SELECT * FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & rsMem("MEMBER_ID") & " AND M_STATUS>0"
						Set rsData=my_Conn.Execute(strSql2)
						If not rsData.EOF Then
							Response.Write	"<a href=""pop_profile.asp?mode=display&id=" & rsData("MEMBER_ID") & """ target=""_blank""><acronym style=""border:none; text-decoration:none"" title=""View " & rsData("M_NAME") & "'s Profile"">"
							If strShowAvatar=1 and len(rsData("M_Avatar_URL"))>4 Then
								Response.Write	"<img src=""" & rsData("M_Avatar_URL") & """ height=""35"" alt=""" & rsData("M_NAME") & """ style=""border:none"" />"
							Else
								Response.Write	rsData("M_NAME")
							End If
							Response.Write	"</acronym></a>"
							rsData.Close
						End If
						Set rsData=Nothing	
						rsMem.MoveNext
						If not rsMem.EOF Then Response.Write	", "
					Loop
					rsMem.Close
					Response.Write	"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"					<td align=""center"" valign=""bottom"" width=""5%"">" & vbNewLine
					If intJoin=0 Then
						Response.Write	"						<a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Join Group") & "><acronym style=""border:none; text-decoration:none"" title=""Join Group""><img src="""& strImageURL &"icon_friends.gif"" style=""border:none"" alt=""Join Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
					Else
						Response.Write	"						<a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Quit Group") & "><acronym style=""border:none; text-decoration:none"" title=""Quit Group""><img src="""& strImageURL &"icon_unsubscribe.gif"" style=""border:none"" alt=""Quit Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
					End If
					If intHide<>1 Then 
						Response.Write	"						<a href=""groupjoin.asp?IG="&intGroup&"&VG=1""" & dWStatus("View Group") & "><acronym style=""border:none; text-decoration:none"" title=""View Group""><img src="""& strImageURL &"icon_members.png"" height=""20"" style=""border:none"" alt=""View Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
					End If
					Response.Write	"					</td>" & vbNewLine & _
						"				</tr>" & vbNewLine & _
						"			</table>" & vbNewLine & _
						"		</td>" & vbNewLine & _
						"	</tr>" & vbNewLine & _
						"</table>" & vbNewLine
				Else
					Response.Write	"<table align=""center"" width=""95%"" cellpadding=""0"" cellspacing=""0"" bgColor=""transparent"">" & vbNewLine & _
						"	<tr valign=""middle"">" & vbNewLine & _
						"		<td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
						"			<table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" border=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
						"				<tr valign=""middle"" height=""60px;"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
						"					<td align=""center"" colspan=""4"" width=""100%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+2 & """><b>Usergroup Joiner</b>" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"				</tr>" & vbNewLine & _
						"				<tr valign=""middle"" height=""60px;"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
						"					<td align=""center"" colspan=""4"" width=""100%"">" & vbNewLine & _
						"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>No Members" & vbNewLine & _
						"						</font>" & vbNewLine & _
						"					</td>" & vbNewLine & _
						"				</tr>" & vbNewLine & _
						"			</table>" & vbNewLine & _
						"		</td>" & vbNewLine & _
						"	</tr>" & vbNewLine & _
						"</table>" & vbNewLine
				End If
				Set rsMem=Nothing
			End If
		End If
		Set rsGroup=Nothing
	End If	
	WriteFooter
	Response.End
End If
If len(Request.QueryString("IG"))>0 Then
	If isNumeric(Request.QueryString("IG")) Then
		intGroup=cInt(Request.QueryString("IG"))
		strSql="SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE USERGROUP_ID=" & intGroup
		Set rsCheck=my_Conn.Execute(strSql)
		If not rsCheck.EOF Then
			intAllow=rsCheck("AllowJoin")
			rsCheck.Close
		End If
		Set rsCheck=Nothing
		If intAllow=1 Then
			strSql="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
			Set rsGroup=my_Conn.Execute(strSql)
			If not rsGroup.EOF Then
				rsGroup.Close
				Set rsGroup=Nothing
				strSql="DELETE FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
				If strDBType="access" Then
					strSql="DELETE * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
				End If
				my_Conn.Execute(strSql)
				Response.Write	"<p align=""center"">Quit Group</p>" & vbNewLine
			Else
				Set rsGroup=Nothing
				my_Conn.Execute("INSERT INTO " & strTablePrefix & "USERGROUP_USERS (USERGROUP_ID, MEMBER_ID, MEMBER_TYPE) VALUES (" & intGroup & ", " & MEMBERID & ", 1)")
				Response.Write	"<p align=""center"">Joined Group</p>" & vbNewLine
			End If
		Else
			Response.Write	"<p align=""center"">Not found!</p>"
		End If
		'  ## Update Session Below
		strGroupMembership = getGroupMembership(MemberID,1)
		Response.Cookies(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
		Session.Contents.Remove(strCookieURL & "UserGroups" & MemberID)
		Session.Contents.Remove(strCookieURL & "UserGroups-1")
		Session.Contents.Remove(strCookieURL & "AllowedForums" & MemberID)
		Session("UserGroups") = strGroupMembership
		'  ## Update Session Above
		Response.Write	"<meta http-equiv=""Refresh"" content=""1; URL=groupjoin.asp"" />" & vbNewLine
		WriteFooter
		Response.End
	End If
End If
Response.Write	"<table align=""center"" width=""95%"" cellpadding=""0"" cellspacing=""0"" bgColor=""transparent"">" & vbNewLine & _
	"	<tr valign=""middle"">" & vbNewLine & _
	"		<td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
	"			<table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" border=""1"" style=""border-collapse:collapse;"">" & vbNewLine & _
	"				<tr valign=""middle"" height=""60px;"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
	"					<td align=""center"" colspan=""3"" width=""100%"">" & vbNewLine & _
	"						<font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+2 & """><b>Usergroup Joiner</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"				</tr>" & vbNewLine & _
	"				<tr valign=""middle"" bgColor=""" & strHeadCellColor & """>" & vbNewLine & _
	"					<td align=""center"" width=""40%"">" & vbNewLine & _
	"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Usergroup Name</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"					<td align=""center"" width=""55%"">" & vbNewLine & _
	"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Description</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"					<td align=""center"" width=""5%"">" & vbNewLine & _
	"						<font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """><b>Action</b>" & vbNewLine & _
	"						</font>" & vbNewLine & _
	"					</td>" & vbNewLine & _
	"				</tr>" & vbNewLine
strSql="SELECT * FROM " & strTablePrefix & "USERGROUPS WHERE ALLOWJOIN=1 AND MEM_HIDE=0"
Set rsToggle=my_Conn.Execute(strSql)
If not rsToggle.EOF Then
	intI=0
	rsToggle.MoveFirst
	Do while not rsToggle.EOF
		If intI=0 Then CColor=strForumFirstCellColor Else CColor=strAltForumCellColor
		intGroup=rsToggle("USERGROUP_ID")
		strGroup=rsToggle("USERGROUP_NAME")
		strDesc=rsToggle("USERGROUP_DESC")
		intHide=rsToggle("MEM_HIDE")
		strSql1="SELECT * FROM " & strTablePrefix & "USERGROUP_USERS WHERE USERGROUP_ID=" & intGroup & " AND MEMBER_ID=" & MEMBERID
		Set rsJoin=my_Conn.Execute(strSql1)
		If not rsJoin.EOF Then
			intJoin=1
			rsJoin.Close
		Else
			intJoin=0
		End If
		Set rsJoin=Nothing
		Response.Write	"				<tr valign=""middle"" bgColor=""" & CColor & """>" & vbNewLine & _
			"					<td align=""left"" size=""40%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & strGroup & vbNewLine & _
			"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"					<td align=""left"" size=""55%"">" & vbNewLine & _
			"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & formatstr(strDesc) & vbNewLine & _
			"						</font>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"					<td align=""absmiddle"" size=""5%"">" & vbNewLine
		If intJoin=0 Then
			Response.Write	"						<a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Join Group") & "><acronym style=""border:none; text-decoration:none"" title=""Join Group""><img src="""& strImageURL &"icon_friends.gif"" style=""border:none"" alt=""Join Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
		Else
			Response.Write	"						<a href=""groupjoin.asp?IG="&intGroup&"""" & dWStatus("Quit Group") & "><acronym style=""border:none; text-decoration:none"" title=""Quit Group""><img src="""& strImageURL &"icon_unsubscribe.gif"" style=""border:none"" alt=""Quit Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
		End If
		If intHide<>1 Then 
			Response.Write	"						<a href=""groupjoin.asp?IG="&intGroup&"&VG=1""" & dWStatus("View Group") & "><acronym style=""border:none; text-decoration:none"" title=""View Group""><img src="""& strImageURL &"icon_members.png"" height=""20"" style=""border:none"" alt=""View Group"" hspace=""0"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
		End If
		Response.Write	"					</td>" & vbNewLine & _
			"				</tr>" & vbNewLine
		intI=1-intI
		rsToggle.MoveNext
	Loop
	rsToggle.Close
Else
	Response.Write	"				<tr valign=""middle"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
		"					<td align=""center"" colspan=""3"" width=""100%"">" & vbNewLine & _
		"						<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>No available groups found." & vbNewLine & _
		"						</font>" & vbNewLine & _
		"					</td>" & vbNewLine & _
		"				</tr>" & vbNewLine
End If
Set rsToggle=Nothing
Response.Write	"			</table>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table>" & vbNewLine
WriteFooter
%>
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07