Author |
Message |
07/07/2005 16:39:10
|
yesper
Beginner
Joined: 07/07/2005 15:28:38
Messages: 5
Location: http://www.turkku.com
Offline
|
I have this (test)poll on my site
http://www.turkku.com/poll/karmeat.php
It seems to work ok, in general. However, I also saw this demo #2 is available http://proxy2.de/poll/demo_2.php
I'd love it. It would be nice cos' on my on-coming poll people would then have a chance to tell why they choosed their song. Why they hate it!
I build another test site and copied the code. It didn't work. It stucked on line
My AP runs in textmode. Is that the cause? Does this nice comment option require real database (MySQL)?
|
# Jary |
|
08/07/2005 08:16:22
|
amber222
Graduate
Joined: 07/05/2004 21:13:07
Messages: 586
Offline
|
Instead of copying the code on the demo page, use the file demo2.php that came with the textfile version and tweak it to fit your site.
|
|
08/07/2005 09:17:20
|
yesper
Beginner
Joined: 07/07/2005 15:28:38
Messages: 5
Location: http://www.turkku.com
Offline
|
Yeah. But if I could do that why should I ask stupido questions here?
The problems here is that I'm so newbie with PHP: I don't understand how it works. To me it's a rocket science and unfortunately I don't have time to learn it right now.
Again, my testpoll is here
http://www.turkku.com/poll/karmeat.php
It's simple and so is the code:
- - -
<?php include_once "/www/asiakkaat/turkku/public_html/poll/poll_cookie.php";
?>
[ usual html stuff ]
<?php include_once "/www/asiakkaat/turkku/public_html/poll/booth.php";
echo $php_poll->poll_process(4);
?>
[ missing PHP code should be here? ]
[ usual html stuff ]
- - -
That's all and it works ok — except the comments which is not shown at all. Comment popup form works all right: I can write comments and send it and even read them on the Admin Panel. But they are never shown anywhere on page.
So it's obvious a piece of "showing code" is missing here. I've tried everything, but it don't work. I know it's so simple, just a couple of RIGHT lines of code.
Please, could you amber222 or someone else help stupido newbie and copy those required line here?
|
# Jary |
|
08/07/2005 13:45:30
|
amber222
Graduate
Joined: 07/05/2004 21:13:07
Messages: 586
Offline
|
Did you even look at the demo2.php file that came with the download? The code is in there.
Since you aren't using a database (db), you do not refer to one.
|
|
08/07/2005 16:33:32
|
Anonymous
|
# Did you even look at the demo2.php file that came with the download?
About thousands times. It just didn't work... nore did the one You pasted here.
These two lines (64-65 here) seems to be critical:
They cause errors and 'comment section' disappears. Like this:
"Warning: main(/include/config.inc.php): failed to open stream: No such file or directory in /www/asiakkaat/turkku/public_html/poll/karmeat.php on line 64"
and
"Fatal error: main(): Failed opening required '/include/config.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /www/asiakkaat/turkku/public_html/poll/karmeat.php on line 64"
I REMOVED them and did another test version and
http://www.turkku.com/poll/karmeat_ORIG.php
and BANG. Almost. Now the 'comments' are there and also are the results, but instead the 'vote section' is missing. But does this indicate that the trouble ain't there?
This is way too much much for a newbie like me. But is it the PATHS that are somehow badly wrong here?
Opening line:
So all of the stuff are under
I'm beginning to loose my hope... [/code]
|
|
09/07/2005 11:50:19
|
yesper
Beginner
Joined: 07/07/2005 15:28:38
Messages: 5
Location: http://www.turkku.com
Offline
|
It's all pretty clear now.
Sorry. I badly misunderstood the whole thing, that is, HOW those demos should be used! Two days hard work almost for nothing, but I'm older and wiser now.
However, poor documentation was quite frustrating. I didn't expect any red carpet, champagne or 100s of PDF pages, but 2-3 lines in Readme file would have done.
One last question remains: How do I set a cookie expire after 1 hour?
No cookie option available in Admin Panel. Obviously some file(s) requires a bit of tweaking here. And, depending on that, should this first code line contain
or just
Thanx for your time and patience!
|
# Jary |
|
09/07/2005 15:18:02
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
go to the file poll_cookie.php or whatever it's called.
the default is 96 hours, it shold be within the first 10 lines of the file.
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
10/07/2005 16:19:30
|
yesper
Beginner
Joined: 07/07/2005 15:28:38
Messages: 5
Location: http://www.turkku.com
Offline
|
Yup. The first actual line:
That works, surely. Thanx!
But could this also be set under 1 hour? Like 15 min. (0.25)?
It mays sound ridiculous, but it might be useful -- to me, at least.
I have this poll, again
http://www.turkku.com/poll/karmeat.php
Visitors vote there the worst Finnish cover song ever. One voting/one song at the time, next vote after 1 hour. Ok.
Some limitation is required of course, otherwise "smart" kids start to hammer their "enter" giving votes to only one song. Vote is ruined. But at the same time normal people are eager to vote their favorites so they get pissed when they have to wait a whole hour.
Better solutions would perhaps be this: one voting/10 songs at the ime, next voting after 30 min-1 hour. But this script is using radio buttons and I guess it would be pretty hard task to change them to checkboxes -- if possible at all?
That's why I'm thinking to simply change that cookie expire after 10-20 min. It would still prevent total hammering, but people would be happier and would vote more often.
So, could this work:
|
# Jary |
|
|