Author |
Topic  |
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 22 March 2007 : 09:00:44
|
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
|
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! |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 24 March 2007 : 01:39:46
|
CalloftheHauntedHouse: Status Offline/Online requires Active Users Mod first then add the following script Read Thread regards andy |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 25 March 2007 : 10:37:32
|
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 |
 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 26 March 2007 : 05:21:05
|
find this line
above it add somthing like this
then find this line
above it add somthing like this
the code may need slight changes to how u want it but this will get ya started |
© 1999-2010 MaD2ko0l |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 04:54:07
|
thanks MaD2ko0l I'll give this code a try I'll let you know if its okay andy |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 14:21:49
|
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
|
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 27 March 2007 : 14:50:04
|
The author's original post is handled by the "GetFirst" function found near the bottom of topic.asp
HTH |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 14:52:58
|
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 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 14:55:52
|
The alterations I have added to the topic.txt file are enveloped top and bottom in a commented 'PM Status ******** |
 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 27 March 2007 : 16:13:24
|
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 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 16:30:51
|
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 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 17:02:28
|
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 |
 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 27 March 2007 : 18:51:43
|
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 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 27 March 2007 : 23:53:05
|
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 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 28 March 2007 : 04:54:39
|
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 |
 |
|
Topic  |
|