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/O Code)
 pre- inserted text when posting new topic
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

uraken
New Member

United Kingdom
75 Posts

Posted - 13 October 2003 :  10:59:02  Show Profile
Hi i would like to have some pre-inserted text (almost template style)in the text box when a user either replys to or creates a new topic i have managed to edit the post.asp and insert text into the text area for everyone but i would like to seperate the text with carriage returns so that each pre-inserted heading starts on new line, so i guess what i'm asking is how to insert carriage returns in the text box?
thanks as always in advance for any help

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 13 October 2003 :  11:23:17  Show Profile
There was something like this for v3.3.x which would allow members to add their own custom headers and footers to all their messages. For example, all my posts here are in black so I could set my profile so that [black] was added to the beginning of all my posts and [/black] to then end, which would save a bit iof typing. If I remember correctly, Image was the author so it might be worth having a look at his site.

To answer your question though, use vbCrLf to insert line breaks in the textarea. E.G.:

Response.Write "<textarea>header" & vbCrLf & vbCrLf & "footer"</textarea>"


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.”
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 13 October 2003 :  11:40:43  Show Profile
sorry i didn't understand your example (bit of thicky sorry) can you do it using this code i'm trying to put a line break in between situation: class/time/location: action
so it looks like this
situation:
class/time/location:
action:


<textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "Situation: Class/Time/Location: Action:</textarea>
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 13 October 2003 :  12:08:00  Show Profile  Visit MarcelG's Homepage
Uraken, check Steve D.'s Event Add On.:
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=41216&SearchTerms=Steve,D,Event,Add,On
It shows how to insert an editable field which gets added to the messagetext in post_info.asp.
I did it in our intranet site, and it works as a charm.
The enters are added by merging the messagetext :
from post_info.asp:

if Len(Request.Form("handover_contractname")) > 1 then	
HandoverInfo = HandoverInfo & "Contract :  " & Request.Form("handover_contractname") & vbNewLine
end if

The vbNewline creates a new line.

Good luck!

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 13 October 2003 12:11:26
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 13 October 2003 :  12:43:01  Show Profile
Add the code in red below:
<textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "Situation:" & vbCrLf & "Class/Time/Location:" & vbCrLf & "Action:</textarea>

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.”
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 14 October 2003 :  03:33:57  Show Profile
Thanks to the both of you it now works fine and dandy.your help is very much apreciated
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 October 2003 :  04:57:51  Show Profile
You're welcome, Uraken.


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.”
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 15 October 2003 :  09:32:25  Show Profile
marcelgoertz i read with interest the article which you very kindly pointed me to i got the general idea of what was being said although in all honesty i was a bit lost as it talked of calender mods being required is there any other way that you know of in which i can add editable field like drop down lists to the message area or how do i include a new field on the post.asp so that it would appear n the message when posted?
I Know its a big ask so i thank you in advance.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 16 October 2003 :  02:59:12  Show Profile  Visit MarcelG's Homepage
quote:
Originally posted by uraken

marcelgoertz i read with interest the article which you very kindly pointed me to i got the general idea of what was being said although in all honesty i was a bit lost as it talked of calender mods being required is there any other way that you know of in which i can add editable field like drop down lists to the message area or how do i include a new field on the post.asp so that it would appear n the message when posted?
I Know its a big ask so i thank you in advance.


Uraken, just send me an e-mail, and I will send you example files.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 16 October 2003 :  17:30:27  Show Profile
marcelgoertz, did you get my mail?
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 16 October 2003 :  18:18:35  Show Profile  Visit MarcelG's Homepage
nope...nothing yet.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 20 October 2003 :  04:35:22  Show Profile
my email to you bounced back, however i have managed with help to get it working now so thanks alot mate.
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07