Jump to content
TNG Community
Sign in to follow this  
KmBdev

Using History template

Recommended Posts

KmBdev

I have followed the directions in the historytemplate.php.  I get a --  Fatal error: Uncaught Error: Call to undefined function writelog() in E:\wamp64\www\histories\extrapgs\salemtrials.php:35 Stack trace: #0 {main} thrown in E:\wamp64\www\histories\extrapgs\salemtrials.php on line 35.

The code is as follows:

$yourlink = "/extrapgs/salemtrials.php";

$logstring = "<a href=\"extrapgs/salemtrials.php\">Salem Witch Hysteria</a>";
writelog($logstring);
preparebookmark($logstring);

Could anyone inform me of what the error is?  I have been struggling with this.

Thank you.

 

Share this post


Link to post
Share on other sites
stores

Try putting a / between " & extrapgs... so it will read $logstring = "<a href=\"/extrapgs

Share this post


Link to post
Share on other sites
KmBdev

Thank you, I don't know how I missed that but it is still giving the same error.  Any other ideas?

Share this post


Link to post
Share on other sites
Ken Roy
14 hours ago, KmBdev said:

Fatal error: Uncaught Error: Call to undefined function writelog()

What version of TNG are you using?  What version of the historytemplate.php?

The writelog function is defined in the include for log.php that is now part of tng_begin.php

Share this post


Link to post
Share on other sites
KmBdev

Well I just fixed the problem.  It had nothing to do with the code I inserted.  I was missing the "tng_" This is the code which works:

$cms['tngpath'] = "../../";
include( "../../tng_begin.php");
if( !$cms['support'] )
    $cms['tngpath'] = "../../";
 

This is what I had before:

$cms['tngpath'] = "../../";
include( "../../begin.php");
if( !$cms['support'] )
    $cms['tngpath'] = "../../";

Share this post


Link to post
Share on other sites
stores

Glad to hear you figured it out.

Share this post


Link to post
Share on other sites
Ken Roy
11 hours ago, KmBdev said:

I was missing the "tng_" This is the code which works:

$cms['tngpath'] = "../../";
include( "../../tng_begin.php");
if( !$cms['support'] )
    $cms['tngpath'] = "../../";

The tng_begin.php includes some of the other files that were included individually when using begin.php.  Without seeing the complete code snippet from the beginning of the historytemplate.php that you are using it is difficult to answer whether you might encounter other problems or not

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×