User:Davidwr/flagtemplateideas

flag icon idea:

On selected large articles, bot-replace with.

will be the full expansion of cc. The documentation for pages should say that 1) hand-modifications will be overwritten by a bot 2) it should be used on articles which are approaching or are past the template expansion size 3) a bot should test reverse-substituting with if the page size is below a certain size.  If the result has an expansion size below a certain level, say 1MB, then do the reverse-substitution.

Alternative:

Replace with  and re-define  as having just two parameters: 1=country code filename=override filename. If filename is blank, filename is "Flag of ". The size would be the standard size.

The documentation would say this must only be used for flags of standard dimensions where the flag name exists with the standard name, otherwise should be used instead. Document that the template is designed to be simple and used on large pages and should NOT include logic to improve its functionality.

Very simple idea, but it would make pages hard to maintain: Test recursive substitution of all uses of or  with only 1 parameter that are on pages which exceed the expansion limits, surrounded by html comments so another bot can reverse the substitution. If the result is a page that is inside of all limits, save the page and put a boilerplate note on the talk page.