Jump to content

Template differences page: make it easier to find template


Recommended Posts


When I go through template differences for new versions I use a combination of git diff in my local repo and seeing the template differences page here in cases where I would like some further confirmation/clarity on what have changed. 

However, currently it's very hard to find specific template bits on that theme differences page. For example template bits like: 

  • forums/front/index/index.phtml
  • forums/front/global/row.phtml

I use ctrl + f in my browser to search for templates like includeMeta and includeJs, but for the templates above that kind of approach is impossible. Which leads me to have to scroll through the whole ordeal to find it or find something specific in the template itself I can search for. 

Some suggestions at the top of my head on how it could be improved. Either one of them would work, I don't ask for all of them

  1. Create an inline search that will let us search for the names of the template bits or add filters (Application | Location | Group | Template ) where we can easily pick and choose. Bonus points if the page is then simply updated with ajax to only show those templates that match.
  2. Instead of having all the columns (Application | Location | Group | Template ). Simply have a single column/header where all the text is written inline. It could be like: Application: Forums - Location: Front - Group: Global - Template: row (Then I could easily do ctrl+f "Template: row" in my browser. 
  3. Simply Add .phtml to the end of the name in the Template-column
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...
  • 1 month later...

Fine. Since you're not doing anything. 


(See updated images below)

Behold my magnificient and heavy Javascript: https://github.com/prebenlm/misc-code/blob/master/custom-js/invisionpower.com/theme_differences_improvements.js

You'll have to wait a while for the javascript to finish executing.

Custom javascript installed for this domain with the Chrome plugin: https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija

EDIT: Updated script

Link to comment
Share on other sites

I was in chat with TSP while he was banging this out. Would be remiss to not suggest the simplest solution that would take all of a minute to implement. 

Just like on forums index you have the toggle on the category headers to toggle display/hide the underlying content (in this case the list of forums beneath) just add that toggle to the diffs. It would save eons of time not having to scroll through method after method, template after template, to see the ones we want. Show all of the headers with the toggle collapsed by default, then let us when we would like to see the diff on it, open it up with the toggle. 

I think I suggested this with my other account here two years ago...

Link to comment
Share on other sites

Yes, it would have been much easier if IPS simply improved the HTML/PHP logic behind this, but that seems unlikely. So I had to just make some slow javascript script, yey :D

I updated the script a bit and hosted it github now: https://github.com/prebenlm/misc-code/blob/master/custom-js/invisionpower.com/theme_differences_improvements.js

EDIT: I updated it once more. Color coded added/deleted templates
EDIT: Updated it once more




Skjermbilde 2017-02-18 kl. 23.13.50.png


Skjermbilde 2017-02-18 kl. 23.13.14.png

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...