[Moin-user] Extending URL schemas
Yusuf Abdulghani
yusuf at apple.com
Tue Feb 8 09:43:21 EST 2005
Bob,
I tried your suggestion and inserted this line in the wikiconfig.py
file:
url_schemas = ['myxyz']
However, this does not seem to work.
For example, if I have "http://www.yahoo.com" in any of my wiki pages,
I can see the link to this page. However, if I have "myxyz://123456", I
do not see a link. I was expecting this to generate a link which will
attempt to open this URL in Safari web browser. But this did not
happen. I suspect that there is lot more to be done than just having
url_schemas = ['myxyz'] inserted in the wikiconfig.py
Any directions from the developers about where to poke around to see
what can be done to get this to work.
Your time and help is very appreciated.
Best regards,
Yusuf
On Feb 6, 2005, at 5:18 PM, Bob Apthorpe wrote:
> Yusuf Abdulghani wrote:
>> Hi,
>> I would like to extend the URL schema to include couple of custom
>> schemas. Unfortunately, I did not find sufficient documentation on
>> the Help pages that suggests how to do this. The only place where I
>> find mention of extending URL schemas is in "HelpOnLinking".
>> "The supported URL schemes are: http, https, ftp, nntp, news, mailto,
>> telnet, and file. The administrator of your wiki can extend the
>> supported schemes by using the url_schemas variable (see
>> HelpOnConfiguration)."
>> HelpOnConfiguration however does not explain what the administrator
>> can do in order to expand the URL schemas.
>> Any pointers?
>
> First, find where the variable url_schemas is defined. Assuming your
> MoinMoin libraries are installed under
> /usr/lib/python/site-packages/MoinMoin, use
>
> find /usr/lib/python/site-packages/MoinMoin -name "*.py" -print | \
> xargs egrep url_schemas
>
> which leads you to MoinMoin/config.py (where it's defined) and
> MoinMoin/parser/wiki.py & MoinMoin/theme/__init__.py (where it's
> used.)
>
> MoinMoin/config.py sets the default configuration which I expect is
> augmented or superceded by wikiconfig.py (1.3.x) or moin_config.py
> (1.2.x.) So add your new url schema to either of those files as:
>
> url_schemas = ['imap', 'imaps', 'lmtp', 'ldap', 'ldaps']
>
> I'm more familiar with perl than python, but I think that's the proper
> syntax.
>
> hth,
>
> -- Bob
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
More information about the Moin-user
mailing list