stevewd259 Posted March 9 Report Share Posted March 9 Hi there, It's been 25 years since I did any coding and that I was only using rudimentary code then. l need a bit of help deciphering what is required of me on the top of the main Histories page of my site. My site is at: https://www.stephendickson.scot I would also like to have all the Histories pages not subject to login so that the Search engines can crawl them. Is this a good idea or am I thinking about things 20 years ago and you shouldn't do this now. Also there's a bit in the code that's telling me to delete something and I don't understand which bit. Here's the top of the Histories home page. <?php /*Purpose of this file: To allow you to make new family or feature pages that conform to the same look-and-feel and privacy settings as the rest of your site. NOTE: The instructions below assume you will place your new page in one of your media subfolders (for example, "histories" or "documents", or create a extrapgs subfolder to your TNG root folder) and use copy and paste this file to your preferred subfolder and edit the file in that subfolder. Instructions: STEP 1: Make a copy of this file with a different name, keeping the .php extension (for example: myfamily1.php). Make the changes described below in the copy, not the original. STEP 2: Remove the following two lines. They are here to prevent the template from being used for malicious purposes. */ //If you want to skip the login check and allow the page to be viewed by visitors even though your site requires Login, remove the comment marks from the following line: //$nologin = 1; $cms['tngpath'] = "../"; include( "../tng_begin.php"); if( !$cms['support'] ) $cms['tngpath'] = "../"; /* $logstring should contain the URL for your family stories writelog creates an entry in the Access Log preparebookmark creates the bookmark link on the page */ $logstring = "<a href=\"histories/index.php\">Our Histories</a>"; // change your title and page name here writelog($logstring); preparebookmark($logstring); // The following $flags can be passed on the family story pages. The $flags can either be true or false $flags['noheader'] = false; // set to true to not include the template Custom Header // set to false to include the template Custom Header - normally topmenu.php $flags['nobody'] = true; // set to true to not generate the <body> tag if the tag is in the topmenu.php // set to false to generate the <body> tag $flags['noicons'] = false; // set to true to not generate the TNG menu bar // set to false to generates the TNG menu bar $flags['nologon'] = true; // set to true to bypass the checklogin and allow the page to be viewed by visitors even though your site requires Login // set to false to require login to view the page // for multi-language pages, you can use $text variables for your Feature Story Title tng_header( "Our Histories", $flags ); // change your title here ?> I am querying the part that starts "Step 2" as I don't understand which part I'm supposed to delete. And also, if it is a good idea to not have login, the line underneath Step 2, I don't understand what I'm supposed to do there either. This is the code on one of the internal pages: <?php /*Purpose of this file: To allow you to make new family or feature pages that conform to the same look-and-feel and privacy settings as the rest of your site. NOTE: The instructions below assume you will place your new page in one of your media subfolders (for example, "histories" or "documents", or create a extrapgs subfolder to your TNG root folder) and use copy and paste this file to your preferred subfolder and edit the file in that subfolder. Instructions: STEP 1: Make a copy of this file with a different name, keeping the .php extension (for example: myfamily1.php). Make the changes described below in the copy, not the original. */ $cms['tngpath'] = "../"; include( "../tng_begin.php"); if( !$cms['support'] ) $cms['tngpath'] = "../"; /* $logstring should contain the URL for your family stories writelog creates an entry in the Access Log preparebookmark creates the bookmark link on the page */ $logstring = "<a href=\"histories/glasgow.php\">Glasgow</a>"; writelog($logstring); preparebookmark($logstring); // The following $flags can be passed on the family story pages. The $flags can either be true or false $flags['noheader'] = false; // set to true to not include the template Custom Header // set to false to include the template Custom Header - normally topmenu.php $flags['nobody'] = true; // set to true to not generate the <body> tag if the tag is in the topmenu.php // set to false to generate the <body> tag $flags['noicons'] = false; // set to true to not generate the TNG menu bar // set to false to generates the TNG menu bar $flags['nologon'] = true; // set to true to bypass the checklogin and allow the page to be viewed by visitors even though your site requires Login // set to false to require login to view the page // for multi-language pages, you can use $text variables for your Feature Story Title tng_header( "Glasgow", $flags ); ?> I have set the "nologon" to true but they still seem to require login. Quote Link to comment Share on other sites More sharing options...
Philip Roy Posted March 10 Report Share Posted March 10 This... //If you want to skip the login check and allow the page to be viewed by visitors even though your site requires Login, remove the comment marks from the following line: //$nologin = 1; Should have become this... //If you want to skip the login check and allow the page to be viewed by visitors even though your site requires Login, remove the comment marks from the following line: $nologin = 1; It was just the two lines (the commenting) that you should have removed...not the whole line. Quote Link to comment Share on other sites More sharing options...
stevewd259 Posted March 10 Author Report Share Posted March 10 Thanks Philip I hadn't done anything yet as I hadn't a clue. Have removed the comment and the main histories page now doesn't require logon. https://www.stephendickson.scot/histories/home.php The rest linked from this page seem to still need logon. Quote Link to comment Share on other sites More sharing options...
Philip Roy Posted March 10 Report Share Posted March 10 You need to apply the change to every single history page/file. That value that you’re uncommenting let’s TNG know that it’s okay to display it Quote Link to comment Share on other sites More sharing options...
stevewd259 Posted March 10 Author Report Share Posted March 10 Ah I get it now. I had to add: $nologin = 1; to every page. It was on the home page but it wasn't on the other pages. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.