Jump to content
TNG Community
Sign in to follow this  
Brett

Overwrite Mod text using cust_text.php

Recommended Posts

Brett

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?

Share this post


Link to post
Share on other sites
Ken Roy

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

Share this post


Link to post
Share on other sites
Brett

 

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.

Share this post


Link to post
Share on other sites
Brett

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.

Share this post


Link to post
Share on other sites
Ken Roy

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

Share this post


Link to post
Share on other sites
Brett
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.

Share this post


Link to post
Share on other sites
Ken Roy

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

Share this post


Link to post
Share on other sites
Brett

Thanks Ken, I will have a look.

Share this post


Link to post
Share on other sites
Brett
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.

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
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.

Loading...
Sign in to follow this  

×