Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Need multiple questions per poll

Aloittaja borish, joulukuu 10, 2013, 05:40:13 IP

« edellinen - seuraava »

borish

Hello,

I need a mod that allows more than one question per poll. There's a mod http://custom.simplemachines.org/mods/index.php?mod=1586 that seems to do just this, but it hasn't been updated since SMF 2.0 RC 4. I've installed this mod on SMF 2.0.6 using emulation mode, but creating a poll gives a database error null value in column "id_topic" violates not-null constraint. I use Postgresql 9.1 on Ubuntu 13.04. I assume that this mod doesn't work anymore for SMF 2.0.6 and I want to fix this. However, I haven't found any documentation on how polls work in SMF internally. Where should I start? Which fields are relevant for polls, what must be changed?

Arantor

The mod is not compatible with PostgreSQL. Most SMF mods aren't, really.

SMF's own PostgreSQL isn't that great, being honest, and realistically using MySQL will get you a better experience with SMF and its mods.
Holder of controversial views, all of which my own.


Oldiesmann

The problem is because they added a NOT NULL column without a default value.

Run these queries in phpPgAdmin to fix the issue:

ALTER TABLE smf_polls ALTER id_topic SET default 0;
UPDATE smf_polls SET id_topic = 0 WHERE id_topic IS NULL;


That should fix the issue, but as I haven't looked at the rest of the mod, there may be other areas where it will break (but I'll be happy to help you work around any other issues as well).
Michael Eshom
Christian Metal Fans

borish

The mod works with MySQL, no problmes so far. Thanks to Arantor Beeblebrox for pointing this out!

Advertisement: