[Trac] Re: adding a left side menu...
Brad Anderson
brad at dsource.org
Thu Mar 3 11:15:15 EST 2005
bruce wrote:
> one question....
>
> what's with the 'login' in the location match (<LocationMatch
> "/projects/[[:alnum:]_]+/login">)
>
> is this a file/directory? is this part of trac.. do i provide this???
For the most part, Trac reads certain parts of the URL/URI and handles
them differently. For example, there's no /projects/test/wiki "html
page", or "python file" on the file system. Trac reads the URL and sees
the first part, /projects, and knows from your Apache conf that anything
in the /projects area is handled by mod_python. Then the next part is
read, and it says /test. This tells mod_python and Trac to render
content from the /test project on the server. The last part is /wiki
and again, this does not correspond to any one file that's on the server
and going to be served by Apache. It tells Trac to go to the database,
get a wiki page, format it, and return it to Apache so it can be sent to
your browser.
I may be simplifying a bit, and not completely accurate, but I hope I'm
helping get you over the hurdle. If we do that, other things may fall
into place.
>
> also, does the ":alnum" get resolved because we're using mod_python.. and
> just what is :alnum:..???
alnum is a regular expression notation for any alpha-numeric character.
Another post covered this better, and there has been discussions that
alnum maybe shouldn't be used, because it doesn't allow other characters
that you may want in your project name, like hyphen...
BA
>
>
> -bruce
>
>
> -----Original Message-----
> From: Frazier, Stephen [mailto:frazier at ugs.com]
> Sent: Thursday, March 03, 2005 7:53 AM
> To: bedouglas at earthlink.net; trac at lists.edgewall.com
> Subject: RE: [Trac] Re: adding a left side menu...
>
>
> Bruce,
>
> Here is what I have
> -------------------------------------------
> Alias /trac/ "/usr/local/share/trac/htdocs/"
> <Directory "/usr/local/share/trac/htdocs/">
> Options Indexes MultiViews
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
>
> # Multiple trac projects configuration using mod_python
> <LocationMatch /projects>
> SetHandler mod_python
> PythonHandler trac.ModPythonHandler
> PythonOption TracUriRoot "/projects"
> PythonOption TracEnvParentDir "/data/trac"
> </LocationMatch>
>
> # Trac authentication setup - mod_python
> <LocationMatch "/projects/[[:alnum:]_]+/login">
> # How to authenticate user
> AuthType Basic
> AuthName "Trac"
> AuthUserFile /usr/local/web/htpasswd
> Require valid-user
> </LocationMatch>
> --------------------------------------------------
>
> I actually have it set up for both CGI and mod_python, but I just showed
> what is needed for mod_python. I also use only one htpasswd file for all
> my projects and use Trac and SVN permissions to control actual access.
>
> Hope that helps,
> Steve
>
> -----Original Message-----
> From: bruce [mailto:bedouglas at earthlink.net]
> Sent: Thursday, March 03, 2005 10:30 AM
> To: Frazier, Stephen
> Subject: RE: [Trac] Re: adding a left side menu...
>
> i've looked at the docs..
>
> i currently have...
> ------------------------------------------------
> Alias /trac/ /usr/share/trac/htdocs/
> <Directory /usr/share/trac/htdocs>
> Order allow,deny
> Allow from all
> </Directory>
>
> <Location "/cgi-bin/trac.cgi">
> SetEnv TRAC_ENV "/var/projects/project_1/htdocs"
> </Location>
>
> <Location "/cgi-bin/trac.cgi/login">
> AuthType Basic
> AuthName "Project 1"
> AuthUserFile /var/projects/project_1/htdocs/trac.htpasswd
> Allow from all
> #Require valid-user
> </Location>
> --------------------------------------------------
>
> the mod_python approach for multiple projects has...
>
> ----------------------------------------------
> Alias /trac/ /usr/share/trac/htdocs/
> <Directory "/usr/share/trac/htdocs">
> Options Indexes MultiViews
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
>
> <Location />
> SetHandler mod_python
> PythonHandler trac.ModPythonHandler
> PythonOption TracUriRoot /
> PythonOption TracEnvParentDir "/var/trac"
> </Location>
>
> <Location /project1/login>
> AuthType Basic
> AuthName "Project1"
> AuthUserFile /var/www/projects.yourdomain.com/security/users
> AuthGroupFile /var/www/projects.yourdomain.com/security/groups
> Require group project1-users
> </Location>
>
> <Location /project2/login>
> AuthType Basic
> AuthName "Project2"
> AuthUserFile /var/www/projects.yourdomain.com/security/users
> AuthGroupFile /var/www/projects.yourdomain.com/security/groups
> Require group project2-users
> </Location>
>
> <Location /trac>
> SetHandler none
> </Location>
> ---------------------------------------------------
>
> so i assume that i'll get rid of everything in my config that deals with
> trac.cgi... is that correct...
>
> but then i'm left with the question of just where do i find the
> /project1/login file, or is that a directory for project1... in which
> case i still don't know what should be in the dir..
>
> i'm missing something here...!!
>
> thanks..
>
>
>
> -----Original Message-----
> From: Frazier, Stephen [mailto:frazier at ugs.com]
> Sent: Thursday, March 03, 2005 7:12 AM
> To: bedouglas at earthlink.net
> Subject: RE: [Trac] Re: adding a left side menu...
>
>
> Bruce,
>
> The docs here
> http://projects.edgewall.com/trac/wiki/TracMultipleProjects are pretty
> detailed. My old CGI setup was basically exactly what is posted under
> the Global section. The mod_python setup is simpler and is documented
> here: http://projects.edgewall.com/trac/wiki/TracModPython.
>
> They both have example setups that work fine for basic setups.
>
> Steve
>
> -----Original Message-----
> From: bruce [mailto:bedouglas at earthlink.net]
> Sent: Thursday, March 03, 2005 10:05 AM
> To: Frazier, Stephen; trac at lists.edgewall.com
> Subject: RE: [Trac] Re: adding a left side menu...
>
> stephen...
>
> it is currently setup for only one project!!! that's my issue! i need to
> know how to setup the conf file file multiple projects...
>
> and i can't quite get my hands around the scant docs i've seen that
> discuss this...
>
> i need a step by step.. kiss approach!!!
>
> any thoughts/ideas/comments are welcome..
>
> thanks
>
> bruce
>
>
> -----Original Message-----
> From: Frazier, Stephen [mailto:frazier at ugs.com]
> Sent: Thursday, March 03, 2005 7:00 AM
> To: trac at lists.edgewall.com; bedouglas at earthlink.net
> Subject: RE: [Trac] Re: adding a left side menu...
>
>
> Bruce,
>
> This looks to be set up for only one project. Look at
> http://projects.edgewall.com/trac/wiki/TracMultipleProjects for a
> multiple project setup.
>
> FYI, using mod_python will automatically give you a list of available
> projects by going to http://myserver/projects/.
>
> Steve
>
> -----Original Message-----
> From: trac-bounces at lists.edgewall.com
> [mailto:trac-bounces at lists.edgewall.com] On Behalf Of bruce
> Sent: Thursday, March 03, 2005 9:46 AM
> To: 'Matthew Good'; trac at lists.edgewall.com
> Subject: RE: [Trac] Re: adding a left side menu...
>
> ok matt...
>
> so you're saying that i essentially have to find/figure out which *.cs
> file
> gives me the output for the page that i want to have the verticle menu
> appear... arrgghh!!! and then i have to insert the html to produce the
> menus...
>
> for what might be a bigger problem... how do i get trac setup to deal
> with
> multiple projects...
>
> i have the following in my apache conf file. a guy started to set trac
> up,
> and then he disappeared!! i can access trac.. but now i need to
> determine if
> it makes sense to work with this thing... it shouldn't be this tough to
> setup a proj mgmt app..
>
> Alias /trac/ /usr/share/trac/htdocs/
> <Directory /usr/share/trac/htdocs>
> Order allow,deny
> Allow from all
> </Directory>
> <Location "/cgi-bin/trac.cgi">
> SetEnv TRAC_ENV "/var/projects/project_1/htdocs"
> </Location>
>
> <Location "/cgi-bin/trac.cgi/login">
> AuthType Basic
> AuthName "Project 1"
> AuthUserFile /var/projects/project_1/htdocs/trac.htpasswd
> Allow from all
> #Require valid-user
> </Location>
>
> i'm really trying to get something like:
>
> left menu
>
> Project Docs
> Network Docs
> (+/-)Projects
> Project-1
> Project-2
> Project-3
>
>
> where the 'Projects' link is a hidden/drop display of the underlying
> projects.. i'd like this to be on the main page, and have the individual
> projects connect to the projects as created/setup in the conf file...
>
> so how do i get there!!!!
>
> thanks....
>
> bruce
>
>
>
>
> -----Original Message-----
> From: Matthew Good [mailto:trac at matt-good.net]
> Sent: Thursday, March 03, 2005 5:59 AM
> To: trac at lists.edgewall.com; bedouglas at earthlink.net
> Subject: RE: [Trac] Re: adding a left side menu...
>
>
> On Thu, 2005-03-03 at 04:22 -0800, bruce wrote:
>
>>but i still don't have a clue as to how to use 'TracGuideToc' within
>
> my
>
>>version of trac to create a vertical left menu like
>
> 'trac.edgewall.com'.
>
> The previous poster was mistaken. The TracGuideToc is not what you were
> referring to. Also, trac.edgewall.com is part of their corporate
> website and is not powered by the Trac software, so
> http://projects.edgewall.com/trac is what you should be looking at.
>
>
>>in reviewing the docs for 'TracGuideToc' i don't have any example that
>
> shows
>
>>what file this should be included in, nor to i have any example that
>
> really
>
>>explains/walks through what the attributes are that should be used
>
> with
> the
>
>>TracGuideToc macro..
>
>
> Yes, right now the TracGuideToc is specifically for generating the table
> of contents seen on http://projects.edgewall.com/trac/wiki/TracGuide
>
> For something similar to the TracGuideToc, take a look at:
> http://svn.ipd.uka.de/trac/javaparty/wiki/TracNav
>
> The TracNav macro allows you to create a basic menu in the wiki, however
> you will have to include the macro on each page in the wiki where you
> would like it to appear.
>
> Like I said before, if you want to actually create a menu like on the
> Trac project site, you will need to edit the HTML templates. These
> files are generally located in /usr/share/trac/templates on Linux/Unix
> or C:\Python23\share\trac\templates on Windows.
>
> Trac uses the ClearSilver http://www.clearsilver.net/ templating
> language, which is similar to something like ASP, JSP, or PHP.
>
> --
> Matthew Good <trac at matt-good.net>
>
> _______________________________________________
> Trac mailing list
> Trac at lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Trac mailing list
> Trac at lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
More information about the Trac
mailing list