Re: PunPoll v1.2.3

Chacmool where i can download the your mod?
PunRes is not working sad Plzz help

Re: PunPoll v1.2.3

Phricker wrote:

Chacmool where i can download the your mod?
PunRes is not working :( Plzz help

Download it from this page instead.

53

Re: PunPoll v1.2.3

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. smile

54 (edited by pgregg 2004-05-17 22:21)

Re: PunPoll v1.2.3

Patch available to add pgsql to PunPoll.

http://punres.cactuz.nu/projects/forum/ … .php?id=44

http://php.pgregg.com/PunPoll-v1.2.3_2- … h.diff.txt

Re: PunPoll v1.2.3

pgregg: Good initiative :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunPoll v1.2.3

Great!
I'm changing my code right away. I've also mailed you regarding the diff-file.

Thanks alot!

57 (edited by cuteseal 2004-06-09 06:57)

Re: PunPoll v1.2.3

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?

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: PunPoll v1.2.3

cuteseal wrote:

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.

Re: PunPoll v1.2.3

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).

Re: PunPoll v1.2.3

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.)

61 (edited by cuteseal 2004-06-10 01:23)

Re: PunPoll v1.2.3

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 big_smile
Jules

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: PunPoll v1.2.3

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';
Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: PunPoll v1.2.3

cuteseal wrote:

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.

cuteseal wrote:

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.

Re: PunPoll v1.2.3

Oh wihtout it, the error messages (no question / less than 2 answers) didn't show up.  it just displayed a blank message box! smile

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: PunPoll v1.2.3

cuteseal wrote:

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.

Re: PunPoll v1.2.3

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.

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: PunPoll v1.2.3

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.

Re: PunPoll v1.2.3

cuteseal wrote:

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)){ ?>

Re: PunPoll v1.2.3

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) 
No electrons were harmed in the creation of this post.
However, many were excited and some may have enjoyed the experience.

Re: PunPoll v1.2.3

Perhaps it is a good idea to incorporate check for earlier installations in your install script. yikes)

No electrons were harmed in the creation of this post.
However, many were excited and some may have enjoyed the experience.

Re: PunPoll v1.2.3

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? smile

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

Re: PunPoll v1.2.3

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.

73 (edited by Razmooze 2004-06-18 16:24)

Re: PunPoll v1.2.3

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 yikes)

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?

No electrons were harmed in the creation of this post.
However, many were excited and some may have enjoyed the experience.

Re: PunPoll v1.2.3

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.',
No electrons were harmed in the creation of this post.
However, many were excited and some may have enjoyed the experience.

Re: PunPoll v1.2.3

See this topic regarding the HTTP_REFERER-error.

"Programming is like sex: one mistake and you have to support it for the rest of your life."