151

Re: Easy Poll - 1.1.3

got it.. just that the poll being refered to as topic :-) thats probably why i missed it.

152

Re: Easy Poll - 1.1.3

Use PunBB 1.2.6.

I have installed 1.1.2
Made changes from readme.txt step by step.
But when I try to create poll I've got only "Question" input. No any options. why? What did I do wrong?

Regards,
windup

153

Re: Easy Poll - 1.1.3

@Feedback: I installed 1.1.2 with a fresh PunBB 1.2.6 two days ago and it works fine (example).

154

Re: Easy Poll - 1.1.3

It works for me too ..
Are you upgrade or you are install a fresh one?

155

Re: Easy Poll - 1.1.3

hi,
i use punbb 1.2.5
when i try to install EasyPoll(install_mod.php), i have this message:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/free.fr/b/1/igdijon/install_mod.php on line 101

156 (edited by windup 2005-07-13 13:17)

Re: Easy Poll - 1.1.3

bartolli wrote:

It works for me too ..
Are you upgrade or you are install a fresh one?

Upgraded pubb from 1.2.5 to 1.2.6 and try to install 1.1.2
It looks like I missed something. :-(

I've got only question form :-(
Look at my SCREENSHOT

Regards,
windup

157 (edited by bartolli 2005-07-13 18:41)

Re: Easy Poll - 1.1.3

windup wrote:
bartolli wrote:

It works for me too ..
Are you upgrade or you are install a fresh one?

Upgraded pubb from 1.2.5 to 1.2.6 and try to install 1.1.2
It looks like I missed something. :-(

I've got only question form :-(
Look at my SCREENSHOT

Regards,
windup

I think there is no problem smile
just go in Admin area / PlugIns / Vote and set the number of options you want avaliable for new polls...
Probably now is set to 0.

158 (edited by bartolli 2005-07-13 18:39)

Re: Easy Poll - 1.1.3

doubi wrote:

hi,
i use punbb 1.2.5
when i try to install EasyPoll(install_mod.php), i have this message:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/free.fr/b/1/igdijon/install_mod.php on line 101

Is the file install_mod.php modified?
If yes try to install with fresh copy.

159

Re: Easy Poll - 1.1.3

windup, are you sure you ran install_mod.php, also what database type are you using?

I enjoy pie :)

160

Re: Easy Poll - 1.1.3

1.1.3 released

Change Log

Fixed:
Multiselect yes/no polls would severly error when there were no votes
You were able to enter a space for an option and it would still find it semi valid
Problem with quotes - reported by wrwo 
Fixed a problem with the tab indexes of certain pages - reported by wrwo
Fixed a problem in the upgrade readme with some double coding - reported by Bulgaricus

Changed:


Added:
Nothing New

Adding:
Ability to prevent certain user groupgs from creating new polls - requested by Connorhd (POSTPONED)
I enjoy pie :)

161

Re: Easy Poll - 1.1.3

It would be very nice, for the FAR FUTURE, to "create" mods like Nucleus ... people who use Nucleus will understand smile

But Mediator, great stuff, really.

162 (edited by yannlog 2005-08-08 21:21)

Re: Easy Poll - 1.1.3

Hello, thank you for this interesting plug wink
However, is it possible to prevent members to post new polls (post only by admin).
This option is not available in the plugin options. Could you make this ?

You say

Ability to prevent certain user groupgs from creating new polls - requested by Connorhd (POSTPONED)

but it doesn't work using 1.2.5 sad

163

Re: Easy Poll - 1.1.3

how abt this?

// Can we or can we not post new topics?
if (($cur_forum['post_topics'] == '' && $pun_user['g_post_topics'] == '1') || $cur_forum['post_topics'] == '1' || $is_admmod)
    {
        $post_link = "\t\t".'<p class="postlink conr"><a href="post.php?fid='.$id.'">'.$lang_forum['Post topic']."</a>\n";
        if ($is_admmod) 
        { $post_link .= "\t\t".'<BR /><a href="poll.php?fid='.$id.'">'.$lang_polls['New poll'].'</a></p>'."\n";}
    }
else
    $post_link = '';

Ths should limit the post new poll to admin and the forum mod.

164

Re: Easy Poll - 1.1.3

Is EasyPoll verified to work with 1.2.7?

rgds

Si

165

Re: Easy Poll - 1.1.3

Yes

166 (edited by dmz 2005-10-04 17:42)

Re: Easy Poll - 1.1.3

BTW, this seems to be working just fine with 1.2.8.

Edit: one thing I'd like to see included in this at some point (or maybe someone has already hacked it) deals with using rss.php.  If I click the link in my rss feed, polls still direct me to viewtopic.php instead of viewpoll.php.  wink

Edit 2: af3's change above works just fine.  For some reason my file didn't save the first time; I put that code fix back in place and now everything is peachy.

167 (edited by Gnu 2005-10-04 14:47)

Re: Easy Poll - 1.1.3

dmz wrote:

Edit: one thing I'd like to see included in this at some point (or maybe someone has already hacked it) deals with using rss.php.  If I click the link in my rss feed, polls still direct me to viewtopic.php instead of viewpoll.php.  wink

Yeah, but what did you hack? I have the same prob, and i'm not the greatest php-programer :s

168

Re: Easy Poll - 1.1.3

The part you quoted me on above is the rss.php part, which I have not modified yet.  I was hoping someone else would do it for me because I'm lazy.  smile

169

Re: Easy Poll - 1.1.3

Gnu wrote:

Yeah, but what did you hack? I have the same prob, and i'm not the greatest php-programer :s

I'm not a PHP guy by any means, but I think this works.  Change the sql query to:

    SELECT p.id AS id, p.message AS message, p.posted AS postposted, t.subject AS subject, f.forum_name, c.cat_name, pls.id as pollid
    FROM ".$db->prefix."posts p
    LEFT JOIN ".$db->prefix."topics t 
    ON p.topic_id=t.id 
    left join ".$db->prefix."polls pls on pls.pollid=t.id
    INNER JOIN ".$db->prefix."forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN ".$db->prefix."categories AS c 
    ON f.cat_id = c.id
    LEFT JOIN ".$db->prefix."forum_perms AS fp

And change the line in function putPost to this:

    if ($cur['pollid'] == null)
        $link = $pun_config['o_base_url'].'/viewtopic.php?pid='.strval($cur['id']).'#'.strval($cur['id']);
    else
        $link = $pun_config['o_base_url'].'/viewpoll.php?pid='.strval($cur['id']).'#'.strval($cur['id']);

Re: Easy Poll - 1.1.3

has someone make sure it works?

Go Canada! - No matter what, except when Stephen Harper is Prime Minster!
NHL is back, GO TORONTO MAPLE LEAFS! even if they lose...
[Firefox Rules!] - [Amazing Race] - [My Site!]

171 (edited by dmz 2005-10-04 19:28)

Re: Easy Poll - 1.1.3

Seems to work on my site: RSS.

There's at least one poll in there.

172

Re: Easy Poll - 1.1.3

I use mod_active_topics.php to show the 4 latests posts on me frontpage of my site. What should i edit in it so it dont redirect me to viewtopic instead of showing me viewpoll..? Right now I can see the polls if i enter via the forum but if i go via mod_active_topics.php it only shows the post without the poll. Be gentle with me cuz iam new at this wink Here is the site if u wanna have a look: http://stureplan.mine.nu/punbb

173

Re: Easy Poll - 1.1.3

I plan to rewrite the mod soonish, in which I'll do something about making it easy to make the polls work with other mods, and the like

I enjoy pie :)

174

Re: Easy Poll - 1.1.3

Okey but it would be awesome if you could show me what to edit in mod_active_topics.php I can paste the code maybe it isnt that hard?

<?php

$ak_limit = 4; // change this to the number of active topics you want to display.

$result = $db->query('
    SELECT t.* 
    FROM '.$db->prefix.'topics AS t 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN '.$db->prefix.'forum_perms AS fp 
    ON (
        fp.forum_id=f.id 
        AND fp.group_id='.$pun_user['g_id'].'
    ) 
    WHERE (
        fp.read_forum IS NULL 
        OR fp.read_forum=1
    ) 
    ORDER BY t.last_post DESC
    LIMIT '.$ak_limit
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';

?>
<div id="vf" class="blocktable">
        <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col"><?php echo $lang_common['::. Active posts'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php
// If there are topics in this forum.
if ($db->num_rows($result))
{
    while ($cur_topic = $db->fetch_assoc($result))
    {
        $icon_text = $lang_common['Normal icon'];
        $item_status = '';
        $icon_type = 'icon';

        if ($cur_topic['moved_to'] == null)
            $last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
        else
            $last_post = ' ';

        if ($pun_config['o_censoring'] == '1')
            $cur_topic['subject'] = censor_words($cur_topic['subject']);

        if ($cur_topic['moved_to'] != 0)
            $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
        else if ($cur_topic['closed'] == '0')
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
        else
        {
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }

        if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
        {
            $icon_text .= ' '.$lang_common['New icon'];
            $item_status .= ' inew';
            $icon_type = 'icon inew';
            $subject = '<strong>'.$subject.'</strong>';
            $subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
        }
        else
            $subject_new_posts = null;

        // Should we display the dot or not? :)
        if (1 == 0 && !$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
        {
            if ($cur_topic['has_posted'] == $pun_user['id'])
                $subject = '<strong>·</strong> '.$subject;
            else
                $subject = '  '.$subject;
        }

        if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

        if ($num_pages_topic > 1)
            $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
        else
            $subject_multipage = null;

        // Should we show the "New posts" and/or the multipage links?
        if (!empty($subject_new_posts) || !empty($subject_multipage))
        {
            $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : '');
            $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
        }

?>
                <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
                    <td class="tcl">
                        <div class="intd">
                            <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
                            <div class="tclcon">
                                <?php echo $subject."\n" ?>
                            </div>
                        </div>
                    </td>
                    <td class="tc2"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
                    <td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td>
                    <td class="tcr"><?php echo $last_post ?></td>
                </tr>
<?php

    }
}
else
{

?>
                <tr>
                    <td class="tcl" colspan="4"><?php echo $lang_forum['Empty forum'] ?></td>
                </tr>
<?php

}

?>
            </tbody>
            </table>
        </div>
    </div>
</div>

175 (edited by FredrikK 2005-11-23 12:06)

Re: Easy Poll - 1.1.3

How do I make my poll look like this:

http://www.brunna.se/bilder/your_poll.JPG


For now my poll look like this... sad

http://www.brunna.se/bilder/my_poll.JPG

hej!