Thread:Project:Support desk/Sidebar Customization -- PHP includes?

We are using MediaWiki 1.24.1 and the Vector skin. We have managed to sort out how to add in an ad in the Sidebar using this guide, but there are a few other elements that we display in the sidebar elsewhere on our site that we would like to reproduce on the wiki's sidebar. However, elsewhere the inclusions are accomplished through php includes of txt files as well as through straight inclusion of a couple of code snippets that include php, and I am not sure this can be done with MediaWiki?

Would it be possible to replace the php with something else that does work? For example, here's one of the php includes we use:

The other bit we use php for is to rotate between a couple of static ad images:

I did look at some sidebar modification extensions but most don't seem applicable, or seem not to be maintained any longer.