Posts: 13
Threads: 1
Joined: Nov 2018
PM sent
Posts: 13
Threads: 1
Joined: Nov 2018
Any ideas? Would really like to make a start on this. Thanks
Posts: 2,894
Threads: 59
Joined: Jun 2010
Hi you've got some code on your site which is causing a '301' redirect.
When clicking 'Start' it posts to this URL:
/install/index.php?route=start
But it never reaches it because your site is redirecting it to this:
/install/?route=start
So probably in your site's main .htaccess file it has something which removes 'index.php' from the URL.
If you remove that or add an exclusion to it for the Commentics folder then you should be able to proceed.
Have
you completed
the interview?
Posts: 13
Threads: 1
Joined: Nov 2018
Arh, I guess it's this from the htaccess??
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html?|php)(\?[^\ ]*)?\ HTTP/
RewriteRule ^(([^/]*/)*)index\.(html?|php)$
https://www.domain.com/$1 [R=301,L]
Posts: 2,894
Threads: 59
Joined: Jun 2010
Yes that's it.
Have
you completed
the interview?
Posts: 13
Threads: 1
Joined: Nov 2018
Hi, I got sidelined with other things but have started to look at this again. I've commented out the htaccess lines & the install went fine
I'm now looking at how to integrate the code with our site that uses the smarty template system. Have you ever integrated this with smarty? If you have could you post the code that was used please? I'm guessing I need to add the php to a smarty function then assign it a variable that can be used in the template files? We already have variables that could be used in the code, eg ;-
Code:
$cmtx_identifier = '$productcode';$cmtx_reference = '$page_title';$cmtx_folder = '/upload/';require($_SERVER['DOCUMENT_ROOT'] . $cmtx_folder . 'frontend/index.php');
I'm no coder but hope I can work this out!
Thanks
Dave
Posts: 2,894
Threads: 59
Joined: Jun 2010
Hi Dave,
I haven't personally integrated it into a smarty template system but I know a few people have done so successfully.
I found the following example. It's from a few years ago so the integration code is a little different but the premise should hopefully be the same.
https://www.commentics.org/forum/showthread.php?tid=498
Have
you completed
the interview?
Posts: 13
Threads: 1
Joined: Nov 2018
Thanks, I did find that while doing a search but I'm unsure where that code should go, I'll have a play around with it and see if I can work it out!
Posts: 13
Threads: 1
Joined: Nov 2018
(17-Jan-2019, 11:56 AM)Steven Wrote: Hi Dave,
I haven't personally integrated it into a smarty template system but I know a few people have done so successfully.
I found the following example. It's from a few years ago so the integration code is a little different but the premise should hopefully be the same.
https://www.commentics.org/forum/showthread.php?tid=498
Hi again, when you say the integration code is different ...
Code:
// Start the output buffer
ob_start();
// Commentics configuration
$cmtx_page_id = "pageid";
$cmtx_reference = "Page title";
$cmtx_path = "/path/to/your/commentics/root/";
define ('IN_COMMENTICS', 'true');
// Call commentics
require $cmtx_path . "includes/commentics.php";
// Grab code from the output buffer
$comments_html = ob_get_clean();
I'm guessing the above would need to be....
Code:
// Start the output buffer
ob_start();
// Commentics configuration
$cmtx_identifier = "pageid";
$cmtx_reference = "Page title";
$cmtx_folder = "/upload/";
define ('IN_COMMENTICS', 'true'); (is this line required or is this from the old version?)
// Call commentics
require $cmtx_folder . "frontend/index.php";
// Grab code from the output buffer
$comments_html = ob_get_clean();
Do you think?
Posts: 2,894
Threads: 59
Joined: Jun 2010
Hi you can remove the 'define' line, it's no longer needed.
Have
you completed
the interview?