Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2007, 12:39 PM
fabianv fabianv is offline
 
Join Date: Nov 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Having accessible source code formatting in Vbulletin

Hi guys,

I thought this might spark an interesting discussion since it has been plaguing me for quite a while now.

Some might argue it is not important to have accessible source code as viewers only care about the the visual output of code but to some of us clean code formatting is essential.

After doing a couple of template modifications on my vbulletin style I noticed that the web generated modifications actually caused the formatting to get lost.

Whenever I go to "View Source" in my browser the code is shown without formatting/breaks/tab spacing.. everything is just one big inline soup mess that breaks occasionally when it hits content (ie.not tags) then continues doing the same thing.

Since vbulletin templates are database driven and can only be modified from the backend it makes formatting the code even harder.

Any thoughts on this, anyone?
Reply With Quote
  #2  
Old 06-28-2007, 07:02 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The formatting is fine at stock vBulletin, but modifications start messing it up.
Reply With Quote
  #3  
Old 06-28-2007, 09:11 AM
fabianv fabianv is offline
 
Join Date: Nov 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
The formatting is fine at stock vBulletin, but modifications start messing it up.

Well keep in mind I dont have any mods installed apart from VBSEO. Where have you heard of a forum without template modifications? Whether it is adding <h1></h2> tags to titles or removing those god awful tables.

Its impossible really to go without modifying a standard release and expect to be taken seriously..

Is there perhaps any substantial information regarding template formatting that you can perhaps add apart from what I have already said?
Reply With Quote
  #4  
Old 06-28-2007, 11:33 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've modified the templates on my site quite a bit to get it how I want and the source looks fine.
Reply With Quote
  #5  
Old 06-28-2007, 01:36 PM
fabianv fabianv is offline
 
Join Date: Nov 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
I've modified the templates on my site quite a bit to get it how I want and the source looks fine.

Interesting.. I wonder if it might have anything to do with saving my index.php or globals.php from notepad or something. Could maybe cause formatting issues?

anyone?
Reply With Quote
  #6  
Old 06-29-2007, 01:39 AM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I find it hard to understand what it is that you are looking for.

Can you provide a screenshot as to what your problem is?
Reply With Quote
  #7  
Old 06-29-2007, 02:38 AM
ssslippy ssslippy is offline
 
Join Date: Jan 2006
Posts: 877
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Vbseo probally removes all spacing etc to reduce page size.
Reply With Quote
  #8  
Old 06-29-2007, 06:21 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well there's probably your problem.
Reply With Quote
  #9  
Old 06-29-2007, 07:53 AM
fabianv fabianv is offline
 
Join Date: Nov 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Princeton View Post
I find it hard to understand what it is that you are looking for.

Can you provide a screenshot as to what your problem is?
Hi there Princeton, I dont have a screenshot with me at the moment but I can illustrate it for you


It spews out like this
Code:
<div id="maincontainer">  <div id="header">  <div id="logo">
text
</div></div></div>
instead of this


Code:
        
        <div id="maincontainer">
        <div id="header">
        <div id="logo">
                             text
        </div>
        </div>
        </div>


Quote:
Originally Posted by ssslippy View Post
Vbseo probally removes all spacing etc to reduce page size.
I'm not so sure whether spacing reduces page size or whether VBSEO is responsible for this BUT I will send in a ticket asking them this question.


Quote:
Originally Posted by Dismounted View Post
Well there's probably your problem.
Lets hope and see, will report back when I find a solution.



Floris on vbulletin.com says

"
I use textmate to write my templates, mysql, php, etc. and when i use tabs and spaces, and copy it all to vb code, and eventually gets rendered, it shows just fine. Not sure what else to say about this. I sense this is just how the browser renders it."

My responses to that is that its definetely not how the browser renders the source code as it looks the same on multiple browsers.


Hope I figure out whats going on
Reply With Quote
  #10  
Old 06-29-2007, 09:36 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin changes the properties around in the tags, so they're in a different order. It's what happens to me anyway.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04546 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete