Re: PunPoll v1.2.3
Chacmool where i can download the your mod?
PunRes is not working Plzz help
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → PunPoll v1.2.3
Chacmool where i can download the your mod?
PunRes is not working Plzz help
Chacmool where i can download the your mod?
PunRes is not working :( Plzz help
Download it from this page instead.
Quick note - punpoll only works with mysql. Don't use this is you are using postgres. I'm looking forward to this being DB independent as I'll install it right away.
Patch available to add pgsql to PunPoll.
pgregg: Good initiative :)
Patch available to add pgsql to PunPoll.
Great!
I'm changing my code right away. I've also mailed you regarding the diff-file.
Thanks alot!
Hey Chacmool! I'm a fan of your work...
I've installed PunPoll v1.2.4, and it works a treat: http://shuttertalk.com
However, just some feedback - when editing topics, the poll section should be hidden unless there is already a poll on the topic. I suggest maybe making it like the new post form -- where there's a checkbox to show the poll section or not, and then make it checked by default if there is a poll on the topic already.
What do you think?
Hey Chacmool! I'm a fan of your work...
I've installed PunPoll v1.2.4, and it works a treat: http://shuttertalk.com
However, just some feedback - when editing topics, the poll section should be hidden unless there is already a poll on the topic. I suggest maybe making it like the new post form -- where there's a checkbox to show the poll section or not, and then make it checked by default if there is a poll on the topic already.
What do you think?
Hehe, great you like and use it! :D
I agree on the edit-post-part, I'll probably fix this until the next release. Thanks for the feedback.
Done!
Open: edit.php
Find:
if (isset($checkboxes))
$checkboxes = implode('<br>'."ntttt", $checkboxes);
After add:
require $pun_root.'lang/'.$language.'/'.$language.'_poll.php';
if(($pun_config['o_polls'] || $cur_user['status'] > 0) // Polls allowed OR user is moderator or admin
&& (!$cookie['is_guest'] || $pun_config['p_guests_poll'])){ // AND NOT guest OR Guest allowed to post polls
$checkboxes .= "\n\t\t\t\t".'<br><input type="checkbox" name="showpoll" onClick="change(this);" tabindex="'.($cur_index++).'"> '.$lang_poll['EditPostPoll'];
}
Download the new version and replace form_edit.php. If you've made changes to
your form_edit.php, I can show you what's changed. (You ONLY need
to follow the steps abovve and replace this file).
Is it okay if you must press the checkbox even if there is a new poll? (It makes it alot easier this way: it does not require me to do another query or move some code outside the included files.)
Thanks dude! Much better!
I think you're missing 'EditPostPoll' in your lang file, but that's easily fixed.
Also in the code you posted, there are some missing escape slashes in $checkboxes .= "\n\t\t\t\t"
But it's ok in your readme.txt file.
Thanks! I'm a happier man
Jules
Oh one more thing...
I think in edit_save.php, it's missing:
global $pun_root, $language;
require $pun_root.'lang/'.$language.'/'.$language.'_poll.php';
I think you're missing 'EditPostPoll' in your lang file, but that's easily fixed.
Yes I do :) Forgot to colpy the lang-file from my test-forum to the release-dir. Thanks.
Oh one more thing...
I think in edit_save.php, it's missing:
global $pun_root, $language; require $pun_root.'lang/'.$language.'/'.$language.'_poll.php';
No, it's not needed in edit_save.php. It's just database-stuff, so there's no language-file needed there.
Oh wihtout it, the error messages (no question / less than 2 answers) didn't show up. it just displayed a blank message box!
Oh wihtout it, the error messages (no question / less than 2 answers) didn't show up. it just displayed a blank message box! :)
Yeah, you're right :) I'll change it.
And I saw the "delete"-comment in another topic here, I'll look at it right away.
Yeah, was just about to post that one about the delete topic... i think it's when the user is a guest / not logged in. When you log in as another user, then the "delete" disappears.
Done!
I've uploaded PunPoll v1.2.6 to the directory. Just replace ./punbb/include/punpoll/viewtopic.php with the corresponding file in the zip-package and It should work fine... hopefully.
Yeah, was just about to post that one about the delete topic... i think it's when the user is a guest / not logged in. When you log in as another user, then the "delete" disappears.
True. Added a check so that the user is logged in too.
Just change line 51 (might differ for different versions) in include/punpoll/viewtopic.php:
<?php if($is_admmod || (!$cookie['is_guest'] && $cur_user['username'] == $poster)){ ?>
I got an error during install. Should I ignore it?
An error was encountered
File: /home/smyrnaky/public_html/punbb/upload/install_mod.php
Line: 40
PunBB reported: Unable to add column poll to table ungdom_topics
Database reported: Duplicate column name 'poll' (Errno: 1060)
Perhaps it is a good idea to incorporate check for earlier installations in your install script. )
Hi Chacmool, thanks for the fix - it appears to be ok now.
I was thinking about this over the weekend - do you think it's possible to allow guests to vote as well? It'll be hard to prevent people from voting twice I know...
What do you think?
Yeah, it's possible. But I don't like it, so I've made the mod so they can't :D
There's a couple of solutions to the vote problem then. 1: Allowing one vite per IP-address, or 2: Set a cookie when someone votes. Both have their problems, but it will defenately work yes. Don't know how much of the code that must be altered though.
Btw. Another admin in "my" forum has a problem with posting a poll. He gets:
Felaktig HTTP_REFERER. Du refererades till denna sida från en icke-auktoriserad källa. Var god försök igen. Om problemet kvarstår kontrollera så att 'Base URL' i Admin/Options är korrekt och att du besöker forumet genom att navigera till denna URL.
sorry for the suedish )
Does this sound familiar?
Anawayz, I've been trying to make a dummy admin and even that didn't give me a err-msg like this. Funny thing..
I have told him that he might try to delete his cookie (so he can get a new and fresh one next time) since I've made a few mods on the forum so it could be that the cookie he has is obsolete. Other than that, I've run out of options...
Could someone please shed some light on this?
Looking at the language-files I've located the corresponding english error-msg in en_common.php:
'Bad referer' => 'Bad HTTP_REFERER. You were referred to this page from an unauthorized source. Please go back
and try again. If the problem persists please make sure that \'Base URL\' is correctly set in Admin/Options and
that you are visiting the forum by navigating to that URL.',
See this topic regarding the HTTP_REFERER-error.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → PunPoll v1.2.3
Powered by PunBB, supported by Informer Technologies, Inc.