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
 Private Message Link on topics .asp
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 22 March 2007 :  09:00:44  Show Profile
Probably a long shot, but always thinking how to improve the useability and flexibilty of the forum, I was wondering if a snippet of code is available to insert a Private Message Poster link on the topic.asp page. I currently have on the Author column
Usernameitsme
Rating Stars
space
space
287 Posts
Status: offline

I was looking to add an icon/link under the Status: offline to enable the online member viewing to send a private message via privatesend.asp. Ideally it would be useful to include a reference to the topic or reply ID in the message area.

I am sure this is acheivable if so, has any coding/mod been developed? See a similar example, but the 'post private message icon' is on the bottom of the topic reply instead in the Author Column.

This seems to be the code from 'view source' of the example above
<a href="privatesend.asp?method=Topic&mname=Prox6hundo"><img src="../styles/whiteblue/icons/icon_post_pm.gif" alt="Private Message Poster" border="0"></a>
Green text is the user name given on the topic page.
Will we need to adjust inc_iconfiles.asp too, including the icon image?
If anyone could provide a help to acheive this, it would be greatful
rgds andy

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 23 March 2007 :  19:43:03  Show Profile
This is offtopic, but how did you get the "Status: Offline" code?

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 24 March 2007 :  01:39:46  Show Profile
CalloftheHauntedHouse:
Status Offline/Online requires Active Users Mod first
then add the following script Read Thread
regards andy
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 25 March 2007 :  10:37:32  Show Profile
To give an example of what I am after: See image
("invia un PM" in English means "send a PM")
Any help would be most appreciated
regards andy

Edited by - Andy Humm on 25 March 2007 10:37:58
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 26 March 2007 :  05:21:05  Show Profile  Visit MaD2ko0l's Homepage
find this line

			if strCountry = "1" and trim(Reply_MemberCountry) <> "" then


above it add somthing like this

            If (Reply_MemberPM = "1" and strPMStatus = "1") Then
				if Trim(Reply_MemberPM) <> "" then
					Response.Write	"                <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Reply_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Reply_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
				End If
			End IF



then find this line

	if strCountry = "1" and trim(Member_Country) <> "" then


above it add somthing like this

    If (Member_PM = "1" and strPMStatus = "1") Then
		if Trim(Member_PM) <> "" then
			Response.Write	"                <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Member_Name,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Member_Name,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
		End If
	End IF


the code may need slight changes to how u want it but this will get ya started

© 1999-2010 MaD2ko0l
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  04:54:07  Show Profile
thanks MaD2ko0l
I'll give this code a try
I'll let you know if its okay
andy
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  14:21:49  Show Profile
MaD2ko0l
I have amended the topic.asp file as suggested and nothing is displayed in the Author column, all the rest displays still. please find a txt copy of my topic.asp read here
I don't know if something is missing or needs adjusting
kindest rgds andy
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 27 March 2007 :  14:50:04  Show Profile  Visit AnonJr's Homepage
The author's original post is handled by the "GetFirst" function found near the bottom of topic.asp

HTH
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  14:52:58  Show Profile
AnonJr
Thank you for the input, but I am a 'junior member' so to speak and trying to revamp the file (clueless). It's a bit of 'brain surgery' for me and any help would be greatly appreciated..
rgds
andy
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  14:55:52  Show Profile
The alterations I have added to the topic.txt file are enveloped top and bottom in a commented 'PM Status ********
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 27 March 2007 :  16:13:24  Show Profile  Visit MaD2ko0l's Homepage
Click Me this this...i have made the ammentments, just rename it to topic.asp and then try it...i added the words Pm Me as well as the image, but u can chnage this

keep me posted

© 1999-2010 MaD2ko0l
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  16:30:51  Show Profile
Thank you for this and I have uploaded the new topic.asp
There appears to be no display change in the Author column.

I have run the new and backup file through 'winmerge' to compare and the alterations are noticeable, but I am thinking to what AnonJr said above about the GetFirst() function on line 478

Anon Quote: The author's original post is handled by the "GetFirst" function found near the bottom of topic.asp

Reading through that function there appears to be no mention to pull the data requirements for
line 572: If (Reply_MemberPM = "1" and strPMStatus = "1") Then
I dont know if this is where the problem lies, but the fact nothing displays we might be on track..

thanks so far
andy



Edited by - Andy Humm on 28 March 2007 00:39:49
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  17:02:28  Show Profile
MaD2ko0l I notice you have a PM link on your forum topic.asp page which is situated in the topic column next to the MSN icon. Maybe to make things easier, could you post me a link copy of your topic.asp page or PM me under AndyUK from your forum.
I'll have a butchers and see if I can get that to work in the different location, then look at transfering to the Author Column
thnx andy
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 27 March 2007 :  18:51:43  Show Profile  Visit MaD2ko0l's Homepage
just try this... before the line 572: If (Reply_MemberPM = "1" and strPMStatus = "1") Then
add this

Reply_MemberPM = 1
strPMStatus = 1

and see if u can see the link

Click Me...here is a link to my topic.asp page

here is the mod in action

© 1999-2010 MaD2ko0l

Edited by - MaD2ko0l on 27 March 2007 18:53:02
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 27 March 2007 :  23:53:05  Show Profile
That worked great! Just a small tidy up, I have added the font attribute to get the text to display in the same manner as the others in the author column.

To clear it up for anyone else here is the moded code:
Topic.asp
(approx line 580)
find: if strCountry = "1" and trim(Reply_MemberCountry) <> "" then

before that add the following:
'PM status**********
Reply_MemberPM = 1 (see next post below)
strPMStatus = 1 (see next post below)
If (Reply_MemberPM = "1" and strPMStatus = "1") Then
if Trim(Reply_MemberPM) <> "" then
Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small> <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Reply_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Reply_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "PM Me</a><br>" & vbNewLine
End If
End IF
'PM Status end *****


line 789
find: if strCountry = "1" and trim(Reply_MemberCountry) <> "" then

Before that add the following:
'PM status**********
Reply_MemberPM = 1 (see next post below)
strPMStatus = 1 (see next post below)
If (Reply_MemberPM = "1" and strPMStatus = "1") Then
if Trim(Reply_MemberPM) <> "" then
Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small> <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Reply_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Reply_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "PM Me</a><br>" & vbNewLine
End If
End IF
'PM Status end *****



Thanks everso much, between us we got there!

Edited by - Andy Humm on 28 March 2007 04:56:03
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 28 March 2007 :  04:54:39  Show Profile
Further to the above and thinking about what I mentioned earlier
"Reading through that function there appears to be no mention to pull the data requirements for
line 572: If (Reply_MemberPM = "1" and strPMStatus = "1") Then
I dont know if this is where the problem lies, but the fact nothing displays we might be on track.."

MaD2ko0l kindly provided a shortcut by adding Reply_MemberPM = 1 strPMStatus = 1 before line 572
This is a thought to get round that bypass solution and keep the code searching for a parameter first.

Topic.asp
find
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _ (line 100)

and amend to read
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO, M.M_PMRECEIVE" & _

find
Member_YAHOO = rsTopic("M_YAHOO") line 129

add the following on the next line
Member_PM = rsTopic("M_PMRECEIVE")

find
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" line 292

amend to read
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO, M.M_PMRECEIVE"

find
rM_YAHOO = 5 (line 499)

next line insert
rM_PM = 6

and then amend all the next sequential numbers to follow ie
rM_TITLE = 7
rMEMBER_ID = 8
rM_HOMEPAGE = 9
rM_LEVEL = 10
rM_POSTS = 11
rM_COUNTRY = 12
until the end of the routine end if including the number after the if CanShowSignature = 1 then rM_SIG = 23

find
Reply_MemberYAHOO = arrReplyData(rM_YAHOO, iForum) line 529

add the following on next line
Reply_MemberPM = arrReplyData(rM_PM, iForum)

find both time where we previous inserted line 572 and 788
Reply_MemberPM = 1
strPMStatus = 1


either delete them or comment them
'Reply_MemberPM = 1
'strPMStatus = 1


Hope this helps
andy
Go to Top of Page
Page: of 3 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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07