PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 Macintosh users, watch out for CR vs. LF 
Description: make sure to use UNIX or Windows/DOS line endings not Mac
Author: Scott Lawton
Date: Thu Oct 07, 2004 10:24 pm
Type: Fix
Keywords: Macintosh, style, new style, create, subSilver
Category: Styles
The following applies when creating or modifying template files for a custom style (e.g. per http://www.phpbb.com/kb/article.php?article_id=197) -- and perhaps for other editing tasks.

By default, Macintosh OS 9 (and below) put a CR (carriage return or just "return") at the end of each line. Windows/DOS puts BOTH a CR and LF (linefeed ). UNIX just puts a LF (often called "newline").

If you upload a .tpl file with just CR, it may not show up at all! (In my case, only overall_footer.tpl showed up; not sure why.)

Some Macintosh utilities (text editors and ftp clients) may automatically translate LF into CR, e.g. when downloading the subSilver style as a starting point for creating your own. If so, you have to translate them back.

One simple way: BBEdit. Open all the text files and run the following AppleScript (just paste it into Script Editor and click Run):

tell application "BBEdit 6.0"
repeat while exists document 1
tell document 1
set line breaks to Unix
save
close
end tell
end repeat
end tell

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.