Board Thread:General Coding Help/@comment-4224349-20151029202124/@comment-24473195-20151031202328

To answer the OP's question. It is technically impossible to prevent one from using any template on any page, short of preventing everyone from editing in your wiki.

That being said, the username template uses javascript. Which can be made to work in only some pages.