76

Re: pun_poll

bump x 3

77

Re: pun_poll

Huuuze wrote:

bump x 3

Huuze, isn't it very strange that no one is replying! can't we expect at least a reply whether the requested feature is going to be considered or not! Any answer is helpful! bcoz if they say 'no', then I will do it using jQuery from external extension rather than modifying poll extension!

please answer!

Thanks

78

Re: pun_poll

@Slavok In addition to my request to have a collapsible poll, I'd also like to see the ability to select multiple answers in a poll.  Many of my users will ask questions like, "Of the 5 choices, which 3 do you prefer?"

79

Re: pun_poll

Huuuze wrote:

request to have a collapsible poll

80

Re: pun_poll

Unfortunately, nobody develop this extension now. We will resolve the problem with Postgresql in the next 2-3 days. As for the collapsible poll, we will implement it in the next extension versions. Unfortunately, I can't say exactly when a new version will be released.

81

Re: pun_poll

Pun_poll 1.1.11 is available for download!
In this version PostgreSQL compatibility problem has been resolved. 
Download links:

Feel free to report more bugs

Re: pun_poll

New suggestion: add info for admin to see who have voted.

add in functions.php:

function show_voted($topic_id) {
    global $forum_user,$forum_db,$lang_pun_poll,$lang_topic,$forum_url;
    
    /* select votes */
    $query = array(
        'SELECT'    => 'user_id, answer_id',
        'FROM'        => 'voting',
        'WHERE'        => 'topic_id='.$topic_id
    );
    $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
    while($row = $forum_db->fetch_assoc($result))
        $votes[$row['user_id']] = $row['answer_id'];
    
    /* select answer string of votes */
    $answers_str = implode(',',$votes);

    if(!empty($answers_str)) {
        $query = array(
            'SELECT'    => 'id,answer',
            'FROM'        => 'answers',
            'WHERE'        => 'id in('.$answers_str.')'
        );

        $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
        while($row = $forum_db->fetch_assoc($result))
            $answers[$row['id']] = $row['answer'];
            
        /* select user names */
        $ids = implode(',',array_keys($votes));
        $query = array(
            'SELECT'    => 'id,username,num_posts',
            'FROM'        => 'users',
            'WHERE'        => 'id in ('.$ids.')'
        );
        $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
        while($row = $forum_db->fetch_assoc($result)) {
            $names[$row['id']]['name'] = $row['username'];
            $names[$row['id']]['posts'] = $row['num_posts'];
        }
        
        $return = array();
        foreach($votes as $id=>$answ_id)
            $return[] = '<a href="'.forum_link($forum_url['user'], $id).'" title="'.$lang_pun_poll['Voting answer'].': '.forum_htmlencode($answers[$answ_id]).'; '.$lang_topic['Posts info'].' '.$names[$id]['posts'].'">'.forum_htmlencode($names[$id]['name']).'</a>';
        
        return implode(', ',$return);
    } else return $lang_pun_poll['No voters'];
}

langfile add in end:

'No voters'                        =>  'No voters',

manifest.xml from line 777 to 778 add

if($forum_user['is_admmod']) {
                    require $ext_info['path'].'/functions.php';
                    $main_elements['<!-- forum_main_pagepost_top -->'] .= '<div class="ct-box info-box"><p>'.show_voted($id).'</p></div>';
                }

83

Re: pun_poll

bump x 4 ...any traction on collapsing the polls by default?

84

Re: pun_poll

Huuuze wrote:

bump x 4 ...any traction on collapsing the polls by default?

Im not sure if I can help but I took the spoiler code from one of the bbcode extensions and put it in pun_poll, for the same reason as you stated before.

On line 8:

    <div id="spoiler-container" class="mf-box checkbox" style="border:0px solid black;">    
    <span id="spoiler-button" onClick="if(this.innerHTML=='Create Poll'){this.parentNode.getElementsByTagName('div')[0].style.display = 'block';this.innerHTML='Hide';} else {this.parentNode.getElementsByTagName('div')[0].style.display = 'none';this.innerHTML='Create Poll';}">Create Poll</span>
    <div id="spoiler-hidebox">
<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">

and on line 134:

</div></div>

I've made a few more fixes for myself and could refine them to fit in the official extensions if theres an interest in it.

85

Re: pun_poll

Using the code below, it's not collapsed by default. It only collapses/expands if I click the "Create Poll/Hide".  What should I do to tweak it?

Cleric wrote:
Huuuze wrote:

bump x 4 ...any traction on collapsing the polls by default?

Im not sure if I can help but I took the spoiler code from one of the bbcode extensions and put it in pun_poll, for the same reason as you stated before.

On line 8:

    <div id="spoiler-container" class="mf-box checkbox" style="border:0px solid black;">    
    <span id="spoiler-button" onClick="if(this.innerHTML=='Create Poll'){this.parentNode.getElementsByTagName('div')[0].style.display = 'block';this.innerHTML='Hide';} else {this.parentNode.getElementsByTagName('div')[0].style.display = 'none';this.innerHTML='Create Poll';}">Create Poll</span>
    <div id="spoiler-hidebox">
<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">

and on line 134:

</div></div>

I've made a few more fixes for myself and could refine them to fit in the official extensions if theres an interest in it.

86 (edited by Nonante 2011-01-10 22:41)

Re: pun_poll

Hi,

Foremost, thanks you !

Bug report : Multiple twices " in FORUM_ROOT.'extensions/pun_poll/functions.php';
---------------

line 9 :

<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"">

line 37 :

<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"">

line 81 :

<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"">

line 94 :

<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"">

Edit: I just found another bug, I'm looking to rectify that immediately

<th> misplaced in <table>. Creating <tr> and putting <th> inside it.


Reedit :

If you want ...
I made the change in the file, i have corrected too manifest and i have changed : version to 1.1.12, maxtestedon to 1.3.4.
I uploaded the edited file here : http://punbb.informer.com/wiki/_media/p … n_poll.zip


Regards.

I don't speak English, but Google Translate is doing pretty good.

87

Re: pun_poll

Bump ... anyone?

88

Re: pun_poll

include some poll id on index ?

Re: pun_poll

Updated pun_poll for PunBB 1.4.

Demo
http://www.punbb.org.ua/punbb/topic/105/

Screens
http://pic.lg.ua/x/1/17f695/sm_d53bdf31.pnghttp://pic.lg.ua/x/1/7fc621/sm_db4ff15f.png

90

Re: pun_poll

Any chance to have these bars in a future 1.3 version release?

91

Re: pun_poll

Bug

When I create a poll as a user, I can edit the questions afterwards as admin but, when I try to change the post text as admin  and click Submit, the text is back as it was.

It works when the user himself edit his own post. It makes it impossible for an admin to moderate a post with a poll.

Re: pun_poll

No, in version for PunBB 1.3 only bugfixes.

Re: pun_poll

tomi0, please try this updated version of pun poll — pun_poll-1.1.11.zip

94 (edited by toni0 2011-08-04 17:39)

Re: pun_poll

1.1.11 is already the version I use, is that zip a modified one?

If yes, I can I update without uninstalling my previous pun_poll version (don't want to lose my existing polls smile)

Thanks

Re: pun_poll

Strange, but use pun_poll-1.1.12.zip

96

Re: pun_poll

Ready to test but...
How can I update it without deleting my current polls? Any procedure to update extensions?

Re: pun_poll

Safe method

  1. Disable pun_poll on extensions page.

  2. Remove or move current pun_poll folder from extensions dir.

  3. Copy new pun_poll to extension dir.

  4. Update pun_poll on extensions page.

  5. Enable pun_poll on extensions page.

98

Re: pun_poll

Upgraded, tested, and approved.

I confirm the bug is fixed, Admins and Moderators can now edit posts containing Poll.

Thank you for your great support dimka

99

Re: pun_poll

I've problems starting a poll with extension version v2.3. My PunBB version is 1.4.1. The installation of the poll extension worked fine but if I want to start a new poll there is just the text "Show poll block" without a checkbox or place to add text under my thread window. Can anyone give me a hint?

Screenshot: http://imageshack.us/photo/my-images/82 … oblem.jpg/

I got the extension from punbb.informer.com/extensions/1.4/pun_poll/pun_poll.tgz
Is this the latest and correct version?

thanks and regards,
magmer

100

Re: pun_poll

Click to "Show poll block"