What I would like is for a list of users who participated to appear right below the results of the poll.  It needn't say how they responded, just that they did respond.  In my polls I get a lot of people who post a response to the poll in the topic and I never know if they also submited an answer in the poll itself.  Being able to see who responded would solve that.

Any thoughts on how to do this?

I don't allow guests in my forum at all, so I want to let anyone post to the calendar.  I'm guessing I just need to remove this line.  Is that right?

if(($pun_user['group_id'] == PUN_MOD && $CFG_mod_add=='yes') or ($pun_user['group_id'] == PUN_MEMBER && $CFG_user_add=='yes') or ($pun_user['group_id'] == PUN_ADMIN))

Which is right before this line

echo '<br /><div class="box"><p> <a href="calendar.php?action=add">'.$lang_calendar['Add_event'].'</a> | <a href="calendar.php?action=edit">'.$lang_calendar['Edit_event'].'</a></p></div>';

I just looked through this topc and didn't find this, but it is a long topic so forgive me if this has been covered:

I have several user groups on my forum and only "members" and "moderators" can add events.  How do I allow all groups to add events?

Nevermind.  I didn't realize that it had to be set for each group in each forum.  I have seven user groups and seventeen forums.  That was a pain, but they are all reset now.

I have this mod up and working, but a user just pointed out an issue.  He tried to upload a very large file and it didn't work.  I tried it and it works fine.  I figured it was his error, but after logging in as a regular user, I can't upload the file either.

So, I'm able to do it as an admin, but not as a user.  Permission are set for the forum, so it isn't that.  I can select the file, it takes a while for the post to happen so it is uploading the file, but the post appears with no attachment.

As far as I can tell the file size limit isn't set by the user type (admin vs. member).  Am I missing something?

6

(2 replies, posted in PunBB 1.2 troubleshooting)

OK this is weird.  I had this problem earlier today and used the "quick post" to post something.  I hoped it just wouldn't happen again.  Then I got an email from a user having the same problem and asking me to post something with an attachment.  I tried and had the problem.  I got around it using the Quick post.  After starting this topic I went back to my forum and can not recreate the problem.  It is working fine.

Any thoughts?

7

(2 replies, posted in PunBB 1.2 troubleshooting)

A problem just cropped up.  In my forum, the quick post is working, but the regular post form is sometimes not working.  After typing a message and hitting "Submit" the form just reloads without posting anything to the forum.  The weird thing is that the problem is intermittent and just started happening.

I am having a small but annoying issue.  First let me say that I added a small bit to my forum so that if you aren't logged in you get a page telling you that you must log in with a link to log in. 

When you go to the forum the new page displays just fine and if you click on the forum link you go right there, but if you click on the link on the news item to go straight to that topic you are redirected to the page saying that you must log in.  If you log in again you go straight to the news item topic.

After logging in the second time I searched my cookies and see that there is a cookie for username@domain and another cookie for username@www.domain.  Any idea why it is doing this?

If it makes a difference I recently changed the domain name.

9

(1 replies, posted in General discussion)

I am curious if anyone has the same issue I have and how they may have solved it.  My organization has various kinds of members: members, board members, officers, instructors of various types, etc.  I have forums that only certain members are allowed into.  The problem is that someone might be a member of more than one type.  In punbb you have to assign a single user group to someone instead of being a matrix where you assign multiple groups to a single person.

Any thoughts on this?

I have a dumb question about that email digests mod, but I can't find the discussion topic for that mod.  Is there one?

That mod looks perfect.  But... I've never done a cron job.  I have the capability and it looks like I can copy and paste from the readme file, but it makes me nervous.

That would be great.  My forum is a ski related one, so there isn't much activity until it starts snowing giving me some time.

My users are requesting this.  Actually they are requesting to get an email whenever there is any new post of any kind, to which I say, "you want a listserv not a forum."  Anyway, this would work for those who want that.  They could just subscribe to every forum and every topic (can you imagine?).

So, can you remember how you implemented it?

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.

I added the polling mod, then your attachment mod, then the miniportal (a news page and changed index.php to forum.php), then the calendar mod.  Then I added code to index.php, forum.php, viewforum.php, viewtopic.php, and calendar.php to check that the user wasn't a guest.  If they are a guest they can't view those pages.  It doesn't seem that any of those would do this, but something happened.

