1) Any extension which you offer to the community should be under the community code pool.
2) You shouldn't, but you can, and sometimes you must because Demeter has been ignored a lot in Magento 1.
There is almost always a way around the need to override, including the use of Reflection as mentioned by Vinai awhile back.
If there is too much downside to workarounds, you simply must take ownership of the class definition. You can do one of the following, provided that users are made aware:
- In the community code pool, provide the modified definition under Mage | Varien | Zend namespace as appropriate. Possible concern would be that end user might have done the same.
- As above, but in a new code pool: prepend the new codepool to the bootstrapped include paths using
set_include_path(). Drawback: more
stat()ing caused by the autoloader, and your include path manipulation will be non-obvious as it is outside of the bootstrap.
- If possible, provide the definition yourself before it is loaded from its normal location, e.g. by explicitly
include()ing it from a non-standard location under your namespace.
Sound your case-by-case needs out here - someone will have an idea. As for the template path hints in the admin scope, see my answer which doesn't even require PHP.