coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: element059 on October 09, 2004, 03:06:50 AM

Title: Poll Causing Error on Coppermine
Post by: element059 on October 09, 2004, 03:06:50 AM
Hello,

When users click vote or results on my poll it creates an error with Coppermine. See here:

http://www.games-fusion.net/screens/themes/classic/template.php?vo=6

The page should be:

http://www.games-fusion.net/screens/index.php?cat=15

I don't understand why it is doing this as it works on all my other pages.

Many thanks!
Title: Re: Poll Causing Error on Coppermine
Post by: kegobeer on October 09, 2004, 03:55:48 AM
Have you looked at dovote.php to see what it's doing after a vote is cast?
Title: Re: Poll Causing Error on Coppermine
Post by: element059 on October 09, 2004, 04:18:53 AM
No but then again I don't know what dovote.php is ;)?
Title: Re: Poll Causing Error on Coppermine
Post by: kegobeer on October 09, 2004, 04:39:59 AM
Uhhh, ok.

dovote.php is a file that takes care of your voting system, at least that's what I gather from viewing your page's source code.  I don't know how it works - that's up to you to figure out, since it's on your website and all.
Title: Re: Poll Causing Error on Coppermine
Post by: element059 on October 09, 2004, 11:47:22 AM
Hello,

I thought you might kno since it doesnt do it on any of my other scripts I thought it might be a compatibility issue with coppermine!?
Title: Re: Poll Causing Error on Coppermine
Post by: kegobeer on October 09, 2004, 01:36:35 PM
Again, since I don't know what that file is or exactly what it does, I can't diagnose or fix the problem.  You have to look at the file and compare it with the files in Coppermine to see what's causing this problem.
Title: Re: Poll Causing Error on Coppermine
Post by: Joachim Müller on October 09, 2004, 03:35:36 PM
to clarify this: dovote.php is not a file that comes with coppermine, it has either been created by you or came with another application you have on your webserver. Since it's not a coppermine core file we (the coppermine dev team members) can't tell what it does or why it doesn't do what it is exoected to do.
If you think dovote.php actually is a coppermine file, then please let us know where you got coppermine from - it must then be a third party side...

Joachim
Title: Re: Poll Causing Error on Coppermine
Post by: element059 on October 09, 2004, 07:43:51 PM
Hello,

dovote.php is a voting system which I have been using for years, it has nothing to do with coppermine just to be clear :).

Here's what is in the code:

<?php

// detect file extension
$dotloc strrpos(__FILE__".");
$ext substr(__FILE__$dotloc+1, (strlen(__FILE__) - $dotloc));

include 
dirname(__FILE__)."/common.${ext}";
include 
dirname(__FILE__)."/classes/poll.${ext}";

$p = new Poll($pid);

$cookiename "symp".$p->tstamp;
if(isset(
$sympvotes[$cookiename])) {
  
$scookie1 $sympvotes[$cookiename]; 
} elseif(isset($
$cookiename)) {
  
$scookie1 = $$cookiename;
}

# tried to vote without selecting an option or option can't 
# be verified as valid or already voted.  attempt to just
# return them to the previous page.
if( (!empty($s_cookielog) && isset($scookie1)) ||
    !isset(
$cid) || !isset($p->options[$cid])) {
  
header("Location: $ref"); 
  exit();
}

if(!empty(
$s_cookielog)) {
  
$date time()+($s_blength 86400);
  
$sympvotes[$cookiename] = $cid;
  
setcookie("sympvotes"serialize($sympvotes), $date"/");
  
$p->inc_vote($cid); 
  
# do_redir for iis cookie+redir bug
  
do_redir("$ref"."$vostr");
} else {
  
$p->inc_vote($cid);
  
header("Location: $ref"."$vostr"); 
  exit();
}

?>


I am not a php programmer :) So if you can see what might be causing the problem please point it out!

Thank you!
Title: Re: Poll Causing Error on Coppermine
Post by: element059 on October 10, 2004, 11:56:28 PM
!Bump

Can anyone help me with this!?

Thank you!
Title: Re: Poll Causing Error on Coppermine
Post by: Joachim Müller on October 11, 2004, 05:34:19 AM
I guess you won't get support for third-party code on this board. I alread posted a link to the faq that explains the possible reasons why people don't answer: they either don't know an answer, or they don't want to look into it because of something you did. In your case, I guess it's for both reasons.

Joachim