Resource icon

Template Modification System (TMS) 1.3.1

No permission to download
Cédric, thanks. What is @myProperty here?
XenForo parser recognize such things as style variables.
Also, could you give me search and replace strings to check.
Oups i thought it works but it doesn't ^^ The visual property is not replaced by its value (whereas it should be)... the variable will only give the property namecode :
{$myVariable} will give @myProperty


A concrete example could be for example with @fbColorScheme (from Style Properties: General)
If you paste in the template footer this code
Code:
<p>Check control: @fbColorScheme</p>
<p>Result: {xen:if "'@fbColorScheme' == 'light'" , "light", "dark"}</p>

It's working. I'm going to test it now with TMS but I don't think it will work. The only solution would be to include a template which will have this code then.
 
I've redone the tests with two of my custom properties (after a template rebuild)

With the regex search/replace:
Template: footer
Mode: Regex
Search:
Code:
#^.*?$#sui
Replace:
Code:
$0 test :@magicbreadcrumb_arrow_makeitclickable
@magicbreadcrumb_arrow_killborders

Results below the footers:
Code:
test :1 1
=> this is correct my properties are activated


Same test with the callback
Template:footer
Mode:callback

Callback function:
PHP:
        $search[] = '#^.*$#sui';
        $replace[] = '$0 test2 :@magicbreadcrumb_arrow_makeitclickable @magicbreadcrumb_arrow_killborders';
        
        $templateText = preg_replace($search, $replace, $templateText, -1, $count);
        $applyCount = $count;

Results below footers:
Code:
 test2 :@magicbreadcrumb_arrow_makeitclickable @magicbreadcrumb_arrow_killborders
=> the properties are not parsed
 
Ok, here is something strange but it's working:

Callback function:
PHP:
        $search[] = '#^.*$#sui';
        $replace[] = '$0 test2b : {xen:property "magicbreadcrumb_arrow_makeitclickable"} {xen:property "magicbreadcrumb_arrow_killborders"}';
 
     
        $templateText = preg_replace($search, $replace, $templateText, -1, $count);
        $applyCount = $count;

The results in the diff windows:
The {xen: property} tags are parsed with the aero base values:
Code:
test2b : @magicbreadcrumb_arrow_makeitclickable @magicbreadcrumb_arrow_killborders

And now the results:
HTML:
 test2b : 1 1
Should be good...

I'm going back to my addon to test this...
 
Feature request:

The power to turn things off in templates in an individual style. Seems if I un-check a box in one style it un-checks it for them all.
 
Do I have to undo all of my current template edits to install and use this?
Unfortunately yes. You have to apply each edit manually to TMS. But the effort is worth it because with TMS installed you have this problem only once and then never again.
 
Is there any way to see what all my template modifications are lol? I have lots of them...
If you didn't do your changes in the master template, all templates with changes will have their name in red (inside your style)
If you did your changes inside your master style (really not recommended), you will have to export your style, and compare it with the original xenforo templates xml (use any compare editor).
 
A bug seems to have popped up recently after updating some addons, including TMS. I'm still on 1.1.2 (with exploit fixed), and many of my TMS edits show that a rebuild is needed, but every time I rebuild, they still remain. Any ideas why this would happen?
 
A bug seems to have popped up recently after updating some addons, including TMS. I'm still on 1.1.2 (with exploit fixed), and many of my TMS edits show that a rebuild is needed, but every time I rebuild, they still remain. Any ideas why this would happen?
I've somehow managed to get them to show properly now, but it took a pile of rebuilds and saves. :/
 
I have an addon that creates some template modifications with TMS when installing which are enabled by default. I disable the modification, but each time I upgrade this addon, it'll be re-enabled. Is this an issue with the particular addon, or is this intended? It would be nice if whatever setting I had persisted after an upgrade.
 
I know there was a post about this somewhere, but I can't seem to find it.

If I want to create a template modification to just add something to EXTRA.css, how do I do that? I don't want to use a search and replace, just add to EXTRA.css.
 
Hello, I have a serious problem because of the addon Social Network Authentication. And now I get error TMS and I can not delete the table that has the error despite having deleted. I want to install it but whenever I try I skip this error. And when I want I can not clear why that table is the table xf_template general. Help please to install it again. Thank you.

a.webp
 
I uploaded via ftp and nothing TMS, TMS and I deleted anything.
I deleted tables and nothing TMS.
I need to fix it please my website is only half now.
Thank you very much.
 
I uploaded via ftp and nothing TMS, TMS and I deleted anything.
I deleted tables and nothing TMS.
I need to fix it please my website is only half now.
Thank you very much.
Delete the template_modified, template_final, template_modifications from xf_template_map
Delete tms_modifications table and try to uninstall the addon.
Then install it again.
 
Top Bottom