TheTazDevil wrote: Well the Poll Mod works fine accept no Guests can Vote?
I want anyone to be able to Vote not just members ....
can that be fixed
Suede wrote: Any way you can think of offhand to state whether a Poll is expired or active in the forum listing?
Code: Select all
#
#-----[ OPEN ]---------------------------------------------
#
viewforum.php
#
#-----[ FIND ]---------------------------------------------
#
$topic_type .= $lang['Topic_Poll'] . ' ';
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length
FROM " . VOTE_DESC_TABLE . " vd
WHERE vd.topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain vote data for this topic", '', __LINE__, __FILE__, $sql);
}
if ( $vote_info = $db->sql_fetchrowset($result) )
{
$temp1 = ( ( $vote_info[0]['vote_length'] > 0 ) && ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ) ? '<img src="' . $images['folder_locked'] . '" width="16" height="17">' : '';
$topic_type .= $lang['Topic_Poll'] . $temp1 . ' ';
}
else
{
$topic_type .= $lang['Topic_Poll'] . ' ';
}
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------------------
#
# EoM
The End!
Can I integrate this Mod with Admin Voting Mod ? How?
Code: Select all
Open /posting.php
Find (only in the code if you have multivote) :
$sql = "SELECT vd.vote_id, vd.vote_max
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
AND vr.vote_option_id = $vote_option_id
GROUP BY vd.vote_id";
Before Add :
$vote_option_id_tmp = $vote_option_id;
Find (only in the code if you have admin voting) :
$sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip, , vote_cast)
VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip', $vote_option_id)";
Inline Find :
$vote_option_id
Inline Change to :
$vote_option_id_tmp
spin wrote: The admin voting mod really only changes 1 thing in the existing phpfiles. in posting.php it adds $vote_option_id to the VOTE_USERS_TABLE.
..............
This would be the quickfix, though I would suggest in a next release, if it comes, you use a different variable in your mod. But that would offcourse be up to you entirelly