Fixed Administrators can create template modifications when development mode is disabled

Jeremy P

XenForo developer
Staff member
Affected version
2.1.6a
The button to create a template modification only appears only development mode is enabled, but administrators with style permissions can create them anyways by accessing the URL directly. I'm not sure which is the desired behavior, but it should probably be reconciled somehow.
 
OK, if it matters, my vote would be that we are able to create template modifications with or without development mode, and my thread is here just for reference: https://xenforo.com/community/threa...ow-does-it-work-how-to-create-new-one.174707/

Sometime we need to edit templates and template modification system is nice, something similar I'm still using with vB, but it is addon, to edit templates. I thought that I get such tool out of the box (and not needing to go in development mode).

So, I vote for button for new modifications visible all the time.
 
@Chris D, but will it not be right to allow administrators to create modifications to the templates? After all, the administrator can create a phrase, create templates. And if you immediately apply to several styles? Or that would not go straight into the template and could be created. Or create an suggestion?
 
Template modifications are primarily a developer tool. Admins should modify templates directly and to impact several styles at the same time, they should make use of the style parent/child relationship so that changes in a parent template cascade down to the child styles.
 
Admins should modify templates directly
Nice idea, when we have many unrelated styles and should always keep in mind, where and what we replaced and on what when engine or addon is upgraded and we receive "outdated templates".

Please, give back for admins access to TMS. We should have access to create and edit our own template modification entries.
 
Template modifications are primarily a developer tool. Admins should modify templates directly and to impact several styles at the same time, they should make use of the style parent/child relationship so that changes in a parent template cascade down to the child styles.
This is understandable, but then it begs the question, why then for the administrator to create templates and phrases? After all, this is also the primarily of developers. Or an ordinary administrator who is not familiar with the syntax will be especially able to create his own macro or template? No, then why? When using the template modification system it would be much easier for him.
Then the question again arises, why allow the dump function outside of developer mode? Why does the administrator need this? Now it looks very strange, considering that when creating a custom modification, it was also marked as Custom modifications.
I did not receive an answer to the question I create an suggestion or it will not be interesting?
Sometime we need to edit templates and template modification system is nice, something similar I'm still using with vB, but it is addon, to edit templates. I thought that I get such tool out of the box (and not needing to go in development mode).

So, I vote for button for new modifications visible all the time.
 
Admins should modify templates directly
Yes, but this impacts more severely upgrades, which can cause more problems for inexperienced admins then allowing them to use template modifications system.

On the other hand, now that I know that I only need to place my (live) site in development mode, I'll do that. In the long run, you only made admins jump through one more hoop, making it a bit harder and more complicated, but in the end, they still have it available.

Honestly, it doesn't look like good move in my opinion. Make life of admins easier, and if you really must, create some kind of notice that warns admins about ... not sure about what, because admins who already have need to edit templates can do that, but they do that in just worse manner (as it impacts more severely upgrades).
 
Being the inventor of TMS for vBulletin, I am totally with @Chris D - template modifications are meant for developers, not for end users to modify the look and feel of the site.

Especially for inexperienced admins, modifying templates is a lot easier then dealing with template modifications as you directly see the full modified code; with template modifactions you alwas just work on a tiny part of the template and don't see how multiple modifactions work together and might even create conflicts.

Having said that, nothing stops you from running just the backend in development mode just for your IP (or baybe even just the backend justr for your IP if a specific development cookie is set).
 
Especially for inexperienced admins, modifying templates is a lot easier then dealing with template modifications as you directly see the full modified code;
From my experience, when I don't know what I'm doing, I usually don't do that (or take more precautions to know what I did, i.e. I can restore to what was before).

I'm saying that just because here we have argument that someone doesn't know what he's doing. Well, yes. But some of us know what we are doing (or at least we are learning).

And ozzy47 mentioned his addon, there are other addons, also in manual there's instructions what we need to edit to enter development mode, etc. So, if I want to access template modifications, I will.

More importantly, if I don't know what they are or how to use them, I wouldn't use them even if there's button to add new template modification. Generally speaking, people use things they know how to use if they are at least a bit smart. If they aren't a bit smart, they still can mess things up in very creative ways anyway.
 
I want bump this thread after 1 year.

In this year (2021), March 14th, @NikitOS reported strange behavior when fields in add-on imported data (such as "TMS" (!), "Cron entries" and another stuff) can be edited and saved into database (and cached, yes) without enabling a developer mode. Mike answered "this is not something we would consider a bug". Ability remove readonly attribute from form inputs, perform required change and successfully save element don't treats as a "bug", but ability append /add into request URI and create required template modification - "bug".

This can't be understanded, when user can create phrases, templates, cron entries without enabling a developer mode, user can edit already created/imported cron entries, template modifications. But add new template modification - "you should suffer enable dev mode".
Maybe you rollback this change?
 
Back
Top Bottom