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/Code)
 Add feature to display or hide email from users
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 5

DHT
Starting Member

37 Posts

Posted - 01 November 2000 :  19:59:56  Show Profile
I just install Snitz Forum 2000, and I just add a feature to hidden or display email from users. Here what I did:

1/ Modify inc_profile.asp

At line 63: <INPUT type="hidden" name="Email2" value="<% =RS("M_EMAIL") %>"></font></td>

Modify and add more these lines (63 to 70)
=======

<INPUT type="hidden" name="Email2" value="<% =RS("M_EMAIL") %>">

Hide Email :
<% if (RS("M_HIDE_EMAIL") = 1) then %>
yes <input type="radio" value="1" checked name="HideMail"> - no <input type="radio" value="0" name="HideMail"
<% else %>
yes <input type="radio" value="1" name="HideMail"> - no <input type="radio" value="0" checked name="HideMail"
<% end if %>
</font></td>

======

2/ Modify register.asp

At line 149 : strSql = strSql & ", M_EMAIL"
Add line 150 :
======
strSql = strSql & ", M_HIDE_EMAIL"
======

Rolling down a few lines, you will see :
strSql = strSql & ", " & "'" & ChkString(Request.Form("Email"),"email") & "'"

Add one more line after it:
=======
strSql = strSql & ", " & "'" & Request.Form("HideMail") & "'"
=======

3/ Modify pop_profile.asp

Make sure this string exist in Case "display" , "goEdit" and "goModify" :
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HIDE_EMAIL "

a. In Case "display" :
after line : strMyBio = rs("M_BIO")
insert this line :
=======
Set HideMail = rs("M_HIDE_EMAIL")
=======

Then roll down a little bit untill you see this line:
<td bgColor=<% =strPopUpTableColor %> align=right width="10%" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Email Address: </font></td>

Insert these line after it:
=======
<% if(HideMail = 0) then %>
<td bgColor=<% =strPopUpTableColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> <a href= "JavaScript:openWindow('pop_mail.asp?id=<% =rs("MEMBER_ID") %>')"><% =rs("M_EMAIL") %></a> </font></td>
<% else %>
<td bgColor=<% =strPopUpTableColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> Hidden Email  </font></td>
<% end if %>

=====

b. In Case "EditIt" and "ModifyIt"
Look for these string (begin of SQL update)
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_PASSWORD = '" & ChkString(Request.Form("Password"),"") & "', "
strSql = strSql & " M_COUNTRY = '" & ChkString(Request.Form("Country"),"") & "', "

Add this line after that :
=====
strSql = strSql & " M_HIDE_EMAIL = " & Request.Form("HideMail") & ", "
====

That's all ! (I think so - if I do not forget something )

[moved by admin on 11/6/2000]

ilovemoney
Starting Member

Taiwan
27 Posts

Posted - 09 November 2000 :  01:02:59  Show Profile
Thank you!!

It's great!! :D

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 09 November 2000 :  07:18:26  Show Profile
I had noticed the M_HIDE_EMAIL database field and was wondering why it was there if it wasn't being used.

There is also a M_SUBSCRIPTION that I am not sure if it's being used or what it's intent was.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 09 November 2000 :  07:41:43  Show Profile  Visit HuwR's Homepage
M_SUBSCRIPTION
Definately not used, I hijacked it to implement our forum mailing list.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 09 November 2000 :  08:29:03  Show Profile
I also added checks in <b>topic.asp</b> to hide the <img src="icon_email.gif" border=0> icon for user's that choose to hide their email.

In v3.1sr3b2 the line (in file <b>pop_profile.asp</b>):

<pre id=code><font face=courier size=2 id=code>'strsql = strsql & ", M_HIDE_EMAIL = '" & chkString(Request.Form("HideMail"),"") & "'"</font id=code></pre id=code>

was already in there, just commented out. But since M_HIDE_EMAIL has a byte value and really no need to use the chkString function on it, I changed mine to this:

