[pmwiki-users] Change the Break Clear=all

Miller, Joshua web at cityofelmira.net
Thu Mar 2 15:09:38 CST 2006


-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com] 
Sent: Thursday, March 02, 2006 3:42 PM
To: Miller, Joshua
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Change the Break Clear=all

On Thu, Mar 02, 2006 at 03:36:59PM -0500, Miller, Joshua wrote:
>    When I use [<<] I get this in the code: <br clear='all' />
>    How do I change it so it just outputs <br />

Why not just use \\ at the end of a markup line?  I.e., instead of

    This is some [[<<]] broken text

use

    This is some \\
    broken text

The "\\" generates a <br /> with no clear='all' attribute.

However, if you really are wanting to change the markup for [[<<]], then
do the following in local/config.php:

    ## [[<<]] (break)
    Markup('[[<<]]','inline','/\\[\\[&lt;&lt;\\]\\]/',"<br />");

(The original lines for this are in scripts/stdmarkup.php, putting the
above in local/config.php cause PmWiki to use the above definition
instead of its default.)

Hope this helps,

Pm

----
Ok that didn't help.  I'm trying to write some PHP code like this:

        $rcpage = ReadPage($pagename,"");
        $pos=strpos($rcpage['text'],"(:\$CurrentFeaturesOutput:)");
        $len=strlen("(:\$CurrentFeaturesOutput:)");
        $before=substr($rcpage['text'],0,$pos+$len);
        $after=substr($rcpage['text'],$pos+$len);
        $rcpage['text'] = $before.
           /*   "\n$$$$\$default".  pog? */
		"\n!"
		.StripCSlashes($_GET["header"])
		."\n"
		.StripCSlashes($_GET['desc'])
		."/\\"					<<<<<<< This is
my problem
		."\n"
		."&nbsp;&nbsp;[["
		.($_GET["link"])
		."| &raquo;Click here for more]]"
		.$after;
        WritePage($pagename,$rcpage);

Where I've noted above, I want to add \\ to the string to create a line
break <br> in the wiki code.
I guess I'm not sure how to escape it in PHP.

Any help?

Thanks
-Josh





More information about the pmwiki-users mailing list