4 Replies Latest reply on Jul 29, 2009 9:22 AM by greg2

    Formatting Code Postings in IE8

    bnettles

      I am using an older version of Jive Integrated.  It seems that users with IE8, when they drop color coded code samples into the forums, IE8 removes all of the linebreaks and places all of the code into one long string.  They all work fine in Firefox and older versions of IE.

       

      A sample of this code is given below.  I am using IE6 to do this post.  Should I look at the tinyMCE code to figure out how to resolve the issue?

       

       

      $input | ForEach-Object {
            $managedHost = $global:vmwareManagedHosts[$_.Host]
           
      $vmh = Get-VMHost $_.VMhost -server $managedHost.Connection | Get-View
           
      foreach ($Nic in $_.Nic){
                 
      $vmh.Config.Network.Pnic | where {$_.device -eq $Nic} | ForEach-Object {
                       
      $pNicDevId = $_.Pci
                       
      $PCIDevice = $vmh.Hardware.PciDevice | Where-Object {$_.id -eq $pNicDevId}
                       
      $Duplex = "Half"
                       
      if ($_.LinkSpeed.Duplex -eq $True){$Duplex = "Full"}
                       
      $LinkStatus = "Up"
                       
      if ($_.LinkSpeed -eq $null){
                             
      $LinkStatus = "Down"
                             
      $Duplex = $null
                        }

                       
      $LinkConfig = "Auto Negotiate"
                       
      if ($_.Spec.LinkSpeed -ne $null){
                             
      $SpecDuplex = "Half"
                             
      if ($_.Spec.LinkSpeed.Duplex -eq $True){$SpecDuplex = "Full"}
                             
      $LinkConfig = "$($_.Spec.LinkSpeed.SpeedMb, $SpecDuplex)"
                        }

                       
      $pNic = New-Object PSObject
                       
      $pNic.PSObject.TypeNames.Clear()
                       
      $pNic.PSObject.TypeNames.Add("VMware.AdvVirtualDisk")
                       
      $pNic `
                              |
      Add-Member -MemberType NoteProperty -Name Device -Value $_.Device -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name VMHost -Value $vmh.Name -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name LinkStatus -Value $LinkStatus -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name LinkConfig -Value $LinkConfig -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name LinkSpeed -Value $_.LinkSpeed.SpeedMb - PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name Duplex -Value $Duplex -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name MACAddress -Value $_.Mac -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name NICVendor -Value $PCIDevice.VendorName -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name NICModel -Value $PCIDevice.DeviceName -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name NICDriver -Value $_.Driver -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name PCI -Value $_.Pci -PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name PCIBus -Value $PCIDevice.Bus -PassThru `
                              |
      Add-Member -MemberType teProperty -Name PCISlot -Value $PCIDevice.Slot -PassThru`
                              |
      Add-Member -MemberType NoteProperty -Name WakeOnLan -Value $_.WakeOnLanSupported - PassThru `
                              |
      Add-Member -MemberType NoteProperty -Name Key -Value $_.Key -PassThru `

                              | Add-Member -MemberType NoteProperty -Name Host -Value $managedHost.Name -PassThru
                  }

            }

      }

        • Re: Formatting Code Postings in IE8

          Hi Brian,

           

          I'm sorry to hear about the problem with IE8 and Integrated Server. While we no longer support Integrated Server, I have a couple of ideas for you. You're on the right track in looking at tinyMCE to see if the problem is in it. Another place to look is at what is being sent over the wire between IE8 and IE7 using a tool like this: http://www.httpwatch.com/, which looks like it works with IE8. I have not used the tool before, but it looks like it works with IE8. In this way you can see how the transmission differs between the two browsers and confidently isolate the problem to either the browser or the server.

           

          Good luck!

          Greg

            • Re: Formatting Code Postings in IE8
              bnettles

              I still have not resolved this.  But I would like to post the code right here using IE8 to see if the problem exists here.

               

              $input | ForEach-Object {

                    $managedHost = $global:vmwareManagedHosts[$_.Host]

                    $vmh = Get-VMHost $_.VMhost -server $managedHost.Connection | Get-View

                    foreach ($Nic in $_.Nic){

                          $vmh.Config.Network.Pnic | where {$_.device -eq $Nic} | ForEach-Object {

                                $pNicDevId = $_.Pci

                                $PCIDevice = $vmh.Hardware.PciDevice | Where-Object {$_.id -eq $pNicDevId}

                                $Duplex = "Half"

                                if ($_.LinkSpeed.Duplex -eq $True){$Duplex = "Full"}

                                $LinkStatus = "Up"

                                if ($_.LinkSpeed -eq $null){

                                      $LinkStatus = "Down"

                                      $Duplex = $null

                                }

                                $LinkConfig = "Auto Negotiate"

                                if ($_.Spec.LinkSpeed -ne $null){

                                      $SpecDuplex = "Half"

                                      if ($_.Spec.LinkSpeed.Duplex -eq $True){$SpecDuplex = "Full"}

                                      $LinkConfig = "$($_.Spec.LinkSpeed.SpeedMb, $SpecDuplex)"

                                }

                                $pNic = New-Object PSObject

                                $pNic.PSObject.TypeNames.Clear()

                                $pNic.PSObject.TypeNames.Add("VMware.AdvVirtualDisk")

                                $pNic `

                                      | Add-Member -MemberType NoteProperty -Name Device -Value $_.Device -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name VMHost -Value $vmh.Name -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name LinkStatus -Value $LinkStatus -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name LinkConfig -Value $LinkConfig -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name LinkSpeed -Value $_.LinkSpeed.SpeedMb -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name Duplex -Value $Duplex -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name MACAddress -Value $_.Mac -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name NICVendor -Value $PCIDevice.VendorName -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name NICModel -Value $PCIDevice.DeviceName -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name NICDriver -Value $_.Driver -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name PCI -Value $_.Pci -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name PCIBus -Value $PCIDevice.Bus -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name PCISlot -Value $PCIDevice.Slot -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name WakeOnLan -Value $_.WakeOnLanSupported -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name Key -Value $_.Key -PassThru `

                                      | Add-Member -MemberType NoteProperty -Name Host -Value $managedHost.Name -PassThru

                          }

                    }

              }

               

              • Re: Formatting Code Postings in IE8
                bnettles
                Would you presume that the tinyMCE used with this version of Jive would work with JiveIntegrated?  Is it worth attempting?
                  • Re: Formatting Code Postings in IE8

                    Hi Brian,

                     

                    It is tough to say how much effort it would take to have a newer version of TinyMCE work with Integrated Server. I'm sure it is possible, but we put a lot of work into getting the editor integrated into either Jive SBS or IntegratedServer, so I'm guessing it will be non trivial.

                     

                    Good luck,

                    Greg