<pre id=code><font face=courier size=2 id=code>strsql = strsql & ", M_HIDE_EMAIL = " & Request.Form("HideMail")</font id=code></pre id=code>

also this line was already in there as well:

<pre id=code><font face=courier size=2 id=code>strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HIDE_EMAIL "</font id=code></pre id=code>

Edited by - Richard Kinser on 09 November 2000 09:21:25
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 09 November 2000 :  10:21:09  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I had noticed the M_HIDE_EMAIL database field and was wondering why it was there if it wasn't being used.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

At one point it was there (I had written the code), but for some reason it disappeared somewhere along the ways.

Dave Maxwell
--------------
When's the next meeting of Snitzaholics Anonymous<img src=icon_smile_question.gif border=0 align=middle>
Go to Top of Page

DHT
Starting Member

37 Posts

Posted - 09 November 2000 :  16:24:09  Show Profile
To solve problem when people click on Email icon in forums, I modified a little in <b>pop_mail.asp</b>

- Look for line 49 : rs = my_Conn.Execute (strSql)

Insert these lines after it:

======
<font color=blue>
Set hideMail = rs("M_HIDE_EMAIL")
if (hideMail = 1) then
%>
<p> Sorry! This user won't receive email from this Forum ! <p>
<p> </p>

<%
else
</font id=blue>
======

- Roll down to the end page and look for line <% end if %>

Insert one more <% end if %> after that.

By this modify, a user who did not hide email still receive email from forums, but anyone hided his mail would display a message.

Go to Top of Page

-=mESs=-
Starting Member

Taiwan
13 Posts

Posted - 15 November 2000 :  09:15:04  Show Profile  Visit -=mESs=-'s Homepage  Send -=mESs=- an ICQ Message
WHAN I Modify User Profile

THAN DESPLAY

Microsoft JET Database Engine ¿ù»~ '80040e14'

¬d¸ß¹Bºâ¦¡ ''maichel' M_HIDE_EMAIL = 0' ¤¤ªº »yªk¿ù»~ (¤Ö¤F¹Bºâ¤¸)¡C

/bbs/member/pop_profile.asp, ¦C1074

WHAT'S WRONG??

Go to Top of Page

DHT
Starting Member

37 Posts

Posted - 17 November 2000 :  07:23:54  Show Profile
Mostly, the error came from wrong ASP syntax. Check again case ModifyIt in <b>pop_profile.asp</b>, I insert M_HIDE_EMAIL before these lines:

if strICQ = "1" then
strSql = strSql & ", M_ICQ = '" & ChkString(Request.Form("ICQ"),"") & "'"
end if

Here are few lines that you see before the <b>condition if </b> above:
================
<font color=blue>
strSql = strSql & ", M_EMAIL = '" & ChkString(Request.Form("Email"),"") & "'"

strSql = strSql & ", M_TITLE = '" & ChkString(Request.Form("Title"),"") & "'"

strSql = strSql & ", M_POSTS = " & ChkString(Request.Form("Posts"),"") & " "

strSql = strSql & ", M_COUNTRY = '" & ChkString(Request.Form("Country"),"") & "' "

strSql = strSql & ", M_HIDE_EMAIL = " & Request.Form("HideMail") & " "
</font id=blue>
==================

Just be careful with single quote and comma.

Hope this help

Edited by - DHT on 17 November 2000 07:39:29
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 November 2000 :  08:23:06  Show Profile  Visit HuwR's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<p> Sorry! This user won't receive email from this Forum ! <p>
<p> </p>
</font id=blue>
======
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

May be better worded
Sorry, This user does not want to receive email from the Forum !


<font color=blue>'Resistance is futile'[/blue]
Go to Top of Page

superpon
Starting Member

USA
7 Posts

Posted - 17 November 2000 :  22:58:14  Show Profile  Visit superpon's Homepage
I got a question...

After I change the HideMail mode to "yes",
it works correctly.

And then I change it back to "no",
it still hides my e-mail.