Here is the weird thing about the admin not being able to add attachments:  I added the mod and couldn't add files.  I logged on as a regular user and could add attachments.  I logged back in as admin and could add attachments.  Everything is fine.  I added the Calendar mod and did some other small changes.  Now the admin can't attach files.  I don't see what I could have done that would have changed this.

So, this mod is working great for me with one exception.  The administrator (me) can't attach files.  Is that normal?

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

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">

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">

To be clear, I do not use the global announcement mod.  I just wasn't sure if that piece of code I saw was just for if you had it or not.

And if you were asking the version of mysql, it is 4.0.20

I am using mysql.  I checked a few times so I think I am following the readme correctly, in fact I am pretty sure that I did but you never know.  I also saw in another place code posted to replace one of the sections and I tried that and get the same result.  I think that was for if you had the global announcement mod, but wasn't clear so I thought I would try it.   Here is my viewforum.php:

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';


if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);


$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id < 1)
    message($lang_common['Bad request']);

// Load the viewforum.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';

// Load poll language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/polls.php';

// Fetch some info about the forum
$result = $db->query('SELECT f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, fp.post_topics FROM '.$db->prefix.'forums AS f 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) AND f.id='.$id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
    message($lang_common['Bad request']);

$cur_forum = $db->fetch_assoc($result);

// Is this a redirect forum? In that case, redirect!
if ($cur_forum['redirect_url'] != '')
{
    header('Location: '.$cur_forum['redirect_url']);
    exit;
}

// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = array();
if ($cur_forum['moderators'] != '')
    $mods_array = unserialize($cur_forum['moderators']);

$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false;

// 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> <BR /> <a href="poll.php?fid='.$id.'">'.$lang_polls['New poll'].'</a></p>'."\n";
else
    $post_link = '';


// Determine the topic offset (based on $_GET['p'])
$num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']);

$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];
$start_from = $pun_user['disp_topics'] * ($p - 1);

// Generate paging links
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewforum.php?id='.$id);


$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_forum['forum_name']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

?>
<div class="linkst">
    <div class="inbox">
        <p class="pagelink conl"><?php echo $paging_links ?></p>
<?php echo $post_link ?>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
        <div class="clearer"></div>
    </div>
</div>

<div id="vf" class="blocktable">
    <h2><span><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></span></h2>
    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></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

// 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'];
}
else
{
    // With "the dot"
    switch ($db_type)
    {
        case 'mysql':
        case 'mysqli':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

        case 'sqlite':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id 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'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC';
            break;

        default:
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question, p.poster_id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

    }
}

$result = $db->query($sql) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

// 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['question'] != '') {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['question'] = censor_words($cur_topic['question']);
        
        
            if ($cur_topic['moved_to'] != 0)
                $subject = $lang_forum['Moved'].': '.$lang_polls['Poll'].': <a href="viewpoll.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['question']).'</a><br /> <span class="byuser"><b>'.pun_htmlspecialchars($cur_topic['subject']).'</b> '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            else if ($cur_topic['closed'] == '0')
                $subject = $lang_polls['Poll'].': <a href="viewpoll.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['question']).'</a><br \> <span class="byuser"><b>'.pun_htmlspecialchars($cur_topic['subject']).'</b> '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            else
            {
                $subject = $lang_polls['Poll'].': <a href="viewpoll.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['question']).'</a><br /> <span class="byuser"><b>'.pun_htmlspecialchars($cur_topic['subject']).'</b> '.$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="viewpoll.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 (!$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;
            }
        } else {
            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 (!$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>

<div class="linksb">
    <div class="inbox">
        <p class="pagelink conl"><?php echo $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewforum.php?id='.$id) ?></p>
<?php echo $post_link ?>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
        <div class="clearer"></div>
    </div>
</div>
<?php

$forum_id = $id;
$footer_style = 'viewforum';
require PUN_ROOT.'footer.php';

In case you want to take a look it is at http://www.bvtest.com/member/viewforum.php?id=8

And now that I look at it the poll isn't working at all.  When I create a poll, I then see it.  I choose and answer and I see the results, but when I go back to the forum I see that notice and then if I go back to the topic I don't see anything about the poll.  If I log in as another user, I don't see anything about the poll in the topic.

Suggestions?  There is also an extranious < above the footer.

Any suggestions.  I installed this mod and if there isn't a poll no problem, but if there is a poll in the forum then in viewforum I there is this notice:

Notice: Undefined index: question in /homepages/8/d123815915/htdocs/member/viewforum.php on line 158