TinyPortal

Development => Resources => Topic started by: kai920 on May 18, 2008, 04:14:02 PM

Title: double lines (or more) in files
Post by: kai920 on May 18, 2008, 04:14:02 PM
I've got a weird problem that's been bugging me for a while and I can't track down the source of the problem.

I just downloaded a Dilber CSS file (style.css) for edit, when I opened it, there is one or even two extra lines between each line that has content on it!  :tickedoff:

So the CSS I am looking at inside my text editor looks like this


{


margin: 0px;


font-size: 80%;


font-weight:bold;


text-transform: uppercase;


}





.menubg2 , tr.menubg2 td


{


margin: 0px;


font-size: 80%;


font-weight:bold;


text-transform: uppercase;


}


This is very annoying b/c for one, the line numbers don't match up to what Firebug says it is.. and two, having all those extra spaces is just not helpful!

Like I said this appears to happen randomly with files. Any one seen this? I am using Filezilla and e as my text editor.
Title: Re: double lines (or more) in files
Post by: kai920 on May 19, 2008, 02:59:29 AM
Here is a screenshot. Note the line numbers...
Title: Re: double lines (or more) in files
Post by: Smoky on May 19, 2008, 03:10:54 AM
can you post the line above line#82?

as far as I can see, the style.css looks fine, but perhaps Crip could tell more about it..

also, what are you using to edit the files?? the best thing to use is notepad++ (if you google you can find it)  ;)
Title: Re: double lines (or more) in files
Post by: Xarcell on May 19, 2008, 03:11:23 AM
1.| You need to ask the theme designer about the issue.

2.| I moved the topic here from the news board in hope of you getting better support.

3.| I fail to understand your issue.

What is the problem, aside from the numbers not lining up. The numbers won't match up because firebug us telling you the line number from the markup page, meaning your source code, not your css file.

can you tell us what you are trying to fix on your theme, or what the problem is?




Title: Re: double lines (or more) in files
Post by: kai920 on May 19, 2008, 03:58:39 AM
Quote from: Smoky on May 19, 2008, 03:10:54 AM
also, what are you using to edit the files?? the best thing to use is notepad++ (if you google you can find it)  ;)

I'm using e... www.e-texteditor.com. Is it a problem with this program? Because I opened the same file in both Crimson Editor and e... and only e has automagically inserted the extra lines.

Quote from: Xarcell on May 19, 2008, 03:11:23 AM
What is the problem, aside from the numbers not lining up. The numbers won't match up because firebug us telling you the line number from the markup page, meaning your source code, not your css file.

Firebug tells you exactly which line the CSS declaration is coming from, so for example: it says (style.css) line 13 but if I open the CSS file, the extra lines inserted mean it's not on line 13.  The screenshot below will help you understand my "problem".

Look at .topbar, which is supposed to be line 13. But in e, it's on line 25.

It looks like I will have to check with the e developer(s) for a solution? No one else has seen this in any other text editors?
Title: Re: double lines (or more) in files
Post by: Xarcell on May 19, 2008, 04:13:14 AM
I see your point.

It may have something to do with your settings, possibly even your font in e?

Yes, you report this to the developers.
Title: Re: double lines (or more) in files
Post by: kai920 on May 19, 2008, 05:19:46 AM
Strange, I looked at Dilber's index.template.php and it shows extra lines in 5 different editors (DW, Notepad, Wordpad, Crimson, e)

I wonder if it has do with something else, maybe a PHP setting on my server?

The file was fine in the original zip archive (dilbermc.zip) but once installed on SMF, extra lines were inserted!  ???
Title: Re: double lines (or more) in files
Post by: Ianedres on May 19, 2008, 07:35:04 AM
I would guess that the e text editor is not importing the line feed / carriage returns properly, and would need to be set to not add either the extra LF and/or CR.

Added: And I see where a similar question was asked (referencing Joomla) in their tech support (phpBB) forum here (http://www.e-texteditor.com/forum/viewtopic.php?t=2549).
Title: Re: double lines (or more) in files
Post by: Zetan on May 19, 2008, 07:38:26 AM
window size.
open the editor full screen and not a small window when copy/pasting between editors.
Title: Re: double lines (or more) in files
Post by: kai920 on May 19, 2008, 07:59:53 AM
Quote from: Ianedres on May 19, 2008, 07:35:04 AM
I would guess that the e text editor is not importing the line feed / carriage returns properly, and would need to be set to not add either the extra LF and/or CR.

Added: And I see where a similar question was asked (referencing Joomla) in their tech support (phpBB) forum here (http://www.e-texteditor.com/forum/viewtopic.php?t=2549).

lol, that was me who created the thread.  ;) Although now it doesn't look like it's related to just that text editor...

Quote from: ZTN on May 19, 2008, 07:38:26 AM
window size.
open the editor full screen and not a small window when copy/pasting between editors.

There was no copy/pasting between editors involved.

The files appear to be changed during upload/installation by something...
Title: Re: double lines (or more) in files
Post by: Zetan on May 19, 2008, 09:01:52 AM
Looks very much like what happens with word wrapping and small windows open. Happens to me sometimes. I just switch the wrap on and off.
Title: Re: double lines (or more) in files
Post by: kai920 on May 19, 2008, 03:59:59 PM
Did you try taking a look a the php files I uploaded in my previous post (http://www.tinyportal.net/index.php?topic=24011.msg193818#msg193818)? Do they look different to you? One appears to have extra line spacing.
Title: Re: double lines (or more) in files
Post by: Zetan on May 19, 2008, 04:05:56 PM
I haven't looked at any file in an attachment.. I can't at work as downloads are blocked by the company firewall. Looking at the code posted does look very similar with what happens to me sometimes when I have notepad open and I copy from it into the edit fields in the Admin area, or cPanel..

I open the notepad window full screen, switch wrap off, then back on again and it seems to resolve the issue. Other than that, I really have no idea why it's doing that.