This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

problem accessing correct comments directory
#1

Hi all,

I've been looking at / installing the script and it looks great.

Now I'm stuck on something, which I know is because of an 'odd' redirect I do but hoping someone can help anyway...

Example page where I'm testing is at
http://www.francethisway.com/places/a/to...aronne.php

This page is really a redirect from http://www.francethisway.com/places/plac...et-garonne (and there are several thousand other pages which work the same way)

Note: the 'original' page is in directory /places/ whereas the page we see is in a subdirectory /places/a/ - this is causing the problem I think

All the images, form info etc look fine, using
$path_to_comments_folder = "../comments/";
but then the captcha, links to the privacy policy, etc all look for directory places/comments/ which doesn't exist - presumably because they have stepped one directory back from 'places/a/' to reach 'places/'

Any ideas where in the script I could tweak things to get this working, by overiding the path perhaps?

Thanks!
Reply
#2

Hi,

It seems to be working correctly now.

However I got banned when trying to preview a comment. I imagine that it was due to an 'incorrect referrer' which will most likely be related to the redirect that is set up. You can disable the referrer check in Settings -> Security. You might not have noticed this as the administrator can not be banned.

Have you completed the interview?
Reply
#3

Thanks Steven,

That's a bit strange though - are you saying you can see the captcha image? I'm not seeing it here in either IE or firefox

edit: OK I get it, you can see it in the http://www.francethisway.com/places/plac...et-garonne version ie the page before it gets redirected - unfortunately the page everyone see is http://www.francethisway.com/places/a/to...aronne.php which is the same page with a nice url, and the extra subdirectory /a/

As an alternative, is there a way to just turn off captcha, terms and conditions, privacy etc I couldn't see an option in the settings but that would work just as well

Cheers
Reply
#4

Ah I see the problem now.

Some of the code in comments/includes/template/form.php uses the variable $path_to_comments_folder to load the captcha files etc. You could locate where it is used and change it to be:
PHP Code:
<?php 
"../" . $path_to_comments_folder

The other option, like you said, is to disable these features (in Layout -> Form -> Enabled).

Have you completed the interview?
Reply
#5

Thanks again for your prompt help Steven,

Disabling them will do for today, I'll look at the other options tomorrow (or when I decide a captcha is important because of the amount of spam...)

Cheers!
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by murat
31-Dec-2020, 07:00 PM
Last Post by marcparish
12-Jul-2020, 11:05 PM
Last Post by Steven
13-May-2019, 09:32 AM
Last Post by Steven
01-Jan-2016, 12:37 AM
Last Post by Steven
21-May-2015, 06:30 PM
Last Post by Steven
25-Apr-2014, 09:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)