Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 11:22 am EST
Geeklog Forums
nl2br in Story Text
Status: offline
eyecravedvd
Forum User
Full Member
Registered: 06/09/03
Posts: 152
I use HTML formatting for GL. On my fullsite I'm still running 1.3.8-1sr4 and I had to make a change in lib-common.php on this line
from plaintext to html to get it to work.
Now, with 1.3.11 I can't get my formatting back. I'd have to go through each of my 1300 stories and add
tags.
I found this line and removed it, but it still keeps the formatting.
// contains HTML and do not call nl2br() which would only add
// unwanted <br> tags.
if( substr( $blockcontent, 0, 1 ) != '<' )
{
$blockcontent = nl2br( $blockcontent );
}
The example can be found here...
Working Version
Wrong Formatting
Any ideas?
Shane | www.EyeCraveDVD.com
Text Formatted Code
if( $A['postmode'] == 'html' )from plaintext to html to get it to work.
Now, with 1.3.11 I can't get my formatting back. I'd have to go through each of my 1300 stories and add
tags.
I found this line and removed it, but it still keeps the formatting.
Text Formatted Code
// Hack: If the block content starts with a '<' assume it// contains HTML and do not call nl2br() which would only add
// unwanted <br> tags.
if( substr( $blockcontent, 0, 1 ) != '<' )
{
$blockcontent = nl2br( $blockcontent );
}
The example can be found here...
Working Version
Wrong Formatting
Any ideas?
Shane | www.EyeCraveDVD.com
15
10
Quote
Status: offline
eyecravedvd
Forum User
Full Member
Registered: 06/09/03
Posts: 152
Rule #1. Never code at night... sheesh. The second code is for blocks.
Where is the article formatting (not the templates)? I can't seem to find it in lib-common.php.
Shane | www.EyeCraveDVD.com
Where is the article formatting (not the templates)? I can't seem to find it in lib-common.php.
Shane | www.EyeCraveDVD.com
10
12
Quote
Status: offline
eyecravedvd
Forum User
Full Member
Registered: 06/09/03
Posts: 152
I found it. It's in lib-story.php. Everything's OK now.
Shane | www.EyeCraveDVD.com
Shane | www.EyeCraveDVD.com
9
11
Quote
All times are EST. The time is now 11:22 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content