Roger Rosentreter Posted January 15, 2022 Report Share Posted January 15, 2022 This is my very first post so please be gentle... Is there a setting or mod somewhere to change say https://some address/index.php to https://some address/ or https://some address/showmedia.php?mediaID=9414 to https://some address/theactualdocumentname??? Pretty permalinks are pretty much standard these days and I'm also using a sitemap generator which is currently sending Google, et al, a bunch of random data. For example: 2022-01-14T06:45:58+00:00 weekly 0.6400 16http://some address/showmedia.php?mediaID=9414 2022-01-14T06:45:58+00:00 weekly 0.6400 17http://some address/showmedia.php?mediaID=9411 2022-01-14T06:45:58+00:00 weekly 0.6400 18http://some address/showmedia.php?mediaID=9413 2022-01-14T06:45:58+00:00 weekly 0.6400 19http://some address/showmedia.php?mediaID=9415 Also... Where can I add the header <meta> tag information please??? I've found meta-title and meta-keywords but none of the others. Quote Link to comment Share on other sites More sharing options...
Roger Rosentreter Posted January 15, 2022 Author Report Share Posted January 15, 2022 Also just found the default is <meta name="robots" content="noindex" /> How do I change this to Index-Follow? Quote Link to comment Share on other sites More sharing options...
Roger Rosentreter Posted January 15, 2022 Author Report Share Posted January 15, 2022 Oh, another thing... Where can I put my Google Analytics ID? Too many questions for my first post I know... Quote Link to comment Share on other sites More sharing options...
RickM Posted January 15, 2022 Report Share Posted January 15, 2022 (edited) I am not sure there is a method available to change the urls into pretty permalinks. The simple reason would be there would be too many to do so.. One should remember TNG is getting data directly from a database and that requires the sort of info the url provides. This is definitely outta my scope.. One does see this quite a loot, look at Facebook and how it provides links to other posts etc, they are not pretty.. Nor to sites outside of FB either.. I'm guessing 'some address' is what you replaced your site url with??? If not that is a worry, would have to figure out where that is coming from.. I cannot think of it, I'm sure though there is a Mod available that might help with the GAI.. Maybe try Simple SEO Mod from the TNG Wiki Page.. If you haven't already register you will need to do so BEFORE being able to D/load Adding the meta tag you would like, might also be handled by that Mod, otherwise it would need to be added to the genlib.php file in the function tng_header( section.. And I believe there was a Mod mentioned not so long back here on the forum.. I cannot think who was looking at it and the dev was updating it too.. It Might be the Bot Trap Mod Don't worry about too many questions, I'm sure they will be answered .. Edited January 15, 2022 by RickM Mod that might help.. Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 15, 2022 Report Share Posted January 15, 2022 15 hours ago, Roger Rosentreter said: Also just found the default is <meta name="robots" content="noindex" /> How do I change this to Index-Follow? You can change what instruction each type of page gets in the file tngrobots.php - If you want to change how a particular file is followed and indexed, move its file name to the appropriate section in that file. Roger Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 15, 2022 Report Share Posted January 15, 2022 15 hours ago, Roger Rosentreter said: Oh, another thing... Where can I put my Google Analytics ID? Are you running a site using the TNG-WordPress plugin - if so, then you can put it into WordPress with a plugin designed to do that. If you're not running the plugin, then you can probably put it in the file meta.php Roger Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 15, 2022 Report Share Posted January 15, 2022 16 hours ago, Roger Rosentreter said: This is my very first post so please be gentle... Is there a setting or mod somewhere to change say https://some address/index.php to https://some address/ or https://some address/showmedia.php?mediaID=9414 to https://some address/theactualdocumentname??? Pretty permalinks are pretty much standard these days and I'm also using a sitemap generator which is currently sending Google, et al, a bunch of random data. For example: 2022-01-14T06:45:58+00:00 weekly 0.6400 16http://some address/showmedia.php?mediaID=9414 2022-01-14T06:45:58+00:00 weekly 0.6400 17http://some address/showmedia.php?mediaID=9411 2022-01-14T06:45:58+00:00 weekly 0.6400 18http://some address/showmedia.php?mediaID=9413 2022-01-14T06:45:58+00:00 weekly 0.6400 19http://some address/showmedia.php?mediaID=9415 I'm not aware of such a method to achieve this. The Simple SEO Mod can change how the title and description tags get written in the <head> section of a page, but does nothing about the URL that shows in the browser bar. I'm not sure that Google punishes your site in any way just because the sitemap file can't be read by a human - it's a list of URLs for the crawlers to go away and index. 16 hours ago, Roger Rosentreter said: Also... Where can I add the header <meta> tag information please??? I've found meta-title and meta-keywords but none of the others. You can change that information in the file meta.php Roger Quote Link to comment Share on other sites More sharing options...
bhemph Posted January 15, 2022 Report Share Posted January 15, 2022 A search says that to make pretty links, you would need to set that up in your .htaccess file on your server and use the mod_rewrite functionality to change the pretty link into the parameter based one. With how TNG builds the url links inside and how many links there would be to change, it would not be a minor change. Like Roger indicates, I haven't seen anything about a penalization for SEO with the parameter url, although you may have a link to a document that states that it does. Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 15, 2022 Report Share Posted January 15, 2022 33 minutes ago, bhemph said: A search says that to make pretty links, you would need to set that up in your .htaccess file on your server and use the mod_rewrite functionality to change the pretty link into the parameter based one. With how TNG builds the url links inside and how many links there would be to change, it would not be a minor change. Like Roger indicates, I haven't seen anything about a penalization for SEO with the parameter url, although you may have a link to a document that states that it does. Yes, it would have to be done in the .htaccess file I think, but it would require the file to do some calculations and database lookups since you'd be inputting an ID number as part of the TNG URL, and need to have a lookup that determined the name, or media title, that goes with that ID number, and I'm quite unsure if it would be at all possible to do that. A first start perhaps would be to modify the TNG code that builds the URL to at that time retrieve the name etc and append it to the URL so that a rewrite rule could then take the URL apart and reconstruct it as you wish, but then you also have to set in place the reverse, so that when you have a pretty permalink, your site knows how to return the right page when requested for a pretty URL. Roger Quote Link to comment Share on other sites More sharing options...
Roger Rosentreter Posted January 16, 2022 Author Report Share Posted January 16, 2022 Many thanks for everyone's help... Now I just have to go and implement it all Quote Link to comment Share on other sites More sharing options...
Roger Rosentreter Posted January 16, 2022 Author Report Share Posted January 16, 2022 OK I've found an old mod that seems to do exactly what I want... https://tng.lythgoes.net/wiki/index.php/SEO_for_TNG_Mod Is there anyone out there who might like to rewrite for v 12 and v13??? Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 16, 2022 Report Share Posted January 16, 2022 4 hours ago, Roger Rosentreter said: OK I've found an old mod that seems to do exactly what I want... https://tng.lythgoes.net/wiki/index.php/SEO_for_TNG_Mod Is there anyone out there who might like to rewrite for v 12 and v13??? There is this Mod that writes keyword and description lines into the <head> section, but it's not doing anything to rewrite the URLs in a TNG page to support pretty permalinks for TNG pages. https://tng.lythgoes.net/wiki/index.php/Simple_SEO Roger Quote Link to comment Share on other sites More sharing options...
Katryne Posted January 16, 2022 Report Share Posted January 16, 2022 Hello ! I think that "pretty permalinks" is mostly a wordpress notion (google the terms, most results are about wordpress). It will be "pretty" mostly to human eyes. Indexing robots are more interested in what the "simple SEO" mod will be bring. So, do not bother too much about this. Quote Link to comment Share on other sites More sharing options...
Roger Rosentreter Posted January 17, 2022 Author Report Share Posted January 17, 2022 13 hours ago, theKiwi said: There is this Mod that writes keyword and description lines into the <head> section, but it's not doing anything to rewrite the URLs in a TNG page to support pretty permalinks for TNG pages. https://tng.lythgoes.net/wiki/index.php/Simple_SEO Roger I was more thinking that it adds a generic set of Keywords globally (Simple Seo doesn't have this option) and has the ability to add your Google Analytics code... Maybe I'll see if the Author of Simple SEO can add this functionality Quote Link to comment Share on other sites More sharing options...
Philip Roy Posted January 17, 2022 Report Share Posted January 17, 2022 So I have to stress that this is a guess...but it seemed to work for me. It looks like in TNG version 8, the things you want to change were in files in every template...so that mod changes files in lots of templates, even if you aren't using the templates...so it's quite complex. I managed to get this working for a test site..but without the Google analytics part. The file to edit is genlib.php which is in the top directory of the TNG folder. Find the code... echo "<meta name=\"Keywords\" content=\"$site_desc\" />\n"; //echo "<meta name=\"Description\" content=\"" . preg_replace("/\"/", "", $title . $siteprefix) . "\" />\n"; echo "<meta name=\"Description\" content=\"" . $title . $siteprefix . "\" />\n"; And replaces it with something like.... echo "<meta name=\"Keywords\" content=\"Ancestry, Genealogy, Blogs Family\" />\n"; //echo "<meta name=\"Description\" content=\"" . preg_replace("/\"/", "", $title . $siteprefix) . "\" />\n"; echo "<meta name=\"Description\" content=\"My amazing genealogy site\" />\n"; See if that gets the keywords and descriptions the same across every page (don't forget to clear your cache). Hope that helps. If that works, some clever person might be able to help with the Google analytics side of things. Quote Link to comment Share on other sites More sharing options...
RickM Posted January 17, 2022 Report Share Posted January 17, 2022 What template are you using?? Philip's solution would really require a Mod to make it easier for the future.. I could try adding the Google Analytics as well.. Am currently looking at the 'SEO for TNG Mod'.. Indeed this Mod does what Philip describes, but if one wants it updated (and I don't know how to sort out PHP v8 warnings or errors at this point in time) again I will need template number.. Not sure IF I can or will update it for ALL Templates.. Only because it will keep me up for days on end getting it right (or as right as I can). Quote Link to comment Share on other sites More sharing options...
Philip Roy Posted January 17, 2022 Report Share Posted January 17, 2022 @RickM I wasn’t around for TNG v8, but my reaction to that mod was “oh hell no”…as it requires code adjustments for each and every template. That’s why I looked at where the meta details were possibly being generated…and have assumed that things have changed and that it’s now in genlib.php and not within individual template index or topmenu files? Happy to be proven wrong…but that might make a newer mod easier with one file as a focus for a mod? I confess I don’t really want to get to the point of authoring mods for others. Too much commitment for me 😉 Quote Link to comment Share on other sites More sharing options...
RickM Posted January 17, 2022 Report Share Posted January 17, 2022 (edited) 1 hour ago, Philip Roy said: @RickM I wasn’t around for TNG v8, but my reaction to that mod was “oh hell no”…as it requires code adjustments for each and every template. That’s why I looked at where the meta details were possibly being generated…and have assumed that things have changed and that it’s now in genlib.php and not within individual template index or topmenu files? Happy to be proven wrong…but that might make a newer mod easier with one file as a focus for a mod? I confess I don’t really want to get to the point of authoring mods for others. Too much commitment for me 😉 You saying I'm OLD!!!!! 🤣 I wasn't using TNG 8 I started around 11 then very quickly to 12 (I got the free upgrade).. I wouldn't be happy to prove you wrong, you are right more often than not.. But then again you are half left, not all right.. You would fall over if you were!! 🤣 You are correct that part of the solution lies within genlib.php and that being the meta code.. And I think that all ideas are valid.. I'm not smart enough to rewrite the Analytics part which I think could be added to the head section in genlib.php, but would require some changes to the goggle js file to allow for the analytics variable.. Or at least thats what I believe.. There isn't much to change at this point and I doubt I will rework to suit ALL templates, but include the template that @Roger Rosentreter uses.. Yeah You prove me wrong.. I'm def not smart enough to update this old Mod.. Can get it to install on version 13.1.1, but not actually work.. BUGGER!!! Might be a new Mod (PRIVATE) with Analytics code having to be added to the js file manually, and made for whichever template Roger is using currently. Edited January 17, 2022 by RickM An Update about updating the Mod Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 17, 2022 Report Share Posted January 17, 2022 11 hours ago, Roger Rosentreter said: I was more thinking that it adds a generic set of Keywords globally (Simple Seo doesn't have this option) and has the ability to add your Google Analytics code... Maybe I'll see if the Author of Simple SEO can add this functionality TNG already sets a Keyword and Description line into the <head>...</head> section of every page. • The Keyword is what you've put in TNG Admin ------> Setup ------> General Settings ------> Site Design and Definition. • The Description is calculated from the name of the person (on getperson.php) along with birth date and place and death date and place - the same value as the page's <title> tag gets. You can add the Google recommended code - this is an older version - for Analytics into the file meta.php, and then TNG will include that in every page. Roger Quote Link to comment Share on other sites More sharing options...
Katryne Posted January 17, 2022 Report Share Posted January 17, 2022 Roger, I do not find the same meta according to the template in use. I use Template 13 on one site and 12 on the other. Why is-it so ? Does-it really depend on how each template is coded ? Template 13 : what is entered as Site name can be seen in source mode both for Title and for Meta description. What is entered in Description is nowhere to be seen in source mode Citation Site Name: Les lignées revestoises Site Description: Généalogie du village du Revest-les-Eaux <title>Les lignées revestoises</title> <meta name="Description" content="Les lignées revestoises" /> Template 12 : what is entered as site name can be seen in source mode both for Title and for Meta description. What is entered in Desciptions can be seen as Meta Keywords Citation Site Name: GeneaKat Site Description: Généalogie des familles Cadel et Bayle, Chauvigné et Bourlaud et toute leur parenté (ou presque) <title>GeneaKat</title> <meta name="Keywords" content="Généalogie des familles Cadel et Bayle, Chauvigné et Bourlaud et toute leur parenté (ou presque)" /> <meta name="Description" content="GeneaKat" /> Quote Link to comment Share on other sites More sharing options...
theKiwi Posted January 17, 2022 Report Share Posted January 17, 2022 1 hour ago, Katryne said: Roger, I do not find the same meta according to the template in use. I use Template 13 on one site and 12 on the other. Why is-it so ? Does-it really depend on how each template is coded ? I wouldn't have thought so, but it is possible I guess. I have Template 16 on a couple of sites and it does show both those fields on the index page. When you go to a getperson.php page then the Description becomes the person's name and dates. If you look at a getperson.php page for your two templates do you see that? If so, then it's perhaps just the index.php page that's showing the differences? Roger Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted January 17, 2022 Report Share Posted January 17, 2022 Katryne, Do you have the same mods installed on both sites? I ask because some mods might impact that area of genlib.php which does not appears to be template specific. I know that my Mobile Site Enhancements mod makes some changes in that area. You might want to compare your genlib.php from both sites to see what is different. Quote Link to comment Share on other sites More sharing options...
Katryne Posted January 17, 2022 Report Share Posted January 17, 2022 Well , Ken is right : it's Simple SEO mod that makes the Meta keywords disappear on the village tree. I liked the mod because it can use shortened dates on the person page. And I can't use it on the family tree, since it's not compliant with Sosa mod. Nothing to do with template choice. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted January 17, 2022 Report Share Posted January 17, 2022 Thanks for clearing that mystery up Katryne, I need to double check my Mobile Site Enhancements mod because it appears to cleared the Keyword contents using the Site name prefix when not in mobile mode <title>Catherine Roy b. 20 Mar 1880 Frenchville, Aroostook County, Maine, USA d. 10 Oct 1918 Frenchville, Aroostook County, Maine, USA: Our Acadian, French-Canadian, and Maine Ancestors</title> <meta name="Keywords" content="" /> <meta name="Description" content="Catherine Roy b. 20 Mar 1880 Frenchville, Aroostook County, Maine, USA d. 10 Oct 1918 Frenchville, Aroostook County, Maine, USA: Our Acadian, French-Canadian, and Maine Ancestors" /> Maybe Bill Herndon can explain why he cleared the keyword meta tag in his Simple SEO mod. I do not his mod Quote Link to comment Share on other sites More sharing options...
Roger Rosentreter Posted January 18, 2022 Author Report Share Posted January 18, 2022 21 hours ago, RickM said: You saying I'm OLD!!!!! 🤣 I wasn't using TNG 8 I started around 11 then very quickly to 12 (I got the free upgrade).. I wouldn't be happy to prove you wrong, you are right more often than not.. But then again you are half left, not all right.. You would fall over if you were!! 🤣 You are correct that part of the solution lies within genlib.php and that being the meta code.. And I think that all ideas are valid.. I'm not smart enough to rewrite the Analytics part which I think could be added to the head section in genlib.php My code for the meta.php for Google analytics now works... <?php global $cms; ?> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-175396559-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-175396559-1'); </script> <?php ?> Of course... Use your own UA- id 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.