Can an uninstall.xml remove any code between defined points?

Started by Antechinus, February 12, 2020, 04:44:48 PM

Previous topic - Next topic

Antechinus

This is something out of the ordinary, but could be very useful if it is possible.

I'm thinking of CSS in mod packages, and I'm assuming the mod author has reasons for wanting the relevant code added to index.css. IOW, does not want to call a separate file for the mod's CSS.

Installing code like that is easy. You just add it to the end of the file. No problem. The catch is that uninstalling it will fail if someone has edited the code for custom presentation, because the xml will spit the dummy about not finding an exact match for the entire block of code.

This leads to an obvious question: is it possible to write xml that will look for a starting comment and an end comment, and then remove all code between those comments regardless of what that code is?

vbgamer45

I don't think it can details of what is allowed: http://www.simplemachines.org/xml/modification

We have a search option with regex
Quote
search regexp (true|false)
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Antechinus


Advertisement: