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

Can't get it to work
#1

I installed everything seems good. I can get into the admin panel

I put step 1,2 and 3 into my file which I renamed .php instead of .html but nothing is showing.

Here is the page http://childchat.org/doublestroller.php - doublestroller.php leads you to doublestroller_body.php

All the code is in doublestroller_body.php

When you look at the source you don't see the 2 php parts Huh

Nothing shows on the page
Reply
#2

I'm adding some of the code to help

the file is doublestroller_body.php

The very top is

Quote:<?php
session_start();
ob_start();
?>
<!-- INCLUDE doublestroller_header.php -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-45809470-1', 'childchat.org');
ga('send', 'pageview');

</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="comments/css/stylesheet.css"/>

<h2>DOUBLE STROLLERS</h2>
</head>

The end is
Quote:</div>
<p class="seeallsales"><a href="http://amzn.to/1bJWge6"target="_blank">Click Here To See All Top Rated Double Strollers</a>
<?php
$cmtx_identifier = '1';
$cmtx_reference = 'Page One';
$cmtx_path = 'comments/';
define('IN_COMMENTICS', 'true'); //no need to edit this line
require $cmtx_path . 'includes/commentics.php'; //no need to edit this line
?>
</body>
<!-- INCLUDE overall_footer.html -->

Nothing shows for comments
Reply
#3

Hi,

If I understand what you're trying to do, you are including the file doublestroller_body.php into the file doublestroller.php.

However you are treating doublestroller_body.php as an independent file when in reality it's just a part of doublestroller.php.

So start by removing the following from doublestroller_body.php and add it to the very top of doublestroller.php.

PHP Code:
<?php
session_start
();
ob_start();
?>

Then remove the whole <head> element from doublestroller_body.php. The UTF-8 line and the stylesheet line are already in doublestroller.php so you're repeating it twice.

There are many other things but essentially the way that you're building the page is invalid.

Once that's done, check your server's error log if the comments are not showing. If there are no errors then ask your host how to view them properly because there should be some there. It may be that fixing the session_start(); code above was the problem.

Have you completed the interview?
Reply
#4
Sad 

I got the error log but the last errors are from Nov 25 (way before I tried putting commentica in)

I don't have the header lines anywhere cause you told me to take them out.

Here is doublestroller.php

Quote:<?php
session_start();
ob_start();
?>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

page_header('doublestroller');

$template->set_filenames(array(
'body' => 'doublestroller_body.php',
));

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>

Doublestroller_body.php has these lines in the end

Quote:<p class="seeallsales"><a href="http://amzn.to/1bJWge6"target="_blank">Click Here To See All Top Rated Double Strollers</a>
<?php
$cmtx_identifier = '1';
$cmtx_reference = 'Page One';
$cmtx_path = 'comments/';
define('IN_COMMENTICS', 'true'); //no need to edit this line
require $cmtx_path . 'includes/commentics.php'; //no need to edit this line
?>
</body>
<!-- INCLUDE overall_footer.html -->
Reply
#5

Upload the example.php file from the download package to see if that file works.

Have you completed the interview?
Reply
#6

Yes!! It works! doublestrollers.php is right next to example.php (both in the root)

what's next?
Reply
#7

Here's my new doublestroller.php

Quote:<?php
session_start();
ob_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Double Stroller</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="comments/css/stylesheet.css"/>
</head>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

page_header('doublestroller');

$template->set_filenames(array(
'body' => 'doublestroller_body.php',
));

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
</head>
</html>
It still doesn't workHuh
Reply
#8

Try putting the Commentics integration code in doublestroller.php instead of doublestroller_body.php.

Have you completed the interview?
Reply
#9

OK - put it in doublestroller.php rightunder the </head> and it appears right there on the top. So it works but I don't want it there. If I put it at the bottom of that file it disappears- I guess cause the file takes you to doublestroller_body.php but it doesn't do that there.

What if I just put everything into doublestroller_body.php?

I'm going to try that
Reply
#10

I put everything into doublestroller_body.php and it didn't work Undecided

This is what I have

doublestroller.php is back to itself
Quote:<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

page_header('doublestroller');

$template->set_filenames(array(
'body' => 'doublestroller_body.php',
));

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>


</html>

I don't think that matters -
doublestroller_body.php is like this
Quote:<?php
session_start();
ob_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Double Stroller</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="comments/css/stylesheet.css"/>

<!-- INCLUDE doublestroller_header.php -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-45809470-1', 'childchat.org');
ga('send', 'pageview');

</script>


<h2>DOUBLE STROLLERS</h2>
</head>
<body>
<h1 class="aligncenter" style="text-align: left;"><span style="color: #000000; font-size: large;">Click on pictures for more info</span></h1>
<div style="padding: 1px; height: 500px;width: 775px; overflow: auto;">
<table class="aligncenter" width = "755" style="border-width: 1px; border-color: #6b1ae4; background-color: #cfdfee;" border="1" cellspacing="1" cellpadding="1" align="center">
<tbody>
<tr>
<td class="piccolcol1"><a href="http://amzn.to/HWSwJc" target="_blank"><img border="0"
src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B00AHVR4N8&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=michknol-20" ></a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=michknol-20&l=as2&o=1&a=B00AHVR4N8" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>

<p class="strollername">Graco DuoGlider Classic Connect Stroller</span>
<p class="colcol1">Comfy adventures for two, plus you! The DuoGlider Classic Connect Stroller has all the essentials a growing family needs. It features
stadium-style seating, so the child sitting in the rear is slightly raised for a better view. To keep both passengers nice and comfy, both seats feature a
reclining seat, child's tray, rotating canopy and footrest.
<br>
..... That table just goes on with HTML code - nothing exciting

And then it finishes
Quote:</table>
</div>
<p class="seeallsales"><a href="http://amzn.to/1bJWge6"target="_blank">Click Here To See All Top Rated Double Strollers</a>
<?php
$cmtx_identifier = '1';
$cmtx_reference = 'Page One';
$cmtx_path = 'comments/';
define('IN_COMMENTICS', 'true'); //no need to edit this line
require $cmtx_path . 'includes/commentics.php'; //no need to edit this line
?>
</body>
<!-- INCLUDE overall_footer.html -->

So what'sstopping it from working?

go on to my next POST - maybe that's the problem
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
23-Aug-2023, 08:08 PM
Last Post by Sal
06-Feb-2019, 12:52 PM
Last Post by jemie
23-Oct-2015, 05:44 PM
Last Post by gano101
12-Nov-2014, 10:06 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)