Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Polls in posts
Goto page Previous  1, 2, 3, 4, 5  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Polls in posts
Author Message
Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
Installed again and works like a charm !
Fri Nov 16, 2007 3:02 pm View user's profile Send private message
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
Wow, seriously nice addition to this one FI-DD

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Fri Nov 16, 2007 11:28 pm View user's profile Send private message Visit poster's website AIM Address
eberswine



Joined: 26 Apr 2007
Posts: 159

Post Reply with quote
Cookie not remembering the ip's.
Voters can vote more than once???

This is Default installation.

??? What do ya think ???
Sun Mar 23, 2008 3:39 am View user's profile Send private message
KArkhon



Joined: 24 Jan 2007
Posts: 23
Location: Montenegro

Post Reply with quote
Doesnt seem to be working for me... I installed it, and it shows poll and everything perfectly, but when i click on Vote nothing happens ?
http://www.sfcentar.com/vijesti.php?id=174
Sat Mar 29, 2008 3:08 pm View user's profile Send private message
sidtheduck



Joined: 28 Mar 2008
Posts: 71

Post Reply with quote
KArkhon wrote:
Doesnt seem to be working for me... I installed it, and it shows poll and everything perfectly, but when i click on Vote nothing happens ?
http://www.sfcentar.com/vijesti.php?id=174
KArkhon,
Looking at your code it looks like your bbcode is converting the "i" counter in the poll javascript code to an "em" tag. I haven't dug that deep into the plugin, but I'm wondering if there is a code hook to keep the javascript from being translated to bbcode. The other option I can think of is to change the "i" counter to a different letter variable (for example:
Code:
for(var i = 0; i < radiocount; i++){
changes to:
Code:
for(var z = 0; z < radiocount; z++){

Sat Mar 29, 2008 5:17 pm View user's profile Send private message
KArkhon



Joined: 24 Jan 2007
Posts: 23
Location: Montenegro

Post Reply with quote
Works perfectly now, tnx alot man Smile
Sat Mar 29, 2008 11:14 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
Impressive 3 posts sidtheduck Smile

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Sun Mar 30, 2008 12:51 am View user's profile Send private message Visit poster's website AIM Address
sidtheduck



Joined: 28 Mar 2008
Posts: 71

Post Reply with quote
@KArkhon: Glad it's working for you!

@scottdallas: Thanks! I like to help out where I can! You all have a great community over here!
Sun Mar 30, 2008 4:47 pm View user's profile Send private message
eberswine



Joined: 26 Apr 2007
Posts: 159

Post Reply with quote
Oh, here is my front page poll... the cookie isn't setting for some reason people can vote more than once.

www.runmichigan.com
Sun Mar 30, 2008 6:50 pm View user's profile Send private message
sidtheduck



Joined: 28 Mar 2008
Posts: 71

Post Reply with quote
eberswine, it looks like the cookie is being set by the javascript, but is not being read correctly by the PHP again. Can you add the following bold code to the corresponding code in your polls-in-post.php?

else{
echo "<br/><br/><br/><h1>".$_COOKIE['poll_'.$row['id'].'_'.$post]."=".$row['id'].$post."</h1><br/><br/><br/>\n";
if($_COOKIE['poll_'.$row['id'].'_'.$post] == $row['id'].$post){
$output = str_replace($match[0], $poll_result, $output);
}
else{
$output = str_replace($match[0], $poll_form, $output);
}
}

It will look ugly for the moment, but it should print out "4261short=4261short". If it doesn't, there is a problem with PHP reading the cookie or how it structures it's output.
Sun Mar 30, 2008 8:00 pm View user's profile Send private message
eberswine



Joined: 26 Apr 2007
Posts: 159

Post Reply with quote
thanks sid, but unfortunately it doesn't change a thing.
I still have the poll active with the changed code from your request??
Mon Mar 31, 2008 12:13 am View user's profile Send private message
sidtheduck



Joined: 28 Mar 2008
Posts: 71

Post Reply with quote
eberswine, it's not meant to fix it. It is just supposed to gather some cookie information and output the variables that it finds. I'm trying to figure out *where* it is going wrong. Can you change the code and re-upload? Although, can you change the code to read:

else{
$output.= "<br/><br/><br/><h1>".$_COOKIE['poll_'.$row['id'].'_'.$post]."=".$row['id'].$post."</h1><br/><br/><br/>\n";
if($_COOKIE['poll_'.$row['id'].'_'.$post] == $row['id'].$post){
$output = str_replace($match[0], $poll_result, $output);
}
else{
$output = str_replace($match[0], $poll_form, $output);
}
}

instead of an echo statement.


Last edited by sidtheduck on Mon Mar 31, 2008 6:03 am; edited 1 time in total
Mon Mar 31, 2008 3:35 am View user's profile Send private message
eberswine



Joined: 26 Apr 2007
Posts: 159

Post Reply with quote
there was a big parse error. I believe it has to do with output, I don't have php 5, just 4.4.

????
Mon Mar 31, 2008 4:30 am View user's profile Send private message
sidtheduck



Joined: 28 Mar 2008
Posts: 71

Post Reply with quote
Holy forgot the dollar sign, Batman! I forgot the leading '$' for the variable! Curse these fumbling fingers! I fixed my post above. Sorry about that.
Mon Mar 31, 2008 6:04 am View user's profile Send private message
eberswine



Joined: 26 Apr 2007
Posts: 159

Post Reply with quote
Alright, changed the code.
nice catch.
Mon Mar 31, 2008 2:34 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.