 |

ioko
New User
Aug 11, 2005, 7:01 AM
Post #1 of 7
(2508 views)
Shortcut
|
|
Line break characters?
|
Can't Post
|
|
Hi I am trying to automatically submit a number of articles through the article submission form, using Perl, i.e. simulating an actual user submitting an article through the form. However, I am having trouble with line breaks/end of lines. In the Perl script, if I set all the end of lines in the article to '\n' or '\r\n' or '\r', and use the resulting article as the value for the article text field, the paragraphs aren't recognized, and the whole article ends up as one solid paragraph. I've tried changing it to using an HTML line break, like '<BR>', but that just results in the HTML tag showing in the published article on the web page, rather than resulting in a proper line break in the article (i.e. within the HTML source instead). Any ideas? Thanks.
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 11, 2005, 10:56 AM
Post #2 of 7
(2506 views)
Shortcut
|
|
Re: [ioko] Line break characters?
[In reply to]
|
Can't Post
|
|
Hi ioko. Thanks for posting an welcome to the board! Article Manager’s data files use ¿0a as the line break character. Could you give that a shot and let me know if it helps? I would be really interested in checking out your script once it’s ready too, so keep me up to date . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

ioko
New User
Aug 12, 2005, 12:51 PM
Post #3 of 7
(2499 views)
Shortcut
|
|
Re: [ross] Line break characters?
[In reply to]
|
Can't Post
|
|
Many thanks for the tip, Ross. So somewhere within the coding for ArticleManager on the client side, when a visitor submits an article, all line breaks etc. are converted to ¿0a (still on the client side) before the data is posted to the server? Or does the code on the server side look for another character (or character grouping) which it then converts to ¿0a before storing in the database. Thanks, Steve
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 14, 2005, 8:51 AM
Post #4 of 7
(2477 views)
Shortcut
|
|
Re: [ioko] Line break characters?
[In reply to]
|
Can't Post
|
|
Hi Steve. Good to hear from you again . I’ll actually have to double check with the developers on this one for you. They’ll be back in tomorrow. Just wanted to give you a quick update though . I am going to assume that a user submits their article and Article Manager uses a Perl method to convert the string server side. I’ll be in touch as soon as I know more. Keep me up to date on your progress . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 14, 2005, 1:46 PM
Post #5 of 7
(2473 views)
Shortcut
|
|
Re: [ioko] Line break characters?
[In reply to]
|
Can't Post
|
|
Hi ioko. Theo actually just popped in to say hello today so I was able to run your question by him. Here’s what happens with the line breaks: When you save an article to the data file, Article Manager will take the your content and convert all line breaks to proprietary line breaks we use and store everything in the data file. When the articles are being published (or displayed though the dynamic viewer) Article Manager will replace all the proprietary line breaks with regular line breaks. So basically, Article Manager takes care of translating regular line breaks into proprietary line breaks and then back again. Does that help? Let me know what you think . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

ioko
New User
Aug 16, 2005, 9:05 AM
Post #6 of 7
(2451 views)
Shortcut
|
|
Re: [ross] Line break characters?
[In reply to]
|
Can't Post
|
|
Hi Ross Many thanks for your continuing help with this. It's actually on the client side that I need more help with - I've tried submitting directly to the server side script (i.e. the 'action' URL of the article submission form) using standard line break characters like '\n', '\r\n', etc., but directly submitting this to the server does not work, the paragraphs are not recognized. If I could just establish what character the server side script is looking for in terms of line breaks or paragraphs in the article submitted from the client, before it stores the article to the db, I think I'd be okay. For example, *before* an article is sent to the server, what characters are used to distinguish line breaks/paragraphs? Something like the following: "This is the first paragraph in the article.%r$And this is a new line." Where '%r$' is used to mark the new line. Normally it's something simpler like '\n', but can't get this to work. I hope this clarifies what I'm looking for? Many thanks Steve
|
|
|  |
 |

ross
Staff
/ Moderator

Aug 17, 2005, 8:50 AM
Post #7 of 7
(2440 views)
Shortcut
|
|
Re: [ioko] Line break characters?
[In reply to]
|
Can't Post
|
|
Hi Steve. Thanks for posting! When you are actually using the Article Manager interface to enter your article’s content, you are just using a regular text box or textarea so if you use the same ones, your script shouldn’t have any trouble recognizing them. The only thing right now is that I am not 100% what line break character the text boxes are using. If you are using the Article Manager WYSIWYG editor to enter text, every time you hit enter, a <br> tag is placed in the content. But I think there will also be a hidden line break in there as well. Can anyone jump in here and lend us a hand? I think all that Steve needs now is to find out what characters are used as the line break in a regular text area. Look forward to your replies . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 | |  |
|