Modify

Opened 16 years ago

Closed 16 years ago

#3302 closed task (fixed)

Can't use TracFormEnvironment

Reported by: ddley@… Owned by: Rich Harkins
Priority: normal Component: TracFormsPlugin
Severity: normal Keywords:
Cc: rich@… Trac Release: 0.11

Description

Hello,

I like TracForms but I can't use TracForm Environment Variable. When I use [tf.who:value] after this I got anonymous in the form. I'm logged in Trac.

Now I wanna use %USER% but I haven't any idea how to use this. I tried a lot.

Please gimme an example.

Attachments (0)

Change History (8)

comment:1 Changed 16 years ago by Rich Harkins

Cc: rich@… added; anonymous removed
Owner: changed from Rich Harkins to anonymous
Status: newassigned

First off, which version of TracForms are you using? Did you build from trunk and if so when? If it wasn't in the last couple of days you might try rebuilding with that as some of the 0.1 stuff had problems with not being able to identify users correctly. Trunk is now at 0.2.

comment:2 Changed 16 years ago by anonymous

You might also check out the tutorial.

comment:3 Changed 16 years ago by didley@…

Now I changed from 0.1 to 0.2 and it works.

thanx

I checked for two days ago the tutorial also. It's a very good tutorial. I've never seen a good description like for tracforms for any plugin before. Good structure and nice compendium.

But I can't use variables cause I'm not the pick of the bunch. Please enhance your laundry example with a variable example.

didley

comment:4 Changed 16 years ago by anonymous

Glad to hear it's working better, other than for USER. Not sure why that is off hand. One of the other tasks is to set up the polling example, which is really what %USER% is meant for (so that one can sub-contextualize based on it). I'm not sure when I'll have that up (might not be until next week), but here's what's _supposed_ to happen...

{{{
#!TracForm
#! page votes:/media
#! subcontext %USER%

|| [tf:select radio 3//Lots 2//Some 1//Little] || Do you like radio? ||
|| [tf:select tv 3//Lots 2//Some 1//Little] || Do you like television? ||
|| [tf:select movies 3//Lots 2//Some 1//Little] || Do you like going to the movies? ||

}}}

Ideally, what will happen is each user logged in gets the same, blank, form with Lots, Some, Little for each question. Once submitted their vote is kept. On a different page, something like this happens:

{{{
#!TracForm
#! load jack votes:/media
#! load mary votes:/media
#! load jill votes:/media

|| '''Score''' || '''Topic''' ||
|| [tf.sum:%/page/movie:*:radio] || Radio ||
|| [tf.sum:%/page/movie:*:tv] || Television ||
|| [tf.sum:%/page/movie:*:movies] || Movies ||

}}}

Ultimately, this would summarize the other voting pages and you could use * instead of listing every username out (which is not yet coded). Once that's done I've got a task to write up the tutorial on polling.

One note on %...% is that they were originally intended only for #!command and [tf...:] areas. They aren't parsed as part of the general text (an error on my part) and the [tf.value:] command isn't currently able to access the USER variable. That bug should be corrected soon.

Anyway, hopefully that context, albeit long winded, helps some as to what's in store. The parser definitely needs a re-factoring to bring the various insertion methods together but that won't be for a little while yet (0.3).

Thanks again for your commentary and support! Rich

comment:5 Changed 16 years ago by didley@…

Thanx.

Now I see the idea of variables. Looking forward for version 0.3

didley

comment:6 Changed 16 years ago by Rich Harkins

Owner: changed from anonymous to Rich Harkins
Status: assignednew

comment:7 Changed 16 years ago by Rich Harkins

Status: newassigned

comment:8 Changed 16 years ago by anonymous

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Rich Harkins.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.