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

Simple product review system
#11

PM sent Wink
Reply
#12

Any ideas? Would really like to make a start on this. Thanks Smile
Reply
#13

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?
Reply
#14

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]
Reply
#15

Yes that's it.

Have you completed the interview?
Reply
#16

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 Smile  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
Reply
#17

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?
Reply
#18

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!
Reply
#19

(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?
Reply
#20

Hi you can remove the 'define' line, it's no longer needed.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
10-Sep-2012, 03:39 PM
Last Post by Steven
13-Aug-2011, 10:51 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)