Jump to content
TNG Community

extrapgs in tng12.3


Krisamd

Recommended Posts

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
 

Link to comment
Share on other sites

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 by XerxX
Added example
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...