Re: Easy Poll - 1.1.3
got it.. just that the poll being refered to as topic :-) thats probably why i missed it.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Easy Poll - 1.1.3
got it.. just that the poll being refered to as topic :-) thats probably why i missed it.
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
@Feedback: I installed 1.1.2 with a fresh PunBB 1.2.6 two days ago and it works fine (example).
It works for me too ..
Are you upgrade or you are install a fresh one?
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
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
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 SCREENSHOTRegards,
windup
I think there is no problem
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.
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.
windup, are you sure you ran install_mod.php, also what database type are you using?
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)
It would be very nice, for the FAR FUTURE, to "create" mods like Nucleus ... people who use Nucleus will understand
But Mediator, great stuff, really.
Hello, thank you for this interesting plug
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
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.
Yes
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.
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.
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.
Yeah, but what did you hack? I have the same prob, and i'm not the greatest php-programer :s
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.
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']);
has someone make sure it works?
Seems to work on my site: RSS.
There's at least one poll in there.
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 Here is the site if u wanna have a look: http://stureplan.mine.nu/punbb
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
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>
How do I make my poll look like this:
For now my poll look like this...
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Easy Poll - 1.1.3
Powered by PunBB, supported by Informer Technologies, Inc.