Previous Thread
Next Thread
Print Thread
Hop To
#258281 04/08/2016 12:35 AM
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
The following code when placed within code tags looks properly when viewed in PREVIEW but once the actual post is made it then interprets the code and creates a button instead of keeping the actual code as pure text in the CODE TAG box on older versions of UBB. But the current version here seems to "almost" treat it correctly.

It is still word wrapping the code box instead of creating a scrolling bar. Is this a user option to disable or how can I prevent the word wrapping?

Code
Function SelectFile( )
  Dim $objSHELLexec, $CMD, $objSHELL
  $SelectFile=""
  $CMD='mshta.exe "about:<input type=file id=FILE><script>FILE.click();new ActiveXObject("Scripting.FileSystemObject").GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>" '
  $objSHELL=CreateObject("WScript.Shell")
  $objSHELLexec=$objSHELL.Exec($CMD)
  $SelectFile=$objSHELLexec.StdOut.ReadLine( )
EndFunction

Last edited by ntdoc; 04/08/2016 12:36 AM.
#258282 04/08/2016 12:49 AM
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Is it possible to disable word wrap in the CODE tag without editing CSS or other forum software files? I've looked around at a few different posts but did not find what I was looking for.

In a sample post here
https://www.ubbcentral.com/forums/ubbthreads.php/topics/258281/code-tag-parsing-ubb#Post258281

The code should not wrap. The line that starts like this
$CMD='mshta.exe
is at column 197 and should force a scroll bar in the code box not wrap. It seems others either want/like it to wrap but for code I want it 100% exactly as it is in the actual text editor it came from.

Thanks for updates on if this is possible and how.

Cheers

Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
In UBB.threads 7.5.x series, the CSS white-space value for "pre" is undeclared. And thus, it was treated as "pre{white-space:normal;}". Its default value.

Here on UBBCentral while running the current UBB.threads 7.6.0 Preview, the /styles/common.css file had been completely rewritten from the ground up. The "pre" value was updated/changed, though there was nothing wrong with it in the first place.

You've found a bug -- thank you!
The change has been reverted.

---

The value that was added to 7.6.0 Preview was:
pre{margin:0;white-space:pre-wrap;}

It has now been reverted back to just:
pre{margin:0;}

Again, thank you catching this and pointing it out.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Awesome. Thank you and glad I was able to help you help me :-)

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Thank you


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Gizmo, Nightcrawler), 791 guests, and 189 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)