[pmwiki-users] create a shortcut markup string

Menachem Shapiro menachem.shapiro at gmail.com
Mon Jan 31 18:43:25 CST 2005


B"H
On Mon, 31 Jan 2005 17:10:49 -0600, Patrick R. Michaud
<pmichaud at pobox.com> wrote:
> On Mon, Jan 31, 2005 at 02:29:23PM -0800, Menachem Shapiro wrote:
> > I am trying to create a custom markup for a block pattern:
> > Basically, I want %block color=red%  to be represented by %RED%
> >
> 
> There's an easier way to do this.  Just add the following to config.php:
> 
>   $WikiStyles['RED']['apply'] = 'block';
>   $WikiStyles['RED']['color'] = 'red';
> 
> and then %RED% will be the same as %block color=red%.

I could not get this to work. When I did this, none of the lines
showed up red. I did a search of the mailing list and found where
Patrick mentioned that it could be because it was being the PHP engine
wasn't processing it
(http://pmichaud.com/pipermail/pmwiki-users/2005-January/009415.html).
I don't think that is the case here. I did an ?action=diag and found
this:

    [WikiStyles] => Array
        (
            [RED] => Array
                (
                    [apply] => block
                    [color] => red
                )

            [BLUE] => Array
                (
                    [apply] => block
                    [color] => blue
                )

        )

so it looks like the text in config.php is working properly.


> 
> You can also define it within the page itself by using:
> 
>   %block color=red define=RED%

I did this and it did work. (Incidently, this brought up a question.
Why does the  PmWiki/WikiStylesAdmin page exist in
http://www.binarycloud.com/index.php/PmWiki/WikiStylesAdmin but not in
http://www.pmwiki.org/wiki/PmWiki/WikiStylesAdmin?)

> 
> This is a good candidate for placement in a GroupHeader page, too.

I didn't try this yet.

> 
> Pm
> 


-- 
Are you interested in using Linux?
Download Libranet 2.8.1 for free and try it out.
http://www.libranet.com/trial_download.html



More information about the pmwiki-users mailing list