SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist GeekSupport's Avatar
    Join Date
    May 2002
    Location
    Southern California
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    vB trimming php code when editing post

    is there a way to prevent vB from trashing all the whitespace when we edit our posts?

    this
    PHP Code:
    function myFunk ($arg1$arg2)
    {
        if (!
    is_number($arg1) || !is_number($arg2))
        {
            
    $a $arg1.$arg2;
        }
        elseif (
    is_number($arg1) && is_number($arg2))
        {
            
    $a $arg1 arg2;
        }
        else
        {
            
    $a 'mixed';
        }
        echo 
    $a;

    becomes
    PHP Code:
    function myFunk ($arg1$arg2)
    {
    if (!
    is_number($arg1) || !is_number($arg2))
    {
    $a $arg1.$arg2;
    }
    elseif (
    is_number($arg1) && is_number($arg2))
    {
    $a $arg1 arg2;
    }
    else
    {
    $a 'mixed';
    }
    echo 
    $a;

    Yuck!

  2. #2
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is because of the WYSIWYG editor, because it uses HTML, and in HTML spaces are breaking.

    Not a lot can be done. (Except replaceing 2 spaces with like "  ".)
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  3. #3
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Turn off the advanced toolbar in your member options.
    Mike
    It's not who I am underneath, but what I do that defines me.

  4. #4
    SitePoint Evangelist GeekSupport's Avatar
    Join Date
    May 2002
    Location
    Southern California
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yey! Thanks naramation


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •