Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 4, 201410 yr Right now the code in the templates look like a jumbled mess. The code needs to be re organized with spaces, indents, etc.
March 4, 201410 yr 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.
March 4, 201410 yr Author 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.
March 4, 201410 yr 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.
March 4, 201410 yr Author 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.
March 4, 201410 yr 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. Actually, I think ipb's code is the more organised. Xen's code has too much white space.
March 4, 201410 yr Author Actually, I think ipb's code is the more organised. Xen's code has too much white space. Lets agree to disagree.
March 5, 201410 yr Lets agree to disagree. I think we'll have to :lol: Anyone else want to chime in on this?
March 5, 201410 yr Out of interest, how would you expect/like to see that code?For the love of all that is holy, spaces instead of tabs.
March 5, 201410 yr For the love of all that is holy, spaces instead of tabs. That's simply a matter of taste isn't it?
March 5, 201410 yr 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.
March 5, 201410 yr Out of interest, how would you expect/like to see that code? Do what ever you prefer dude, you'll never get majority accept it. For the love of all that is holy, spaces instead of tabs. Amateur :rofl: (w00t) P.S : Joking of course
March 5, 201410 yr 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.
March 5, 201410 yr Author 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>
March 5, 201410 yr I'll say it again, IPB's code is how it should be done, It's clean, tidy and professional and yes it's easy to read.
March 5, 201410 yr 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?
March 5, 201410 yr Where are you seeing that particular IP.Board code? Looking at the registerForm template I see this.. Am I missing something? It's tabbed and spaced like you're wanting to see, is it not? He's wanting it to be more like this.
March 5, 201410 yr 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.
March 5, 201410 yr 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:
March 5, 201410 yr 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.
March 5, 201410 yr 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.
March 5, 201410 yr Author Okay I do see that it looks organized. But is there anyway to get a horizontal scroll bar on the text area?
March 5, 201410 yr Okay I do see that it looks organized. But is there anyway to get a horizontal scroll bar on the text area? You know, you might find it easier to copy and paste the template code you want to work with in to a program like notepad++
Archived
This topic is now archived and is closed to further replies.