And I open my database file to see that "M_HIDE_EMAIL" field, it doesn't change back to "0", it still shows "1" in that field.....

Who can please tell me what's wrong......
Thanks for your helping.

Go to Top of Page

-=mESs=-
Starting Member

Taiwan
13 Posts

Posted - 18 November 2000 :  12:38:51  Show Profile  Visit -=mESs=-'s Homepage  Send -=mESs=- an ICQ Message
superpon§A¬O¥Î­þ­Óª©¥»£«??

¦pªG¬O3.1SR2ªº¸Ü..¦b<b>pop_profile.asp</b>¸Ì¤j¬ù <font color=blue>1013 </font id=blue>¦æ­n¥[¤@­Ó<font color=red><pre id=code><font face=courier size=2 id=code>
strsql = strsql & ", M_HIDE_EMAIL = " & Request.Form("HideMail")</font id=code></pre id=code></font id=red>


§Úªº¬Ý°_¨Ó¬O³o¼Ë...

<pre id=code><font face=courier size=2 id=code>
strSql = strSql & ", M_EMAIL = '" & ChkString(Request.Form("Email"),"") & "'"


strSql = strSql & ", M_TITLE = '" & ChkString(Request.Form("Title"),"") & "'"


strSql = strSql & ", M_POSTS = " & ChkString(Request.Form("Posts"),"") & " "


strSql = strSql & ", M_COUNTRY = '" & ChkString(Request.Form("Country"),"") & "'"


<font color=red>strsql = strsql & ", M_HIDE_EMAIL = " & Request.Form("HideMail")</font id=red></font id=code></pre id=code>


Edited by - -=mESs=- on 18 November 2000 12:51:03
Go to Top of Page

superpon
Starting Member

USA
7 Posts

Posted - 18 November 2000 :  14:37:00  Show Profile  Visit superpon's Homepage
I'm using 3.1sr2..

It works finally...THANKS A LOT....<img src=icon_smile.gif border=0 align=middle>

Go to Top of Page

Eyad
Starting Member

Saudi Arabia
11 Posts

Posted - 20 November 2000 :  21:47:47  Show Profile  Visit Eyad's Homepage  Send Eyad a Yahoo! Message
I tried this Mod but now I can't update or modify any profile. I get the message: E-Mail already in use. And when I tried to test hiding E-Mail by changing M_HideMail from the database to 1, I see the message E-Mail Hidden and right beside it I see the E-Mail!!
Also, The E-mail is doubled by seeing it twice besids each other.

Can someone please tell me what did I do wrong ..
Thank you

Go to Top of Page

Eyad
Starting Member

Saudi Arabia
11 Posts

Posted - 20 November 2000 :  22:26:22  Show Profile  Visit Eyad's Homepage  Send Eyad a Yahoo! Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I tried this Mod but now I can't update or modify any profile. I get the message: E-Mail already in use. And when I tried to test hiding E-Mail by changing M_HideMail from the database to 1, I see the message E-Mail Hidden and right beside it I see the E-Mail!!
Also, The E-mail is doubled by seeing it twice besids each other.

Can someone please tell me what did I do wrong ..
Thank you


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Oooops, I had it fixed now and it works fine. But it is conflecting with the Save Password Mod.
I guess something wrong with the PW Mod since it says wrong password when I update my profile when it tries to redirect.. I don't know <img src=icon_smile.gif border=0 align=middle>

Live and Learn .. No matter what you earn .. Money or knowledge .. From the market or the college
Go to Top of Page

infinity
New Member

New Zealand
90 Posts

Posted - 21 November 2000 :  19:12:06  Show Profile  Visit infinity's Homepage
Hi there.

Would someone be so kind as to post a text file with the instructions on how to implement this mod in its fullness... ie. with the icon hide code and the various fixes/corrections people have made...
Might make it easier for people to set this up...

Thanks people,

Infinity

Life is but a dream... and that dream is Here and Now. Therefore, Be here Now.
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Next Page
 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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07