vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   pre tag in bbcode (https://vborg.vbsupport.ru/showthread.php?t=83268)

VBCoder 06-17-2005 05:48 AM

pre tag in bbcode
 
Is there any way for a user to use an equivalent to <pre> when putting in a message (eg via bbcode)?

If not, how can a user space out things when they type their message?

If there is no way, how would you create a mod to handle this?

Andreas 06-17-2005 06:39 AM

ACP / Custom BB Codes / Add New BBCode
Title: PRE Tag
Replacement: <pre>{param}</pre>
Example:
Code:

[pre]This    has    a  lot  spaces[/pre]
Description: This Code allows you to use preformatted Text
Use {option}: No

VBCoder 06-17-2005 01:47 PM

Thanks, Kirbs! Knew I could count on you.

One bug, though: If the user puts a newline within the [pre] tag, it will get converted into 2 newlines on display! vB turns newlines into newline<br />, and, since it is in pre mode, the browser shows the newline as well.

Andreas 06-18-2005 01:35 AM

1 Attachment(s)
Not sure if it does work 100%, but you can try out the attached Plugin.
File functions_bbcodepre.php must be uploaded to directory includes.

VBCoder 06-19-2005 05:11 AM

Excellent! Thanks, Kirbs - I'm trying to figure out the code. Could you explain briefly how it works?

mtha 09-21-2005 04:43 AM

Quote:

Originally Posted by KirbyDE
Not sure if it does work 100%, but you can try out the attached Plugin.
File functions_bbcodepre.php must be uploaded to directory includes.

Very nice Kirby.

1. Could you release this as a plugin?
2. while editting, if i switch Editor Mode back/forth many times, any break in the content get remove.

Hellmaster 01-30-2010 07:31 AM

Did somebody fix this issue?? I tried to use PRE tag, but stills showing a new blank line... like he said https://vborg.vbsupport.ru/showpost....13&postcount=3

I'm using 3.8.4


All times are GMT. The time now is 12:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01163 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete