Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] tcm_poll
open up include/admin_config.php, and scroll down to where it has custom_1_set (or something similar), and those are the labels for the extra fields.
Offline
#14 2004-09-01 15:15:06
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_poll
OK done that and the custom fields are now available on the content/write page. So what next? Create an article, call it what, how do you call it via the pluging tag? Still need more instruction on usage please.
Thanks again
Lee
Offline
#15 2004-09-01 16:37:48
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [archived] tcm_poll
> tmacwrig wrote:
> open up include/admin_config.php, and scroll down to where it has custom_1_set (or something similar), and those are the labels for the extra fields.
Sorry, have to bother you again. admin_config.php is not in include but in lib, and has no such thing. In include there is txp_admin.php, but in there I can’t find it either. I’m using v 1.18, does that make any difference?
Thanks.
Offline
Re: [archived] tcm_poll
oh, yeah, lib. sorry, working offhand. and less, you can just use the sample tags that I have on my website, put one in your content body, and add a question and answers as extra fields
Offline
#17 2004-09-01 16:53:46
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [archived] tcm_poll
> tmacwrig wrote:
> and less, you can just use the sample tags that I have on my website, put one in your content body, and add a question and answers as extra fields
Well, I must be too stupid for this plugin :-(
Still don’t know HOW to get those extra fields to show…
Offline
Re: [archived] tcm_poll
click “Advanced Options” to the left of the content field.
Offline
#19 2004-09-01 16:59:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [archived] tcm_poll
Guess I found it: custom fields are added in v 1.19, so I just don’t have them…
Thanks anyway.
Offline
#20 2004-09-01 17:33:52
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_poll
I must really be missing something obvious here :-(
The only sample tag I can find on your site is < txp:tcm_pollinput break=”<br />” wrap_q=“strong” / >, which I have put in the body of a page. Now how do I add the questions and answers as extra fields?
I’m not giving up :-)
Lee
Offline
Re: [archived] tcm_poll
lee- you are using 1.19, right? so you’ve changed them in admin_config.php, so just click advanced_options when posting, and add them. (and add the tcm_pollinput tag to the article form or the body of an article. I don’t think it will work in a page template)
Offline
#22 2004-09-01 19:01:32
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_poll
I got it working, thanks for the help. A couple of questions if I may: 1. How did you get the percentage bar to appear behind the percentage figure? 2. If submit is pressed without selecting an answer the poll results are calculated wrong, it seems to be dividing by total submits, not votes. Can this be fixed? Maybe it should only go to the results if an answer has been selected. And what did you think about my idea of being able to view the results without voting? i.e. have a View Results link below the submit button.
Offline
Re: [archived] tcm_poll
1: That’s because of two divs and a little css
<pre>
#left #poll {
padding: 10px;
}
#left #poll .bar {
margin: 4px 0;
border: 1px solid #5A6D8D;
background-color: #fff;
}
#left #poll .bar div {
padding: 3px;
background-color: #5A6D8D;
}
#left #poll .bar div span {
background-color: #CFD6E0;
color: #000;
}
</pre>
but if you’re putting it in a different column, you’ll have to change #left.
2: I’ll see if I can fix that either by checking in the php file, or by some simple js.
3: You can view results without voting by adding a < tcm:polloutput /> tag to the page
Offline
#24 2004-09-01 19:20:28
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] tcm_poll
Thanks for the css. The poll question is not displayed along with the results, be much better if it was.
Edit:
The wrap_q seems to make no difference. If I leave it out the question is still bold.
What are the options for Delay. How would I set 1 second or 1 minute?
Last edited by lee (2004-09-01 20:16:11)
Offline