FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » line-breaks dissapear after image upload/preview/edit
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
line-breaks dissapear after image upload/preview/edit [message #23162] Mon, 07 March 2005 12:30 Go to next message
!alex is currently offline  !alex   Germany
Messages: 23
Registered: February 2004
Location: germany
Karma: 0
Junior Member
Hello,

i have a serious problem with linebreaks in the edit-textarea:

In the following cases all the linebreaks dissapear and make a lot of work to bring the message in the right format again:

1.) image/file-upload while editing a message
2.) preview a message
3.) edit a message

I think it`s only a small bug to fix, if it`s necessary to hack the sourcecode a little it would also be not a big issue.

Thanks for your efforts,
Alex

P.S.: As i see in this forum the problem doesn't exist
Re: line-breaks dissapear after image upload/preview/edit [message #23165 is a reply to message #23162] Mon, 07 March 2005 15:20 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Can't replicate the problem on this or my development forum, try using a later version of the forum? If you already are perhaps you can give me access to the forum so that I can see the problem for myself and review your forum settings.

FUDforum Core Developer
Re: line-breaks dissapear after image upload/preview/edit [message #23176 is a reply to message #23162] Mon, 07 March 2005 23:50 Go to previous messageGo to next message
!alex is currently offline  !alex   Germany
Messages: 23
Registered: February 2004
Location: germany
Karma: 0
Junior Member
Hello Ilia,

thanks for the prompt reply.

I also wonder why this happens, i recently updated to 2.6.9 but had the problem earlier.

I sent you a PM with the admin-account to the forum, if you want you can have a look at.

Thanks,

Alex
Re: line-breaks dissapear after image upload/preview/edit [message #23177 is a reply to message #23176] Mon, 07 March 2005 23:56 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Unusual... I'll take a once I get the authentication information.

FUDforum Core Developer
Re: line-breaks dissapear after image upload/preview/edit [message #23198 is a reply to message #23177] Tue, 08 March 2005 21:54 Go to previous messageGo to next message
!alex is currently offline  !alex   Germany
Messages: 23
Registered: February 2004
Location: germany
Karma: 0
Junior Member
Hello,

i fixed the Problem by this 'dirty' hack:

replaced {VAR: msg_body}
by: <?= html_to_tags($msg->body); ?>

in post.tmpl

Now at least the line-breaks behave like expected.

I wonder what function to use to replace smileys from
[img=images/smiley_icons/icon_smile.gif]Smile[/img]

back to
: - )

in the Textarea ?

Maybe there is also another VAR: to use than msg_body or someone could tell me the right place at post.inc.t to apply those changes ?


Thanks,
Alex

Re: line-breaks dissapear after image upload/preview/edit [message #23201 is a reply to message #23162] Tue, 08 March 2005 22:59 Go to previous messageGo to next message
!alex is currently offline  !alex   Germany
Messages: 23
Registered: February 2004
Location: germany
Karma: 0
Junior Member
Sorry,

it turned-out as a stupid home-made problem by my template-engine around, not the forum.

Had a str_replace ('\n\n\','',$sOut) before the output was sent that i totally forgott Rolling Eyes

For sure the behaviour was more than Unusual then.

Thanks for the great Forum anyway,
Alex

[Updated on: Tue, 08 March 2005 22:59]

Report message to a moderator

Re: line-breaks dissapear after image upload/preview/edit [message #23202 is a reply to message #23198] Tue, 08 March 2005 23:13 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Smiley code can be found inside the smiley.inc.t script, which implements smiley_to_post() and post_to_smiley() functions.

As far as the body hack it seem "wrong"...


FUDforum Core Developer
Re: line-breaks dissapear after image upload/preview/edit [message #23214 is a reply to message #23162] Wed, 09 March 2005 01:37 Go to previous messageGo to next message
!alex is currently offline  !alex   Germany
Messages: 23
Registered: February 2004
Location: germany
Karma: 0
Junior Member
Hello Ilia,

thanks for the reply, the codehack was not the best idea but worked on first view.
But having the whole message in the textarea when placing a reply was little too much so i continued to locate the 'real' bug.

Found it in my own output-method of the small cms around the forum that had a line to kill double line-breaks for cleaner markup.

Finally i added a parameter to control this line and set the switch in footer.tmpl to false -> everything works fine !

Thanks again for your advice,
Alex

P.S.: I would appreciate an option to use URL sessions without causing G. & Co. to spider url`s containing the session-id. For me it would be ok to cloak them away on the user-agent. I`m pretty sure on such a minor issues nobody will get a penalty on the ranking.
Re: line-breaks dissapear after image upload/preview/edit [message #23215 is a reply to message #23214] Wed, 09 March 2005 01:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can add the search hack inside users.inc.t by checking the user agent and disabling the referrer.

FUDforum Core Developer
Re: line-breaks dissapear after image upload/preview/edit [message #23216 is a reply to message #23162] Wed, 09 March 2005 02:02 Go to previous messageGo to next message
!alex is currently offline  !alex   Germany
Messages: 23
Registered: February 2004
Location: germany
Karma: 0
Junior Member
You mean I change:

if (isset($_SERVER['REMOTE_ADDR']) || !defined('forum_debug')) {
$GLOBALS['usr'] =& init_user();
}


to something like:

if ((isset($_SERVER['REMOTE_ADDR']) || !defined('forum_debug')) && !in_array($_SERVER['HTTP_USER_AGENT'],$aSpiders)) {
$GLOBALS['usr'] =& init_user();
}


and disable referrer check in the global settings works even if there is no user created by the forum then ?

Alex

[Updated on: Wed, 09 March 2005 02:03]

Report message to a moderator

Re: line-breaks dissapear after image upload/preview/edit [message #23217 is a reply to message #23216] Wed, 09 March 2005 02:15 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
no, you still want to have a "user" created, BUT inside init_user() you want to disable session URLs is the user-agent is a search engine.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Register?
Next Topic: eGroupware - Missing Fudforum Icon
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 05:59:20 GMT 2024

Total time taken to generate the page: 0.03195 seconds