[pmwiki-users] fox: custom ptvfmt
noskule
noskule at gmx.net
Mon Mar 3 04:06:05 CST 2008
Hans schrieb:
> Sunday, March 2, 2008, 10:27:53 PM, noskule wrote:
>
>
>> Is it somehow possible to make "custom" ptv which supports all
>> wikimarkup but is invisible? Something like:
>> [[#!Text]]
>> [[#!Text]]
>>
>
> before this you enquired about the (::PTVName:Value::) markup,
> And I gave you the PTV pattern definition for this as well as the
> markup which makes it invisible.
>
Sorry beeing unspezific, I used your ptvdefinition and markup to build
the hidden section one. The markup for make it invisible works. But the
PageTextVarPatterns seems not to be recognized. Testwise I modified
fox.php for the new ptvfmt. So my question should be:
* Can I do it without modifing fox.php.
* what is wrong with the $PageTextVarPatterns, it don't get recoginzed
fox.php 1220:
case 'hiddensection' : //add as hidden anchor section
$text = $text."\n[[!#".$key."]]\n$val\n[[!#".$key."end]]\n"; break;
hides the section:
Markup('hiddensection::', '<split',
'/\\[\\[!#[\\d\\w]+\\]\\].*\\[\\[!#[\\d\\w]+end\\]\\]/s', '');
should make a ptv (but seams not to work)
$PageTextVarPatterns['hiddensection'] =
'/\\[\\[!#[\\d\\w]+\\]\\].*\\[\\[!#[\\d\\w]+end\\]\\]/s';
> Installing this should have done what you are asking.
> So why is that not a solution for you?
> What markup does it not support?
> What markup breaks it? - Obviously inserting ::)
Yes, and this is very close to smilies code. I accidently did this
allready. The reason way I would like a "hidden section" with the markup
above is that I use it for the main content of all wikipages. So I would
like tho minimize the risk of accidently breaking the markup. And the
section markup [[#Text]]XXX[[#Textend]] seams more robust than (::ptv:
::). To make use of templates I need it invisible.
grz nos
> will close the PTV
> prematurely. But that is a problem for any PTV defined with a start
> and an ending marker.
>
>
> ~Hans
>
>
More information about the pmwiki-users
mailing list