phpWebLog - web news management with adolescent sexist humor
find
story index | search | archive | submit story | downloads | stats | contact
Topics
  • General (909)
  • Announcements (20)
  • Development (518)
  • Mods & Hacks (32)


  • phpWebLog
  • Latest Release - 0.5.3 (BETA)
  • Latest Stable - 0.5.2
  • ChangeLog
  • TODO / Roadmap
  • BUGS

    CVS WEB

  • New XL fork 0.5.2
  • Unstable branch 0.5.3

  • For development discussions and for general support, join the phpWebLog mailing list

    phpWebLog needs active developers to help fix bugs. If you are interested, send me your SourceForge login information for CVS access.


    Last 5 Comments
  • Where can I modify the style of bottom navigation? (Ken Farmer)
  • Great News for PHP Programmers.... (Nekrataal)
  • Unable to update URL block content. (Nekrataal)
  • Comment management (Nekrataal)
  • phpweblog woes (Nekrataal)


  • Problems with HTML in Stories - General
    Posted by King Louie (Tuesday March 06 2001 @ 03:27PM EST) views: 163
    Hi Folks!

    How can i fix the problems in the stories with the HTML on my site! Please see http://kinglouie.nexen.net/stories.php and then the Article Topscorers or NYI-NYR?!
    What did I do wrong? (i´m running 5.1 on my site)

    Related Link
    < phpWebLog 0.5.1 pre 1 available | Topic Graphics? >

    By Brian Milby (Tuesday March 06 2001 @ 07:10PM EST)
    Try to comment out line 126 of parser.inc.php which starts as
    $ostring = nl2br($ostring);
    [ reply | parent ]
    By Brian Milby (Tuesday March 06 2001 @ 07:34PM EST)
    Actually it's line 123... sorry
    [ reply | parent ]
    By Brian Milby (Tuesday March 06 2001 @ 08:19PM EST)
    After thinking about this for a while, I think I've come up with a good compromise that will suit most users. If the parselevel is 0 or 1, then don't add the breaks. But, if it is 2, 3, or 4 then add the breaks.

    if ($parselevel > 1) { $htmlOut = $htmlOut . trim($ostring) . "\n";
    } else { $htmlOut = $htmlOut . trim($ostring) . "\n";
    }

    Note: we don't really need to use the nl2br function since we know that there is only 1 nl in each line and it will be the last character.
    [ reply | parent ]
    By Brian Milby (Tuesday March 06 2001 @ 08:20PM EST)
    Well, I think that I just discovered a bug...
    There should be a break tag where the bold starts.
    [ reply | parent ]
    By Brian Milby (Tuesday March 06 2001 @ 08:26PM EST)
    Let's try again...

    if ($parselevel > 1) { $htmlOut = $htmlOut . trim($ostring) . "<br>\n";
    } else { $htmlOut = $htmlOut . trim($ostring) . "\n";
    }
    [ reply | parent ]
    By Glenn (Tuesday March 06 2001 @ 10:39PM EST)
    Brian, would this fix remedy the odd line breaks caused when text is cut and pasted into the story text box?

    Instead of the text 'flowing' what I'm seeing is a ton of BR tags which I'm assuming is the translation of the NL character in the text.

    What I'd _like_ to see is that a CRLF be required to generate a BR tag.

    Is this what you're doing here?
    [ reply | parent ]
    By Brian Milby (Tuesday March 06 2001 @ 11:30PM EST)
    Yes, this could solve your problem. You would need to allow full HTML (parselevel 1) and then enter either a blank line (which generates a <p> tag) or a <br> tag to break paragraphs.
    [ reply | parent ]
    By Glenn (Wednesday March 07 2001 @ 12:17PM EST)
    Worked like a charm..thanks Brian.
    [ reply | parent ]
    By King Louie (Wednesday March 07 2001 @ 08:42AM EST)
    I have Full HTML! But I didn`t understand anything! Sorry, but i´ll try it!
    [ reply | parent ]
    Post a Comment
    Name:
    Email:
    URL:
      Remember my information (uses cookies)
      I would rather be anonymous
    Comment:
    * Your email will not be made public.
    Save As:
    SourceForge
    SourceForge is providing us a mailing list , documentation and a CVS tree.

    SourceForge Logo


    PHP.net
  • PHP Usage Survey Results
  • PHP Manual CHM Edition - 12th build
  • International PHP Conference 2003 program online
  • Server Central Donates Server
  • European Open Source Development Threatened!
  • php{con west is announced
  • PHP 4.3.3 released!
  • Active Awards 2003 Winners
  • PHP.net news history
  • Select mirror for redirection

  • PHPBuilder
  • On User-Defined Timezones in PHP
  • Dreamweaver MX 2004
  • Using PEAR's HTML_Table Class
  • An introduction to the ADOdb class library, Part 2
  • An introduction to the ADOdb class library for PHP
  • Manually Expiring Web Pages
  • Regression Testing With JMeter
  • Advanced Image Editing Under the GD Library
  • The Benefits of Using Objects with Databases
  • Interfacing with COM objects under Windows


  • phpWebLog: A PHP News and Content Management System
    Copyright (C) 2000-2002, Jason Hines / Eye Integrated Communications