101

Re: Easy Poll - 1.1.3

Mediator wrote:

Edward: you either have another poll mod installed, or already installed Easy Poll

I had PunPoll which has table polls. So I tried to install Easy Poll but there was message that such table already exists, so I deleted it manually in PHPMyAdmin. But now I have got the error message which I quoted above sad

102

Re: Easy Poll - 1.1.3

I don't know if the problem is in the install script or in MySQL database?

103

Re: Easy Poll - 1.1.3

Ted: You missed a change in the readme smile The following outlines this

// Fetch list of topics to display on this page
if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
{
    // Without "the dot"
    $sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}

Accourding to the readme this should be

// Fetch list of topics to display on this page
if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
{
    // Without "the dot"
$sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to, question FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}

The steps in the readme are 9 and 10 incase you are wondering. That should fix everything up for you.

I enjoy pie :)

104

Re: Easy Poll - 1.1.3

Edward wrote:

I don't know if the problem is in the install script or in MySQL database?

The problem is with your database, the table 'topics' usually punbb_topics or such has an extra field 'question' to get the poll script to install correctly you will need to remove this.

I enjoy pie :)

105 (edited by ted 2005-04-22 01:24)

Re: Easy Poll - 1.1.3

Yes, that fixed it thank you very much.  I think what I did was to look at step nine and find that text and then copy from the readme step nine and paste it in the file.  So I replaced the text with the same thing.

Also thank you to Edward who helped me with something else in email.

I do have one other issue that I think is related to the poll mod, because it cropped up when I added the mod.  There is a < appearing right above the footer.  You can see it here:
http://www.bvtest.com/member/viewforum.php?id=8

I can't find the problem in the code, but I think it is appearing here in the output:

<<div id="brdfooter" class="block">
    <h2><span>Board footer</span></h2>
    <div class="box">
        <div class="inbox">

106

Re: Easy Poll - 1.1.3

Notice the extra < at the beginning of the <div> tag? Delete it wink

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

107

Re: Easy Poll - 1.1.3

I am think that is the problem and that is why I posted that.  But that is the html displaying the page.  That html is generated by the php code.  I have no idea what code is generating that.  I would imagine that it is one of the files associated with the poll mod.  So that would be either viewforum.php or footer.php which are the two I edited, or it one of the files included in the mod that I uploaded.  Based on where it is, I would assume I did something to the footer file, but I have no idea what.  I was hoping someone might have an idea.

Here is what I can find in the footer file that seems to be related:

// START SUBST - <pun_footer>
ob_start();

?>
<div id="brdfooter" class="block">
    <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
    <div class="box">
        <div class="inbox">

108 (edited by ted 2005-04-22 02:51)

Re: Easy Poll - 1.1.3

I got it fixed.  The problem was in the footer.

109

Re: Easy Poll - 1.1.3

I have got a question concerning the usage of Easy Poll.

When a new poll is created, is it a poll or a post or all together? I found (may be) bug. When you open the poll from the viewtopic it opens poll+topic. But when you open the poll from "Show new posts since last visit" it opens only the post without the poll ?!?

Why there are two titles (of the post and of the poll) in the viewtopic list?

110

Re: Easy Poll - 1.1.3

Well technically it could be a bug, but I am actually fine with the way that works out as I cannot see anyone reason why you would need to see the poll in show new posts. As for the two titles one is for the title of a discussion, the other is the actual poll question

I enjoy pie :)

111 (edited by Edward 2005-04-23 05:36)

Re: Easy Poll - 1.1.3

Because the poll is integrally connected to the post, and it is strange when I write in the post the description of the poll, and an frequent user enters the forum, opens only "Show new posts" and entering the post doesn not see the poll sad

112 (edited by Edward 2005-04-23 05:49)

Re: Easy Poll - 1.1.3

How can I change or moderate a poll?

In the topic table Easy Poll adds four columns: Poll, Question, Yes, No. What is the purpose of: Poll, Yes, No?

113

Re: Easy Poll - 1.1.3

Poll is the pollid, and Yes, No deal with the type

I enjoy pie :)

114

Re: Easy Poll - 1.1.3

Can anybody help me to make post and poll always displayed together?

115

Re: Easy Poll - 1.1.3

What are the columns in the database?  Or more specifically what is the id column?  I am setting up a web site for a small organization.  We will not allow guests or new registrations, it will be members only and we will use the poll for voting.  I want to write a query to identify who has voted and who has not.  I don't want to id how they voted, just whether they did or not.  But I'm confused by the id column in the polls table.

116

Re: Easy Poll - 1.1.3

$result = $db->query('SELECT voters FROM ' . $db->prefix . 'polls WHERE pollid=' . $id . '') or error('Unable to fetch poll info', __FILE__, __LINE__, $db->error());

$cur_poll = $db->fetch_assoc($result);
if (!empty($cur_poll['voters']))
   $voters = unserialize($cur_poll['voters']);
if (in_array($pun_user['id'], $voters))
   echo "User has voted";
I enjoy pie :)

117 (edited by Zeke 2005-05-01 01:32)

Re: Easy Poll - 1.1.3

Mediator wrote:

Well with Easy Poll installed you will need to change it to work with your mark as read in two places once for the poll topics and once for the regular topics.

Anyone care to expand on this?

??
hmm

EDIT: I figured it out! I love that I'm starting to be able to fumble around in php and not completely destroy it! big_smile

black robe and swill
I believe Anita Hill
judge will rot in hell
it's the song I hate, it's the song I hate

118

Re: Easy Poll - 1.1.3

K, I didn't completely figure it out roll

When I post in the poll topic, it marks it as read immediately. However whenever someone else posts in a poll topic, it stays red. Help?

black robe and swill
I believe Anita Hill
judge will rot in hell
it's the song I hate, it's the song I hate

119

Re: Easy Poll - 1.1.3

I get Bad HTTP_REFERER when trying to move a Poll. Using 1.2.5 and 1.1.0. Hmm..? hmm

// Gardell

120

Re: Easy Poll - 1.1.3

Gardell wrote:

I get Bad HTTP_REFERER when trying to move a Poll. Using 1.2.5 and 1.1.0. Hmm..? hmm

Hm, me too. Also using 1.2.5 & 1.1.0.

black robe and swill
I believe Anita Hill
judge will rot in hell
it's the song I hate, it's the song I hate

121

Re: Easy Poll - 1.1.3

1.1.1 has been released

Changes

Fixed:
Problem with moderating polls
Problem with the sql queries in the readme for compliance with the announcement mod

Changed:
Nothing

Added:
Nothing

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

122

Re: Easy Poll - 1.1.3

Mediator wrote:

1.1.1 has been released

Any chance you could help me figure out how to get this mod working 100% with my Mark Topics as Read mod?

black robe and swill
I believe Anita Hill
judge will rot in hell
it's the song I hate, it's the song I hate

123

Re: Easy Poll - 1.1.3

Where should i put moderatepoll.php ? because its not workin` sad

in the readme file i have this:

install_mod.php
vote.php
poll.php
viewpoll.php
lang/LANGUAGE/polls.php

124

Re: Easy Poll - 1.1.3

Still not good.
When I have moved a topic with the "Leave redirect topic(s)" checked, the redirectlink is just white with the english lang set. With swedish lang, the redirect works, but the poll doesnt show up. Just looks like a regular topic. But when I enter from the correct forum, into the topic, it looks like it should.

// Gardell

125

Re: Easy Poll - 1.1.3

Ah crap, my bad...anyways moderatepoll.php should go in the base dir, along with vote.php, poll.php, etc

I enjoy pie :)