Jump to content
TNG Community
SharonM

Help with custom History page

Recommended Posts

SharonM

I am trying a different way of recording Features and Histories on my site. I have created a custom page using  Historytemplate.php, and so far have managed to get the title, font size, and  temporary image as I want them. I have also added a link to a person page. I have been referencing the Wiki pages here, as well as getting additional help from HTML/PHP coding tutorials on the internet, but basically all I have done is copy and paste lines of code which I've found, which seem to be doing the sort of thing I want.  So far so good. 

Now I want to add a link to open a pdf file, in the same way that I added a link to go to a person page, but I haven't been able to find a way to get this to work. 

I've put a copy of my code below (minus a large section of the text to save space).  The code which is causing the problem is highlighted in bold - I've tried to use <a href ...>  to make the link as the php code in the link to the person page completely defeats me, and inserted html seems to work elsewhere on the page. For testing/trial purposes I've also put the link in as a seperate line, so that I can identify it easily amongst all the other tags. The finished version would have this code in the previous paragrah, where the book is named. 

I should add that the custom template is in the Histories folder, and the document is in the Media folder (same location as the image already inserted successfully)

I should also add that for the moment, the pronblem code has been renmoved from the php on my site, so that it looks and works OK until I can get this resolved. 

My site is in TNGv9 (for the moment) and is at http://parcel-of-rogues.org.uk/index.php

It's locked down, but you can access the site with username "Guest" and "Familyfriend" if you need to. 

The page is can be accessed from the Features section on the right hand side, 2nd from bottom in that section, "Defrauding the Government"

Many thanks for your help. 

<?php
//Remove the following two lines before deploying copies of this file to the "histories" folder.

//Replace all the "include" lines in your pre-5.x histories with the following lines (up to the next comment)
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");
tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit;
include($cms['tngpath'] ."checklogin.php");
include($cms['tngpath'] . "log.php" );
//end of new include lines

$logstring = "<a href=\"histories/millenium1.php\">Defrauding the Revenue - Alfred & Dennett Allen</a>";
writelog($logstring);
preparebookmark($logstring);

//Note: histories created this way may function differently that other histories when placed in an "album". If that is annoying to you, consider creating
//your history by pasting the text into Admin/Media/Body Text instead.

// Remove the comments (leading slashes) on the next line if you don't want the TNG menu icons to show on your history page.
//$flags[noicons] = true;
tng_header( "Defrauding the Revenue - Alfred & Dennett Allen", $flags );
?> 

<p class="subhead"><strong><font size="3">Defrauding the Revenue - Alfred & Dennett Allen</font></strong></p>

<p class="normal"><font size="1"><i>The following article is by <a href="<?php echo $cms['tngpath']; ?>getperson.php?personID=I438&amp;tree=tree1"><b>William Albery</b></a> of Horsham. It first appeared in the <br> Sussex County Magazine, 1934 and later formed the basis for the chapter on Smuggling <br>in his book <b>A Millennium of Facts In the History of Horsham and Sussex 947-1947</i> </b>, published 1947.</p>

<a href="../media/hist_William Albery Millennium chapter on Allens.pdf><b>A Millennium of Facts In the History of Horsham and Sussex 947-1947 </b> </a>

<img src="../media/William Albery 2 Images of Horsham Susan Djabri.jpg" hspace="5" style="width:400px;height:300px;padding: 0 15px;" border="0" align="right" />

<div align="justify">
<p> A system of defrauding the Revenue was successfully carried on over ten years by two brothers, Alfred and Dennett Allen, maltsters and farmers. Alfred the elder, lived at Horsham near his malthouse in Springfield Road; Dennett, the younger, lived at Gay Street, West Chiltington. Both were steady and keen business men who were able to make honest trade pay. Precisely at what period of time they began cheating the Revenue is not known, but it was certainly at a time when such an act would trouble the consciences of but few business people. Moreover, it was soon evident that it paid well, a fact that would be sure to resist successfully any amount of moral promptings that might attempt to intrude into the business world. To the businesses carried on at the Horsham and Chiltington malthouses were added later, one each at Worthing, Mulsey, near Pulborough and Adversane - Five malthouses and three farms altogether, with plenty of financial means for carrying on a large trade. </p>

....removed content here.....

<p>The trial came before the Chief Baron and a special jury at the Court of Exchequer, King's Bench, on the 16th June. The case against each of the absent Allens was gone into separately. The Attorney-General, Sir F. Thesiger, Mr Wilde Q.C., and Mr Bevan prosecuted for the Crown and Mr Collins and Mr Brown defended. There were thirty counts in the indictment, to which there was no defence. The Chief Baron said he had never heard of so flagrant and extensive a case of fiscal dishonesty as had been made out that day by the Crown against the defendants. The jury found the defendants guilty and although they were liable to a fine of &pound;370,000 the Solicitor General consented on behalf of the Crown to a fine of &pound;110,000. Had the Allens not escaped they would be in default of paying the fine have been imprisoned during Her Majesty's pleasure, but they were perfectly safe, and well-to-do to boot, in America, as the American Government would not, at that time, surrender men convicted of fraud. After a time, however the Solicitor General, upon the principle that half a loaf is better than no bread, reduced the amount of the fine to the odd &pound;10,000, which amount the Allens paid and so restored themselves to their country and their friends.</p> </font> </div>


<?php tng_footer( "" ); ?>
 

Share this post


Link to post
Share on other sites
theKiwi

You have no closing " after the .pdf in the URL before the >

Roger

Share this post


Link to post
Share on other sites
SharonM

Oh my goodness! As simple as that! Thank you very much for pointing that out. It works perfetly now! 

Thank you, Roger. :) :) :) 

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

×