Krisamd Posted June 24, 2020 Report Share Posted June 24, 2020 I have several user pages created in TNG10.1.1 and put under TNG>extrapgs>xxx.php I am unable to understand how to modify the files as indicated in "TNG V12 Change Impact" - Impact on user Created Pages. One such page for example: <?php include( "../begin.php"); if( !$cms['support'] ) $cms['tngpath'] = "../"; include($cms['tngpath'] . "genlib.php"); $textpart = "getperson"; include($cms['tngpath'] . "getlang.php"); include($cms['tngpath'] . "$mylanguage/text.php"); $link = tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit; include($cms['tngpath'] . "checklogin.php"); include($cms['tngpath'] . "log.php" ); tng_header( $text[help], $flags );?> I will appreciate feed back Kris Quote Link to comment Share on other sites More sharing options...
XerxX Posted June 24, 2020 Report Share Posted June 24, 2020 (edited) Hi Kris, Can't you just move the contents (your own - not TNG code) of your "old" pages into the new historytemplate.php? I did that and it works. EDIT: One example is here: https://botebygden.se/histories/kartgalleri.php? I added the database call between"$yourlink" and "$logstring" and I've got some PHP inside the HTML part also. HTH /Erik Edited June 24, 2020 by XerxX Added example Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted June 24, 2020 Report Share Posted June 24, 2020 Kris, You can either do as Erik did or you could update your pages in the extrapgs folder to use something like the following include( "../tng_begin.php"); if( !$cms['support'] ) $cms['tngpath'] = "../"; //include($cms['tngpath'] . "genlib.php"); $textpart = "getperson"; //include($cms['tngpath'] . "getlang.php"); include($cms['tngpath'] . "$mylanguage/text.php"); $link = tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit; //include($cms['tngpath'] . "checklogin.php"); //include($cms['tngpath'] . "log.php" ); where you change the include for begin.php to be tng_begin.php and comment out the files that are included by tng_begin.php The above is a different way of stating what is in the User Created pages required action Quote Link to comment Share on other sites More sharing options...
Krisamd Posted June 24, 2020 Author Report Share Posted June 24, 2020 Thanks Ken I have already modified as given by you. index.php has a line as under <ul class="art-vmenu"> <li><a href="extrapgs/welcome_page.php" target="_blank"><span class="l"></span><span class="r"></span><span class="t"><?php echo $text['welcome'];?></a></li> And I am getting the following error Error: TNG is not communicating with your database. Please check your database settings and try again. Settings can be found under Admin/Setup/General Settings/Database, or at the top of your config.php file. Database settings are ok as all other phps are functioning This error is appearing when I want to access all my extra pages Kris Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted June 24, 2020 Report Share Posted June 24, 2020 Kris, The content of the index.php should have nothing to do with your extrapgs script. Can you attached one of your files that is returning the TNG not communicating h your database error Quote Link to comment Share on other sites More sharing options...
Krisamd Posted June 24, 2020 Author Report Share Posted June 24, 2020 I have uploaded the file. My site namkudumbam.net has been functioning without any issue from the day it was operational mid 2015. (TNG10.1.1) I was out of touch with the site and I am back and see that the TNG has undergone major upgrades as also the server and associated SQL/Apache/php etc. Now I realize it would be better to rewamp the site from bottom as I feel upgrading/or full installation. will not meet my requirements. Your suggestion will be most welcome. Kris Although some of my extra pages are converted directly from Microsoft Word, I am recoding all with TNG class and style. WELCOME_PAGE.php Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted June 24, 2020 Report Share Posted June 24, 2020 Hello Kris, I saved the attached WELCOME_PAGE.php in the extrapgs folder (or directory depending on your terminology) on my localhost WampServer enviornment and the file does not cause the TNG cannot communicate with your database error. So if you are still getting that error, it is coming from someplace else I am not sure what you mean by "rewamp the site from bottom" as I feel upgrading/or full installation. will not meet my requirements. I guess that would depend on what your requirements are. Creating web pages from MS Word is not something I would do unless you found a way to not include all the Microsoft fonts and formatting that is brought into web pages 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.