[Pmwiki-users] PmWikiDraw New version

Knut Alboldt pmwiki
Thu Nov 4 13:50:08 CST 2004


At 18:05 04.11.2004, you wrote:
> > > On Wed, Nov 03, 2004 at 11:54:11PM +0100, Knut Alboldt wrote:
> > >
> > >>* I would suggest to check this in the script pmwikidraw (can work 
> this out
> > >>tomorrow), cause it may be that the ScriptURL will not contain the full
> > >>path (have to ask Pm) ? I think that will make the script more stable to
> > >>install.
> > >
> > >
> > > PmWiki recommends (and defaults) that $ScriptUrl contain the full path
> > > but doesn't require it.  $ScriptUrl is simply what PmWiki should
> > > generate for links back to the wiki script.
> > >
> > so it could be, that it's relative and then it would be nice if the 
> script would
> > add the rest (because it's needed by the java-applet).
>
>I don't understand how I can accurately do this? I thought the point
>of that url was to avoid incompatibilities?
>  -Ciaran

As far as I can see there are the following possibilities for $ScriptUrl:
1) full URL to the script, e.g. http://mysite/mywiki/pmwiki.php or if you 
using wikifarms or other redirections something like 
http://mysite/mywiki/index.php
2) relative URL's e.g. e.g. /mysite/mywiki/pmwiki.php or if you using 
wikifarms or other redirections something like /mysite/mywiki/index.php
3) is there the possibility to use mysite/mywiki/pmwiki.php (without the 
leading / ?) does this make sense ?

at least 1) and 2) are working fine in every pmwiki-base- installation to 
access the pages.
1) will work fine to get PmWikiDraw running
2) won't work in the current implementation of PmWikiDraw, cause the applet 
needs the full URL specified

So what's about the possibility that the script PmWikiDraw will check if 
$ScriptUrl starts with "http://$_Server['HOST']" and if not this will be 
added to generate the applet-parameters containing URL's ?
(
  could be done by using $scripturl2 unstead of $ScriptUrl within the 
function drawing and setting :

if (!preg_match('/^http:/',$ScriptUrl)
   {  $scripturl = "http://".$_Server['HOST'] . $ScriptUrl; }
else
   { $scripturl = $ScriptUrl; }

at the beginning of the function (although: may be done in a better way by 
a php-guru :-)
)


Another question:

is the maillist the right place to discuss _all_ details for a development 
of PmWikiDraw ? Is it of common interest ? Or will it just fill up the list 
and should be discussed in a smaller group ?

Knut 




More information about the pmwiki-users mailing list