[Trac] SubWiki page syntax

2014-08-27 Thread Roger Oberholtzer
I am trying to Include a sub-wiki page in a wiki page. If I have a page
called 'here', the following works:

 [[Include(here/subPage)]]

but the following does not:

 [[Include(./subPage)]]

It complains that ./subPage cannot be found. According to the docs, the
second syntax should be equivalent with the first.

I am running Trac 1.0.1

-- 
Roger Oberholtzer

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Using authentication in tracd - not working at all

2014-08-27 Thread Ziv Barber
Steps:

mkdir /var/trac/
mkdir /var/trac/myproject1
trac-admin /var/trac/myproject1 initenv

htdigest -c /var/trac/passlist MyProj1 myUser

tracd --hostname=localhost -p 3500 \
--auth=myproject1,/var/trac/passlist,MyProj1 \
-e /var/trac/ 

I can visit http://localhost:3500/myproject1 and it not asking for 
user/password.

More questions:

1. Is there a way to block users from viewing the list of projects (the / 
url)?

2. Why I need authentication system on the server side? should it be 
controlled from the trac system?

I'm new to this trac system :)

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] SubWiki page syntax

2014-08-27 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 27.08.2014 13:27, Roger Oberholtzer wrote:
 I am trying to Include a sub-wiki page in a wiki page. If I have a page
 called 'here', the following works:
 
  [[Include(here/subPage)]]
 
 but the following does not:
 
  [[Include(./subPage)]]
 
 It complains that ./subPage cannot be found. According to the docs, the
 second syntax should be equivalent with the first.

With docs you refer to TracLinks, specifically the paragraph on relative
links [1]? Well, a short look at the current source code reveals, that
that wiki page name resolution is not implemented yet in IncludeMacro.
To implement it, one would have to use a wiki page link resolver syntax
like in WikiSystem component [2]. Unluckily that one is modular, but not
exposed for re-use by plugins, so we would need to copy it.

Steffen Hoffmann


[1] http://trac.edgewall.org/wiki/TracLinks#Relativelinks
[2] http://trac.edgewall.org/browser/trunk/trac/wiki/api.py?rev=12853#L405

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlP+NtYACgkQ31DJeiZFuHc0ugCfS5OMc9X3o3oKO+/c8eyXWMCI
UDwAoJKCiE3JUU3Mi0lpTsl6/8PbToSJ
=pSeJ
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] SubWiki page syntax

2014-08-27 Thread Roger Oberholtzer
OK. It was not critical. It was going to simplify some boiler plate wiki
pages we use.


On Wed, Aug 27, 2014 at 9:51 PM, Steffen Hoffmann hoff...@web.de wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 27.08.2014 13:27, Roger Oberholtzer wrote:
  I am trying to Include a sub-wiki page in a wiki page. If I have a page
  called 'here', the following works:
 
   [[Include(here/subPage)]]
 
  but the following does not:
 
   [[Include(./subPage)]]
 
  It complains that ./subPage cannot be found. According to the docs, the
  second syntax should be equivalent with the first.

 With docs you refer to TracLinks, specifically the paragraph on relative
 links [1]? Well, a short look at the current source code reveals, that
 that wiki page name resolution is not implemented yet in IncludeMacro.
 To implement it, one would have to use a wiki page link resolver syntax
 like in WikiSystem component [2]. Unluckily that one is modular, but not
 exposed for re-use by plugins, so we would need to copy it.

 Steffen Hoffmann


 [1] http://trac.edgewall.org/wiki/TracLinks#Relativelinks
 [2] http://trac.edgewall.org/browser/trunk/trac/wiki/api.py?rev=12853#L405

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.12 (GNU/Linux)
 Comment: Using GnuPG with Icedove - http://www.enigmail.net/

 iEYEARECAAYFAlP+NtYACgkQ31DJeiZFuHc0ugCfS5OMc9X3o3oKO+/c8eyXWMCI
 UDwAoJKCiE3JUU3Mi0lpTsl6/8PbToSJ
 =pSeJ
 -END PGP SIGNATURE-

 --
 You received this message because you are subscribed to the Google Groups
 Trac Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to trac-users+unsubscr...@googlegroups.com.
 To post to this group, send email to trac-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/trac-users.
 For more options, visit https://groups.google.com/d/optout.




-- 
Roger Oberholtzer

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] SubWiki page syntax

2014-08-27 Thread Peter Suter

On 27.08.2014 21:51, Steffen Hoffmann wrote:
Unluckily that one is modular, but not exposed for re-use by plugins, 
so we would need to copy it. 


Actually it is a bit exposed now, since it is reused in TitleIndexMacro 
[1]. (At least the requested, and IMO most useful part.)


I think it would be something like this:

if page_name and formatter.resource and 
formatter.resource.realm == 'wiki':
page_name = formatter.wiki.resolve_relative_name(page_name, 
formatter.resource.id)


Added just before retrieving the WikiPage [2].

[1] http://trac.edgewall.org/ticket/11455
[2] 
http://trac-hacks.org/browser/includemacro/trunk/includemacro/macros.py#L84


--
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] SubWiki page syntax

2014-08-27 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 27.08.2014 22:22, Peter Suter wrote:
 On 27.08.2014 21:51, Steffen Hoffmann wrote:
 Unluckily that one is modular, but not exposed for re-use by plugins,
 so we would need to copy it. 
 
 Actually it is a bit exposed now, since it is reused in TitleIndexMacro
 [1]. (At least the requested, and IMO most useful part.)
 
 I think it would be something like this:
 
 if page_name and formatter.resource and formatter.resource.realm
 == 'wiki':
 page_name = formatter.wiki.resolve_relative_name(page_name,
 formatter.resource.id)
 
 Added just before retrieving the WikiPage [2].

Right, I saw that. While this is a good thing for the future, it is a)
not too hard to include the full support and b) not
backwards-compatible. AFAIK current IncludeMacro still aims at 0.11
compatibility.

I've proposed a solution for the corresponding, rather old ticket [3],
saving a conditional import of the aforementioned method for .

Steffen Hoffmann


[3] http://trac-hacks.org/ticket/3591
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlP+hCMACgkQ31DJeiZFuHd9KgCeOkY+fY2uFqAjy+6HqdjeFQTR
LgYAoLi8o9QQfO7/f+SejMy3HTurC4Fl
=jsJg
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.