Author |
Topic  |
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 01 March 2005 : 20:12:53
|
Hi,
I would like to modify the new member message :-
=== if NewMember_Name <> "" then Response.Write " <tr>" & vbNewline & _ " <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) &_ """>" & vbNewline & _ " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Please welcome our newest member:" if strUseExtendedProfile then Response.Write " <a href=""pop_profile.asp?mode=display&id="& NewMember_Id & """>" else Response.Write " <a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & NewMember_Id & "')"">" end if Response.Write NewMember_Name & "</a>.</font>" & vbNewline & _ " </td>" & vbNewline & _ " </tr>" & vbNewline ===
I would like the code to say :- Please welcome our newest member: {membername with usual link} who joined on {date and time}
How/where do I add:- who joined on {date and time} Code.
Regards Phil |
Phil |
Edited by - ruirib on 12 March 2005 06:42:08 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 02 March 2005 : 07:58:50
|
All changes you need to make are in the WriteStatistics() sub of default.asp which begins on line 782 of a clean v3.4.05 default.asp.
Find the following on line 784:Dim NewMember_Name, NewMember_Id, Member_Count And replace it with the following:Dim NewMember_Name, NewMember_Id, NewMember_Date, Member_Count Find the following on line 790:strSql = "SELECT M_NAME, MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS " &_ And replace it with the following:strSql = "SELECT M_NAME, MEMBER_ID, M_DATE FROM " & strMemberTablePrefix & "MEMBERS " &_ Find the following beginning on line 798:NewMember_Name = chkString(rs("M_NAME"), "display")
NewMember_Id = rs("MEMBER_ID") And add the following immediately below itNewMember_Date = chkString(rs("M_DATE"), "display") Finally, find the following on line 1023:"<span class=""spnMessageText"">" & profileLink(NewMember_Name,NewMember_Id) & "</span>.</font></td>" & vbNewline & _ And replace it with the following:"<span class=""spnMessageText"">" & profileLink(NewMember_Name,NewMember_Id) & "</span> who joined on "&chkDate(NewMember_Date, " at ", true)&".</font></td>" & vbNewline & _ |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 05 March 2005 : 04:50:27
|
I'm using version /STRVERSION Snitz Forums 2000 Version 3.3.05 and dont have the last line in my default.asp
Please advise what line I need to amend, see my orginal post that might help.
Thanks for your help so far. |
Phil |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 05 March 2005 : 17:19:34
|
I'm think I'm half way there now as I've found the line that needs to be modified :-
- this line works - Response.Write NewMember_Name & "</a>.</font>" & vbNewline & _
- this is the one that needs chaging a bit the NewMember_Date will work if I change NewMember_Name - - or if I do NewMember_Name,NewMember_date -
Response.Write NewMember_Name & "who joined on" & NewMember_Date & "" </a>.</font> & vbNewline & _
I only need it to show :
Please welcome our newest member: {membername with usual link} who joined on {date and time} - date to be shown in 05/03/2005 10:11:38 PM format.
Where am I going wrong.
|
Phil |
Edited by - philsbbs on 06 March 2005 03:53:52 |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 07 March 2005 : 07:37:36
|
quote: Originally posted by philsbbs I'm using version /STRVERSION Snitz Forums 2000 Version 3.3.05.
Then why are you posting this in the 3.4.x help forum?
You've got two double quotes after NewMembers_Date, remove one of them.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 12 March 2005 : 02:17:57
|
Tired that an no luck get a error :-
Error Type: Microsoft VBScript compilation (0x800A03EA) Syntax error /Default.asp, line 831, column 71
I'm posting here because a moderator moved the topic to here.
Hope someone can help. |
Phil |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 12 March 2005 : 02:30:49
|
I'm almost there I used the following line :-
Response.Write NewMember_Name & "</a> who joined on " & NewMember_Date & vbNewline & _
My only trouble is the new member date is in long format i.e 20050308204910
=== example below ===== 84 Members have made 17565 posts in 5 forums, with the last post on 12/03/2005 06:27:07 AM by: ThomasC. There are currently 2725 topics. Please welcome our newest member: LeeD who joined on 20050308204910 ===== end of example ====
How do I make it appear like 12/03/2005 06:27:07 AM
|
Phil |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 14 March 2005 : 06:20:12
|
You need to apply either the ChkDate or StrToDate function to NewMember_Date as I did in my original post.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 14 March 2005 : 19:41:49
|
The following is already there :-
if not rs.EOF then NewMember_Name = chkString(rs("M_NAME"), "display") NewMember_Id = rs("MEMBER_ID") NewMember_Date = chkString(rs("M_DATE"), "display")
Any other ideas.
|
Phil |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 15 March 2005 : 05:56:59
|
chkDate, not chkString.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 18 March 2005 : 21:46:35
|
If I try the following, which includes the chkdate
Response.Write NewMember_Name & "</a> who joined on "&chkDate(NewMember_Date, " at ", true)&".</font></td>" & vbNewline & _
I get : Error Type: Microsoft VBScript runtime (0x800A01C2) Wrong number of arguments or invalid property assignment: 'chkDate' /Default.asp, line 831
Any ideas |
Phil |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 21 March 2005 : 07:13:47
|
Can't remember back to 3.3.05 and whether or not chkDate was used; try strToDate instead.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 28 March 2005 : 08:29:52
|
Can you or someone give me an example. |
Phil |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 29 March 2005 : 07:21:23
|
Try:Response.Write NewMember_Name & "</a> who joined on "&chkDate(NewMember_Date)&" at "&chkTime(NewMember_Date)&".</font></td>" & vbNewline & _ |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 29 March 2005 07:21:43 |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 12 April 2005 : 17:15:47
|
Works :) |
Phil |
 |
|
Topic  |
|