Jump to content

Templates need reorganizing


Matt C.

Recommended Posts

The templates do have proper indentation. When in the ACP, assuming you're looking at the demo, you're looking at the contents of the file in an itty bitty window.

Expand that window to full screen, green + icon next to the template name, and it will have proper indentations / space / etc.

Link to comment
Share on other sites

The templates do have proper indentation. When in the ACP, assuming you're looking at the demo, you're looking at the contents of the file in an itty bitty window.

Expand that window to full screen, green + icon next to the template name, and it will have proper indentations / space / etc.

Okay it does have some indention but still the code looks like a jumbled mess. I don't see any spaces.

74sf.png

Link to comment
Share on other sites

I was always told that too much white space us a poor way to code, Xen's code looks sloppy and all over the place.

LOL. How is it sloppy? Its organized and easy to read. IPB's code is all over the place. I cant figure out whats what.

Link to comment
Share on other sites

That's simply a matter of taste isn't it?


Yes (note - you did ask for "what would you like to see") and no. Tabs can be variable length across different machines. You have one developer who makes changes with one length, and then another developer who has a different length looks at the code - it looks awful. I guess "awful" is still technically subjective here... but it does make it a lot harder to read.
Link to comment
Share on other sites

Yes (note - you did ask for "what would you like to see") and no. Tabs can be variable length across different machines. You have one developer who makes changes with one length, and then another developer who has a different length looks at the code - it looks awful. I guess "awful" is still technically subjective here... but it does make it a lot harder to read.

I disagree. IMO tabs are the preferred choice when you have multiple developers working on a product because 99% of code editors allow the individual user to configure how many spaces a tab represents. Thus, I can set my editor to show tabbed content as 4 spaces and you can set yours to show them as 5 or whatever you prefer.

Link to comment
Share on other sites

Out of interest, how would you expect/like to see that code?

With spaces and tabs. Like this.

<script type="javascript" src="url.com" />

<div id="form">
    <input>
    <input>
</div>

Just an example

In IPB it would be like this

<script type="javascript" src="url.com" />
<div id="form">
<input>
<input>
</div>
Link to comment
Share on other sites

Where are you seeing that particular IP.Board code?

Looking at the registerForm template I see this..

<div id='register_form'>
	<form action="... method="post" name="REG" id='register'>
		<input type="hidden" .../>
		<input type="hidden" .../>
		<input type="hidden" .../>
		<input type="hidden" .../>
		<input type='hidden' .../>
		<input type='hidden' .../>
		<input type='hidden' .../>

Am I missing something? It's tabbed and spaced like you're wanting to see, is it not?

Link to comment
Share on other sites

All that's there are extra line breaks that serve no function other than to spread out the code and make it longer than necessary...

If you're wanting extra line breaks, externally edit the templates in your favorite editor and set your line-height to 2x... Same as Brandon's mention of TAB's, I personally like 2 spaces but I know others that like 10... That's all personal preference and something a good IDE can do for you.

Link to comment
Share on other sites

All that's there are extra line breaks that serve no function other than to spread out the code and make it longer than necessary...

If you're wanting extra line breaks, externally edit the templates in your favorite editor and set your line-height to 2x... Same as Brandon's mention of TAB's, I personally like 2 spaces but I know others that like 10... That's all personal preference and something a good IDE can do for you.


Yup, personally, I can't stand all that extra spacing and line breaks, we'd have to fire Matt if he ever implemented something like that. :lol:
Link to comment
Share on other sites

I'll weigh in and vote for tabs instead of spaces, and against too many line breaks.In addition to what others have said, there's also the matter of it being served to people's browsers. Less is more.

With GZip that difference is negligible, however.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...