Right now, those hard returns are moved and all the data is put on the same line so things like address and such are in one long sentence rather than on each seperate line by themselves.
I do not want to allow HTML as I've found that some people like to screw things up with it.
GoleyC
------------------
In your display template, find the following chunk of code:
code:<!-- EVENT VIEW --><% } elsif ($VIEW eq "Event") { %> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0"> <% foreach (@$fields) { next unless ($db->{'properties'}->{$_}->{'display_details'}); %> <TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR> <% } %> </TABLE>
<!-- EVENT VIEW --><% } elsif ($VIEW eq "Event") { %> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0"> <% foreach (@$fields) { next unless ($db->{'properties'}->{$_}->{'display_details'}); %> <TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR> <% } %> </TABLE>
and change it like this (insert the 7th line below)
code:<!-- EVENT VIEW --><% } elsif ($VIEW eq "Event") { %> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0"> <% foreach (@$fields) { next unless ($db->{'properties'}->{$_}->{'display_details'}); $EVENT->{details}->{$_} =~ s/\r?\n?/<BR>/g; %> <TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR> <% } %> </TABLE>
<!-- EVENT VIEW --><% } elsif ($VIEW eq "Event") { %> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0"> <% foreach (@$fields) { next unless ($db->{'properties'}->{$_}->{'display_details'}); $EVENT->{details}->{$_} =~ s/\r?\n?/<BR>/g; %> <TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR> <% } %> </TABLE>
Try it out and see if that works
------------------ScottCalendarScript.com
You gave me a good starting point to work from. Your code didn't exactly work the first time out. Each character in the text had a break line. This made the text run
down
the
side like this.
So I played with the code and found that removing the "?" from the following: s/\r\n/<BR>/g; did the trick.
Below is the correct code now.
<!-- EVENT VIEW --><% } elsif ($VIEW eq "Event") { %> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0"> <% foreach (@$fields) { next unless ($db->{'properties'}->{$_}->{'display_details'}); $EVENT->{details}->{$_} =~ s/\r\n/<BR>/g; %> <TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>: </B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR> <% } %> </TABLE>
Thanks a bunch!!!
Thanks.
Old events will have to be edited to correct the issue of all the text string being placed on one line and not broken down by paragraphs or sentences.
code:$EVENT->{'details'}->{'description'} =~ s/\r\n/<BR>/g;
$EVENT->{'details'}->{'description'} =~ s/\r\n/<BR>/g;
PS: This is the correct code for the default.html template.
------------------Stephanie MeemkenWebmaster, Minnesota Jaycees http://www.mnjaycees.org/
[This message has been edited by kayleigh (edited March 28, 2002).]
"1st line of description"(31 blank lines)"2nd line of description"
In the .txt files these are showing up as a box with a "/n" after it.
Matt, do you know how this is happening and how I can fix it?
Thanks,Jon
[This message has been edited by AWSguy (edited March 29, 2002).]
Maybe you have something out of place and or the code got screwed up in the process of changing it.
One other things to think about, have you did any other modifications to the default.html calendar code?
-Jon
When your editing the event, make sure that there's no HTML break tag showing up. For example, if you see < br > without the spaces between the greater than and less than signs, you shouldn't get any extra returns when you save your edited event.
or some other line of code to edit my list and day view with line breaks where returns were inserted?
if someone could include a chunk of code to replace, and the new chunk to replace it with, it would be very helpful.
thanks!
vonachen@wanadoo.fr