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 10-10-2008, 09:49 AM
mooreaa mooreaa is offline
 
Join Date: Aug 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default newlines added between html code

Hello,

I enabled html code on my forum posts, and I added some code to post and noticed that it added line breaks on each line.

Is there a way I can prevent this or remove the line breaks from happenning?
Reply With Quote
  #2  
Old 10-10-2008, 10:07 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you post an example?
Reply With Quote
  #3  
Old 10-10-2008, 03:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have html enabled in my Staff forums and I have noticed that everytime I go back to edit it, there are extra page breaks in the code. I don't know that you can do anything about it. I simple keep a copy of it in a text file, edit it there, and when I go to edit it in the Staff thread, I copy/paste it from my text file so it doesn't have all those extra spaces.
Reply With Quote
  #4  
Old 10-12-2008, 05:11 AM
mooreaa mooreaa is offline
 
Join Date: Aug 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is an example post that I posted to my forums

Code:
if I post a html table

<table>
<tr>
<td>hello</td>
<td>world</td>
</tr>
<tr>
<td>line </td>
<td>2</td>
</tr>
</table>
Then the resulting output code it generates is this:

Code:
if I post a html table<br />

<br />
<table><br />
<tr><br />
<td>hello</td><br />
<td>world</td><br />
</tr><br />
<tr><br />
<td>line </td><br />
<td>2</td><br />
</tr><br />
</table><br />
<br />
Look at all the <br> tags on EACH line! I am using my forums to post articles and such some of which have forms so this really messes up the formatting.

The only way to fix this is to put all the code on a single line, but that makes it really hard/messy to edit... I'm not sure if there is a clean or easy way around this issue.

I am thinking I would like to just disable the auto newlines for now... but only on select forums...
Reply With Quote
  #5  
Old 10-13-2008, 08:22 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the same happen when you post here on vB.org?
Reply With Quote
  #6  
Old 10-13-2008, 08:32 AM
mooreaa mooreaa is offline
 
Join Date: Aug 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

html is not enabled here so I wouldn't know.
Reply With Quote
  #7  
Old 10-13-2008, 08:41 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes.. this is an old issue with HTML enabled in posts. Whenever you create a HTML table, it leaves lot of empty lines above as <br>'s are inserted.

A workaround with this problem, read Create a table within a post. Read the #4th post onwards there.

Thanks

P.S.: @Marco sir, I am not advertising. Its a solution for his problem.
Reply With Quote
  #8  
Old 10-13-2008, 09:12 AM
mooreaa mooreaa is offline
 
Join Date: Aug 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my issue is not only with tables. Your solution to "switch" editor modes doesn't solve the underlying problem that unwanted <br/> are being inserted. I am looking for a way to track down where/why these are being inserted as I am using my forum to post articles and I will not be the only one trying to add html code.

Somewhere in the vbulletin's bb code parsing or postbit creation, these newlines are being added... where these are being added are not quite clear.
Reply With Quote
  #9  
Old 10-13-2008, 09:16 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Enabling HTML to be posted is a huge security risk, and i strongly suggest you do not enable it.
Reply With Quote
  #10  
Old 10-13-2008, 09:17 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well I told you its just a workaround..

This problem IS an an old issue as I stated. Me too looking for a permanent solution for this.

Thanks
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 07:44 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.06093 seconds
  • Memory Usage 2,251KB
  • 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
  • (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