Jump to content
TNG Community
pipsi

*solved* - first userpage (historytemplate.php)

Recommended Posts

pipsi

I have just uploaded my first user page and receive the following error message:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /web/WebSites/d/s/c/h/schuster-pippersteiner.at/htdocs/genealogie/TNG/extrapgs/GrossMeseritsch201history.php on line 21

<?php
$nologin = 1;
include( "../begin.php");   //Nuke users must include "../../../begin.php" here
if( !$cms[support] )
                $cms[tngpath] = "../";
include($cms[tngpath] ."genlib.php");
include($cms[tngpath] ."getlang.php");
include($cms[tngpath] ."$mylanguage/text.php");
//end of new include lines
//STEP 3: Replace "Your Title Here" in the next line with the title of your page. Keep it surrounded with double quotes.
//  Do not include any double quotes within your title. This creates the primary headline at the top of the page.
$yourtitle = "Your Title Here";
//STEP 4: Replace "/path_to_your_page/mynewhistory.php" in the next line with the path and file name of your page.
$yourlink = "/www.schuster-pippersteiner.at/genealogie/TNG/extrapgs/GrossMeseritsch201history.php";
$logstring = "<a href=\"extrapgs/GrossMeseritsch201history.php\"> $text['Hauschronik']</a>";
writelog($logstring);
preparebookmark($logstring);
//STEP 5: Remove the comments (leading slashes) on the next line if you *DON'T* want the TNG menu bar to show on your page.
//$flags['noicons'] = true;
tng_header( "$text['Hauschronik']", $flags );
<p class="header">Groß Meseritsch Nr. 201 (ehem. Nr. 194), heute Velké Meziříčí, ulice Bezděkov 201/1</p>
<?php echo tng_coreicons(); ?>
<table align=”center” border=0 width=”95%”><tr><td>
<img src="www.schuster-pippersteiner.at/genealogie/TNG/photos/Ahnentour 096.jpg"/>  <img src="www.schuster-pippersteiner.at/genealogie/TNG/Häuser/Ahnentour 094.jpg" align="left"/>
<p>Velké Meziříčí, ulice Bezděkov 201/1, okres Žďár nad Sázavou, Kraj Vysočina</p>

 

https://www.schuster-pippersteiner.at/genealogie/TNG/extrapgs/GrossMeseritsch201history.php

many thanks for your support!

Ingrid

 

Edited by theKiwi
Tidied up pasted code

Share this post


Link to post
Share on other sites
Newfloridian

Hi Ingrid

This usually means you have a blank space (or blank line) somewhere in your code. The commonest place to find it is immediately in front of the opening <?php 

It's difficult to read the "cut and pasted" code onto the page. However, comparing what you have sent with what's actually in the original TNG11 historytemplate.php file, it looks as if you have a missing ?> closure.

THE ORIGINAL:

//STEP 5: Remove the comments (leading slashes) on the next line if you *DON'T* want the TNG menu bar to show on your page.
//$flags['noicons'] = true;

tng_header( $yourtitle, $flags ); 

//STEP 6: Replace the text below with your own text (do not include the headline). 
//  Use HTML tags to create paragraph breaks and other formatting. 
?>

<p>Your body text or HTML goes here. Do not include a BODY tag.</p>
Does your code still have "Step 6" present? If not you would need to add the ?> closing tag before you come to <?php echo tng_coreicons(); ?>

Cheers Alan

 

Cheers Alan 

Share this post


Link to post
Share on other sites
theKiwi

You need to close the php after this chunk of your text (I've edited your post to make it easier to read - you can paste code in here using the "Code" button  < > above here

//STEP 5: Remove the comments (leading slashes) on the next line if you *DON'T* want the TNG menu bar to show on your page.
//$flags['noicons'] = true;
tng_header( "$text['Hauschronik']", $flags );

After this you need to add the php closing tag

?>

Roger

Share this post


Link to post
Share on other sites
pipsi

Thank you all! my first user page is working 😊 - and now stylistically in progress

 

Ingrid

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

×