Jump to content
TNG Community

Overwrite Mod text using cust_text.php


Brett

Recommended Posts

After installing a Mod, I wish to change one text field set by the Mod. I do not, at this stage, wish to change to a private Mod.

I thought if I included this in cust_text.php after

//Mods should put their changes before this line, local changes should come after it.

I thought it would overwrite as last .

Is this not possible please?

Link to comment
Share on other sites

Brett,

It would be easier to answer your question if you provided the actually example of the mod's text you are trying to override, since not all mods are following the new TNG v12 custom text guidelines. 

Logically what you are wanting to do should be possible but only if the mod is currently putting its custom text variables before the new anchor in the cust_text.php files

Link to comment
Share on other sites

 

2 hours ago, Ken Roy said:

Logically what you are wanting to do should be possible

Mod is putting similar to:

$text['here'] = "here";

and following Mod guidelines.

I have added my preferred:

$text['there'] = "there";

as the last before php close.

But page still shows Mod value.

Link to comment
Share on other sites

OK I have it as expected on my local server. Seems to be a conflict with the live site.

I will look for any differences.

Link to comment
Share on other sites

Brett,

Since you again did not provide what mod you are trying to override text, it is difficult to determine why the override is not working.

9 hours ago, Brett said:

$text['here'] = "here";

and following Mod guidelines.

I have added my preferred:

$text['there'] = "there";

However, $text['there'] = "there"; is not an override to $text['here'] = "here";

Both must used the same $text variable name

Link to comment
Share on other sites

20 minutes ago, Ken Roy said:

However, $text['there'] = "there"; is not an override to $text['here'] = "here";

Ken

That was a typing error. It should have been

$text['here'] = "here";

and following Mod guidelines.

I have added my preferred:

$text['here'] = "there";

 

I have it working on local server and one live site. Does not work on another site. Currently installing another test on that same server to see if that works.

There are no errors in logs etc.

Link to comment
Share on other sites

Brett,

You might check whether you have a cust_text.php file in the TNG root folder on the site where the override is not working

Link to comment
Share on other sites

Thanks Ken, I will have a look.

Link to comment
Share on other sites

18 hours ago, Ken Roy said:

You might check whether you have a cust_text.php file in the TNG root folder

Ken

No file but I have identified the problem.

FileZilla was uploading as ascii not binary from just the one directory on that site.

All fixed by making binary as default not auto as I normally use.

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...