[pmwiki-users] Need help to complete a recipe to read WRL 3D models

Benoit Dutilleul benoit.dutilleul at googlemail.com
Sun Nov 25 15:45:01 CST 2007


Dear Patrick,

Thanks for your help! I implemented your advice and now, I get the plugin
window to appear properly but, somehow, it can't load the file in argument (
e.g.
http://www.web-farm.org/wiki/fields/WiCo/uploads/ItemPages/20071125_biogas_plant.wrl
)

This is how my wrl.php recipe looks like now:

<?php if (!defined('PmWiki')) exit ();
Markup('wrl', 'directives',
  '/\\(:wrl (\\S+):\\)/e',
  Keep("<embed src='$1' WIDTH='420' HEIGHT='250' NAME='flux'
TYPE='model/x3d+xml' DASHBOARD='0' LOADSCREEN='1'/>") );
?>

Thanks a lot!

Benoit

2007/11/25, Patrick R. Michaud <pmichaud at pobox.com>:
>
> On Sun, Nov 25, 2007 at 09:49:39PM +0100, Benoit Dutilleul wrote:
> >    Now, I am trying to implement (:wrl http://www.mymodel.3d:) according
> to
> >    the markup development page but I can't get it to work:
> >
> >    <?php if (!defined('PmWiki')) exit ();
> >    Markup('wrl', 'directives',
> >    '/\\(:wrl (\\d+) :\\)/e',
> >    Keep("<embed src='$1' WIDTH='420' HEIGHT='250' NAME='flux'
> >    TYPE='model/x3d+xml' DASHBOARD='0' LOADSCREEN='1'/>") );
> >    ?>
> >
> >    Any idea about what is wrong or missing?
> >    Thanks!
>
> The \d+ in the expression will only match digits.  You might want
> to use \S+? (non-space characters, as few as possible) instead.
>
> Pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20071125/9a91221a/attachment.html 


More information about the pmwiki-users mailing list