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

Many Pages code with pages in sub folders
#1

After spending much time getting the code to work in my HTML site I think I have a working version using the 'Many pages' code. I have five nested sites, only the portal site is in the root folder, the other sites are one level lower on the folder tree.

My root folder test page is http://www.royalnavyresearcharchive.org...._page3.htm

This, and Test_page2.htm, appear to work - several comments are on each page and the database records the two separate URLs. HOWEVER if I put the exact same code into a page that is not in the root folder, but in a sub folder, it fails completely.

Non-root folder test page http://www.royalnavyresearcharchive.org..../BLANK.htm

My .htaccess file contains the following code and is in the root folder:
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
php_value allow_url_fopen On


The page pages codeis:
<?php
$cmtx_page_id = "cmtx_url";
$cmtx_reference = "cmtx_title";
$cmtx_path = 'commentics/';
require $cmtx_path . 'includes/commentics.php'; //don't edit this line
?>


What am I missing?
Reply
#2

Hi,

In your nested sites, you'll need to adjust the $cmtx_path value to:

PHP Code:
<?php 
$cmtx_path
= '../commentics/';

Have you completed the interview?
Reply
#3
Wink 

(08-Apr-2014, 06:19 PM)Steven Wrote:  Hi,

In your nested sites, you'll need to adjust the $cmtx_path value to:

PHP Code:
<?php 
$cmtx_path
= '../commentics/';

Thanks Steven

Now you have pointed it out I could kick myself for not seeing it!Blush

I have made the change and it now works and is live on my site Fleet Air Arm Bases 1939 - present

Many thanks for the assist and for the great blot-on comment systemSmile
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
10-Mar-2017, 10:35 PM
Last Post by Steven
25-Jul-2014, 06:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)