1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 crazy idea but....

Discussion in 'Styling and Customization Questions' started by Rob, Jul 24, 2013.

  1. Rob

    Rob Well-Known Member

    OK, admittedly this may sound crazy but....

    XF 1.2's built in template modification system means that add ons can modify templates easily and on the fly.... This means far less headache at upgrade time because there are far less actual edits.

    In a crazy moment of madness, I wondered if this system could also be used to style / skin an entire site with zero actual template edits.....

    OK, I'm just throwing this out there.... I have no idea what headaches this would cause but just thought the idea itself was interesting at least.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There's no reason why you can't create an add-on and attach all of the template edits to it.
  3. EQnoble

    EQnoble Well-Known Member

    I did just this the other day (adding custom elements that only apply to a specific style using the template mods system)...and it seems to work fine for me.
  4. Rob

    Rob Well-Known Member

    Yeah that's what I thought. I'm wondering if the amount of work to upgrade a skin implemented this way would be more or less than if done with actual edits.

    I'm also wondering if either method would be faster at run time and if either method would compile faster when installing add ons?
  5. EQnoble

    EQnoble Well-Known Member

    In my opinion less work because I can see from looking at what I did that it will take WAY less time per upgrade vs having to make sure all my edits are in the same places manually and the edits themselves didn't really change between the two methods so no difference in time really for me anyways when it comes to actually making the modifications.

    I guess to test the speed issue one could make a massive amount of edits and then convert them all with the TM system and then gauge the two against each other while testing various things. If I had the time for it I would test it myself.
  6. Rob

    Rob Well-Known Member

    I'm just thinking out loud that's all.
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Using the template modification feature would potentially require zero manual input as they would be automatically applied.
    The only drawback is if the template changed sufficiently to stop your modification working; you may not be aware at first.

    Doing a template edit would at least alert you if a template was changed in the next release as you would be prompted to merge the changes.
    That however would require manual intervention for every outdated template.

    Think of the template modification feature as EXTRA.css for templates.
    If CSS is changed in a release you won't necessarily know if your custom edits in EXTRA.css will work as you won't be notified, and in fact this was the case with 1.2 as a lot of the account page CSS changed, for which I had custom CSS in EXTRA.css, which no longer worked.
  8. Shelley

    Shelley Well-Known Member

    If any residual css were in Extra and didn't work I don't think it would be difficult to spot what css isn't working. I personally know if any css in EXTRA doesn't work on my site and that is with a template a mile long.

    edit: Same rule with TM Edits
  9. DRE

    DRE Well-Known Member

  10. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, what I mean is unless you manually check each of your EXTRA.css entries against the original, you won't be aware of any changes until you upgrade and then check your site.

    Of course, if you do it on a dev/test site first it's not an issue.
    Shelley likes this.

Share This Page