Hi frekel, I understand you may not have answered my post as my problem is fixed in the next version. But as with clarice393 I have a competition running already.
Could you advise if there is a fix I could apply just now until my current contest ends? I have many entries but people can only view/vote on the first 9.
Plugin Author
frekel
(@frekel)
Can you tell me which version you are using??
if version 1.5.4 change the following
around line 283:
$scrolling = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,'recent');
to
$scrolling = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,'recent','refresh');
and add around line 412:
elseif ($base_url == 'refresh')
{
$base_url = 'wp-content/plugins/wp-photocontest/view.php?post_id='.$post_id.'&order='.$order;
}
Greets,
Frank
ok I managed to find this line of code:
$scrolling = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,’recent’,’refresh’);
as above in ‘wp-photocontest.class.php’. So I changed it to:
$scrolling = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,’recent’,’refresh’);
however ‘wp-photocontest.class.php’ does not have 412 lines. could you advise where to add:
elseif ($base_url == ‘refresh’)
{
$base_url = ‘wp-content/plugins/wp-photocontest/view.php?post_id=’.$post_id.’&order=’.$order;
}
adding it to the end of ‘wp-photocontest.class.php’ takes my whole site offline. thank you.
Plugin Author
frekel
(@frekel)
What version are you using??
sorry forgot to say it was version 1.5.4 I am using, thank you
Plugin Author
frekel
(@frekel)
It should have more lines…
But look for the function:
function get_page_scrolling
change:
if ($base_url == 'admin')
{
$base_url = '?page=wp-photocontest/photocontest-manager.php&mode=view_contest&contest_id='.$post_id.'&order='.$order;
}
else
{
$base_url = '?post_id='.$post_id.'&order='.$order;
}
into
if ($base_url == 'admin')
{
$base_url = '?page=wp-photocontest/photocontest-manager.php&mode=view_contest&contest_id='.$post_id.'&order='.$order;
}
elseif ($base_url == 'refresh')
{
$base_url = 'wp-content/plugins/wp-photocontest/view.php?post_id='.$post_id.'&order='.$order;
}
else
{
$base_url = '?post_id='.$post_id.'&order='.$order;
}
ok I have changed code as per last post and still get 404 error
I have just had a look at another website running the same version of this photo contest. The code you are advising me to change is the exact same in this other 2nd site. The 2nd site does not have the 404 error.
So I am thinking changing this code as you describe is not the problem/solution.
I think it may be a bug related to creating a photo contest with the same url? i.e. last month I created ‘/photo-contest’. When this finished I had to delete the contest and create a new one. So I re-created a new ‘photo-contest’. However it automatically created ‘/photo-contest-2’.
The 2nd site I talk about is identical right down to the theme & version of your plug used. But it has not had a 2nd contest created as yet. It is still running the same original contest. It does not have the same 404 problem, the 2nd page of images are displayed with no problem.
Do you think this ‘/photo-contest-2’ url may have something to do with it?
is there a way to modify the code so that I can change the number of images shown per page? the admin settings do not change a live contest.
I think if I could just change this, then all images would simply show on page 1, removing my 404 error for additional pages. then I can upgrade the plug before starting next months competition.
is this a possible solution?
Plugin Author
frekel
(@frekel)
Can you send my your url?
Plugin Author
frekel
(@frekel)
Ok, this is a quick fix for your eyes only 😉
You need to add a slash to the base_url. (so $base_url = ‘wp-content……’ gets $base_url = ‘/wp-content……’)
if ($base_url == 'admin')
{
$base_url = '?page=wp-photocontest/photocontest-manager.php&mode=view_contest&contest_id='.$post_id.'&order='.$order;
}
elseif ($base_url == 'refresh')
{
$base_url = '/wp-content/plugins/wp-photocontest/view.php?post_id='.$post_id.'&order='.$order;
}
else
{
$base_url = '?post_id='.$post_id.'&order='.$order;
}
Greets,
Frank
Thank you for all your help Frank, your offline help is also appreciated. first class support thank you.