Poll module for Phorum 5.1.x
Posted by amilcarpt
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
poll.5.1.tar.bz2 | 5 KB | open | download | amilcarpt | 04/20/2006 | Read message |
poll.php | 13.9 KB | open | download | scigametools | 06/04/2006 | Read message |
poll.php | 14.6 KB | open | download | Zébulon | 06/28/2006 | Read message |
french.php | 1.6 KB | open | download | Zébulon | 06/28/2006 | Read message |
Poll module for Phorum 5.1.x April 20, 2006 06:30AM |
Registered: 20 years ago Posts: 126 |
I've updated the Poll module ( [www.phorum.org] ) created by arlo in 2004 to be able to work with Phorum 5.1.x.
I've also integrated some fixes and extensions to it.
The install instructions are also updated.
Regards,
--
Amilcar Lucas
www.kdevelop.org webmaster
I've also integrated some fixes and extensions to it.
The install instructions are also updated.
Regards,
--
Amilcar Lucas
www.kdevelop.org webmaster
Re: Poll module for Phorum 5.1.x April 20, 2006 10:11AM |
Registered: 18 years ago Posts: 22 |
Hey, thanks for the roll-up!
Can't quite seem to get it to work, though. Running on windows, phorum 5.1.10, mysql v. 4.1.18 , apache 2.0.55, testing with both ie 6 and opera 8.5.
Here's what I've done so far... expanded the archive into (phorum)/mod/poll .
I added {POLLFORM} (etc) to posting_messageform.tpl . Here's a copy of where I put it (just to make sure I didn't put it somewhere blatently stupid...):
{! Body ===================================================================== }
{IF POLLFORM}{POLLFORM}{/IF}
{HOOK tpl_editor_before_textarea}
I also added the custom profile field mod_poll, making sure not to check disable html. (Left field length at 255.)
In any case, I turned on the mod, and whenever I go to write a new message, I get at the top of the posting page:
Notice: Undefined index: addpoll in (phorum path)\mods\poll\poll.php on line 34
Notice: Undefined index: addpoll in (phorum path)\mods\poll\poll.php on line 72
Any clues on where I've headed down the wrong path? Thanks!
Can't quite seem to get it to work, though. Running on windows, phorum 5.1.10, mysql v. 4.1.18 , apache 2.0.55, testing with both ie 6 and opera 8.5.
Here's what I've done so far... expanded the archive into (phorum)/mod/poll .
I added {POLLFORM} (etc) to posting_messageform.tpl . Here's a copy of where I put it (just to make sure I didn't put it somewhere blatently stupid...):
{! Body ===================================================================== }
{IF POLLFORM}{POLLFORM}{/IF}
{HOOK tpl_editor_before_textarea}
I also added the custom profile field mod_poll, making sure not to check disable html. (Left field length at 255.)
In any case, I turned on the mod, and whenever I go to write a new message, I get at the top of the posting page:
Notice: Undefined index: addpoll in (phorum path)\mods\poll\poll.php on line 34
Notice: Undefined index: addpoll in (phorum path)\mods\poll\poll.php on line 72
Any clues on where I've headed down the wrong path? Thanks!
Re: Poll module for Phorum 5.1.x April 20, 2006 11:00AM |
Registered: 20 years ago Posts: 126 |
To be 100% sure that it works, I've tested it with my production server:
[www.kdevelop.org]
And it worked fine it there:
-I can create a new poll
-I can vote
-I can't vote twice
-I can cancel my vote
-I can not vote after closing the thread
What PHP version do you have ?
--
Amilcar Lucas
www.kdevelop.org webmaster
[www.kdevelop.org]
And it worked fine it there:
-I can create a new poll
-I can vote
-I can't vote twice
-I can cancel my vote
-I can not vote after closing the thread
What PHP version do you have ?
--
Amilcar Lucas
www.kdevelop.org webmaster
Re: Poll module for Phorum 5.1.x April 20, 2006 11:12AM |
Registered: 18 years ago Posts: 22 |
Quote
amilcarpt
To be 100% sure that it works, I've tested it with my production server:
[www.kdevelop.org]
Oh, don't worry, I believe you! I just have a feeling that I'm missing a setting somewhere.
Quote
amilcarpt
What PHP version do you have ?
Dang, I was trying to remember to put all the pertinent info in the first post. Oh well.
I'm using PHP 5.0.4 .
Thanks!
Re: Poll module for Phorum 5.1.x April 20, 2006 12:20PM |
Admin Registered: 22 years ago Posts: 9,240 |
Re: Poll module for Phorum 5.1.x April 20, 2006 12:30PM |
Registered: 20 years ago Posts: 126 |
Re: Poll module for Phorum 5.1.x April 20, 2006 01:46PM |
Registered: 23 years ago Posts: 1,076 |
When you turn off notices the problem disappears...
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
[ch.php.net]
If you don't need them you can turn them off in php.ini
---
-=[ Panu ]=-
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
[ch.php.net]
If you don't need them you can turn them off in php.ini
---
-=[ Panu ]=-
Re: Poll module for Phorum 5.1.x April 20, 2006 04:58PM |
Admin Registered: 20 years ago Posts: 8,532 |
A little note:
This is merely a work-around for making PHP shut up about uninitialized stuff. It's best to write software with E_ALL for error_reporting and display_errors enabled, so PHP is very strict about the code. It's a great way of preventing common mistakes (like typo's in variable names). On a production system, display_errors should be disabled and error_reporting can be set to a less strict level.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
This is merely a work-around for making PHP shut up about uninitialized stuff. It's best to write software with E_ALL for error_reporting and display_errors enabled, so PHP is very strict about the code. It's a great way of preventing common mistakes (like typo's in variable names). On a production system, display_errors should be disabled and error_reporting can be set to a less strict level.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Poll module for Phorum 5.1.x April 20, 2006 05:27PM |
Registered: 18 years ago Posts: 22 |
Quote
TheKorn
Hey, thanks for the roll-up!
Can't quite seem to get it to work, though. Running on windows, phorum 5.1.10, mysql v. 4.1.18 , apache 2.0.55, testing with both ie 6 and opera 8.5.
In any case, I turned on the mod, and whenever I go to write a new message, I get at the top of the posting page:
Notice: Undefined index: addpoll in (phorum path)\mods\poll\poll.php on line 34
Notice: Undefined index: addpoll in (phorum path)\mods\poll\poll.php on line 72
After a bit of playing, I figured out what my problem was. I didn't intelligently follow step three of the readme. Still doesn't eliminate PHP complaining about undefined indexes, but I'm able to get polls to run correctly.
Minor enhancements June 04, 2006 07:57PM |
Registered: 18 years ago Posts: 14 |
Hi,
I found it a bit annoying how clicking the Vote button or See results on the preview page just zaps your post into nothingness. I made a little fix for this so that those buttons do nothing in a preview. I also added some classes so you have better control over the appearance. (This also requires adding a class to css.tpl.)
In case anyone else finds these changes useful, I'm posting my modified poll.php. Just check the code for a comment:
// RFBP:
To see where I made the changes.
Cheers,
Kevin
I found it a bit annoying how clicking the Vote button or See results on the preview page just zaps your post into nothingness. I made a little fix for this so that those buttons do nothing in a preview. I also added some classes so you have better control over the appearance. (This also requires adding a class to css.tpl.)
In case anyone else finds these changes useful, I'm posting my modified poll.php. Just check the code for a comment:
// RFBP:
To see where I made the changes.
Cheers,
Kevin
Sorry, only registered users may post in this forum.