Resource icon

Template Modification System (TMS) 1.3.1

No permission to download
Thanks for your answer. Not the wanted one, but ... :)

A "small" Suggestion for your system:
It would be great to export only a part of templates combined to a Hack, Addon or defined part of the style. Like the Addon part of the phrases (I hope to find the right words)


Will this be possible?
 
Understand you. Do you mean a part of modifications instead templates?
Yes.

For Example
There is an Addon with a lot of templatemodifications. So it would be nice to offer this Addon with a special "TMS-Template-Part". So if you use the TMS you will be able to install the "TMS-Template-Part" of this Addon and all templatemodifications will be done. So you will be able to offer only a special part of the templatemodifications and not the complete style.

I know for this a user need to install TMS first but for me TMS is the first installation after installing xenforo. Never use a xenforo without this Addon ;)
 
Good. Will do same. ACP doesn't need to be optimal. That's why TMS doesn't work with admin templates.
Yeah, good feature. I have to think how to realize it. Maybe there will be checkboxes for exporting mods.
But export templates (not mods) for addon is conflicting way since every 2 addons changing same template will conflict.
 
Your right, maybe there will be a conflict if two addons changing same template but if someone find this out you will be able to use the "Execution Order" for a solution
 
example modification using callback???
This is a test callback:
PHP:
    public static function templateTms( &$template, &$applyCount, $styleId )
    {
        $applyCount = 1;
        $template .= 'THE END';
    }
But callback is really needed for VERY comlicated cases.
For example, if you want to remove a chunk from one template an insert it into another template.
Changes dealing with one single template can be done with one regular expression.
 
What arguments has XenCentral_Framework_Model_Template::getAllTemplatesInStyle() ? Could copy this method here?
Guess this framework adds some extra arguments to the method. This is 100% conflicting way of extension.
Using registry for that would be more safe:
FYI, XenCentral fixed this on their end. Thanks guiltar!
 
There are two (2) template edits that needs doing. If you have TMS installed, then it will be automatically done for you when you install the add-on in the next step. Otherwise, open the 'Template Edits' folder and locate the 'post_edit' and 'post_edit_inline' text files. In the ACP, overwrite these templates with the ones provided. If a template was previously modified, simply add the commented bold text from the template provided to your existing modified one.

This was a quote from User Essentials by Syndol.
Is this the main function of TMS ? Making template edits automatic for Addons ?

Was there a TMS-like thing for vBulletin ?
 
The Master Style should just been shown if debug mode is enable.
It's true for templates since master templates are needed for backup and that's why accessable only for developers.
But if we consider template modification as a particle of template edit the backup of it will be just deleting it.
Master style is often needed for non-developers to apply some mod to all the styles (banner, block, etc,..).
This was a quote from User Essentials by Syndol.
Is this the main function of TMS ? Making template edits automatic for Addons ?

Was there a TMS-like thing for vBulletin ?
Yes it's purpose: making template edits without template edition :)
It works also for style so every style could be done without custom templates.
That simplifies upgrage to newer versions of XF.

This is TMS for vBulletin.
http://www.vbulletin.org/forum/showthread.php?t=152931
Vb users was asking to make similar for XenForo.
 
Yes I did. TMS just happens to be part of the log. I get the error either with or without TMS.

I suppose it's still possible TMS made database modifications that caused the problem down the line.

So, can this Addon destroy my Forum? I dont now anything about MySQL Databases, but when this Addon change something, that i am not able to install/update a Style, than i wont install it. :(
 
If you do your add-on template modifications using the TMS, then it will export them with the add-on.

When you install the add-on, if TMS is present it will write the template edits. If the TMS is not present, it skips over them and you have to manually edit templates.

The TMS actually reduces a serious amount of PHP coding in add ons when used, because you usually don't need to pass variables when editing a template directly, providing the variable is used in that template already... where if you hooked into the template you would need to write more PHP to do the job.

Thanks Anthony. Great explanation of TMS.
Hopefully all Addons use TMS.
And everyone should install it.
 
Thanks Anthony. Great explanation of TMS.
Hopefully all Addons use TMS.
And everyone should install it.

Therein lies the problem for addon developers; users are somewhat required to install a dependency in order to use their addon properly. Both requiring the dependency or falling back on manual template edits are undesirable as it adds complexity to the installation steps of an addon.

Ideally TMS would be natively adopted by XenForo, either that or having a bare basic implementation that addon developers can bundle with their addons in case the end-user does not have TMS installed.

As much as I like TMS, I won't be using it in my addons until a solution for this problem has been introduced, as TMS doesn't do anything an addon developer can't do natively in their addon, albeit with a bit more complexity.

I think at the moment it's mostly useful for people with custom themes that want to stay as compatible as possible with future updates.
 
Therein lies the problem for addon developers; users are somewhat required to install a dependency in order to use their addon properly. Both requiring the dependency or falling back on manual template edits are undesirable as it adds complexity to the installation steps of an addon.

Ideally TMS would be natively adopted by XenForo, either that or having a bare basic implementation that addon developers can bundle with their addons in case the end-user does not have TMS installed.

I agree TMS should be installed in Xenforo by default.
I don't suspect that will happen anytime soon.

Getting the word out that "everyone should install it" would help.

I'm not entirely convinced about your argument that because some users might not install it before installing your addon .... you should ditch it.
Are you throwing the baby out with the bathwater ?
 
I agree TMS should be installed in Xenforo by default.
I don't suspect that will happen anytime soon.

Getting the word out that "everyone should install it" would help.

I'm not entirely convinced about your argument that because some users might not install it before installing your addon .... you should ditch it.
Are you throwing the baby out with the bathwater ?

This of course depends on the addon you're releasing and your own personal preference as an addon developer, it goes back to what I said concerning the actual functionality of the addon though; as an addon developer there is nothing TMS does that I couldn't do myself via normal XenForo code events, TMS just makes things easier. That said I see no reason why I would impose this dependency on users of my addons.

Edit:

Not to sell guiltar short, TMS also has a significant advantage in terms of performance, as the modifications you make are compiled into the code and require less server-side code to run dynamically than with a regular XF code-events implementation.

To be clear I absolutely love TMS; I think it's a great addon and should definitely be a native feature. My concern is with it being a dependency.
 
As a user I want think to be as stable as possible.
I don't mind not doing template edits as well !
Naatan, when I buy your addons, I want to click [Buy] and I'd like it to work as quickly and painlessly as possible.
I know Xenforo isn't Wordpress or an iphone. But iphone app sales should teach addon makers and xenforo an important lesson: easy installation, more sales.
 
As a user I want think to be as stable as possible.
I don't mind not doing template edits as well !
Naatan, when I buy your addons, I want to click [Buy] and I'd like it to work as quickly and painlessly as possible.
I know Xenforo isn't Wordpress or an iphone. But iphone app sales should teach addon makers and xenforo an important lesson: easy installation, more sales.

That's exactly what I'm saying; easy install. Adding TMS as a dependency negates that. I'm not advertising manual template edits, I'm saying an addon developer can make those template edits without TMS as a dependency; it's just a bit more work.
 
That's exactly what I'm saying; easy install. Adding TMS as a dependency negates that. I'm not advertising manual template edits, I'm saying an addon developer can make those template edits without TMS as a dependency; it's just a bit more work.
Ahh.. I get what you are saying.
It'll probably help the "less experienced" coders more :)
 
Top Bottom