I have a website built with MediaWiki CMS which I host on a CentOS based Apache “shared server environment” (SiteGround) in which I can partially control Apache by:
- Some Cpanel tools
Background to understand my problem
My website contains a ContactPage contact form in which the subject field is hardcoded into the form wrapper via PHP;
This is odd, because all other fields aren’t hardcoded like this and are actually optional and injected into the wrapper from the form’s default template which I pasted into the main customization file of the CMS (
LocalSettings.php); I also added a select list field myself, directing potential customers to send me contextualized job inquiry messages
All of these optional fields are HTMLForm template-engine fields.
If someone wants to remove the subject field from backend (from PHP code by which it is hardcoded) from whatever reason, it would be a logistical pain, because, for example, after every automatic upgrade, it will have to be removed again, probably manually, from ContactPage extension relevant PHP source code (unlike all other fields which are optional from the very stable file
I want to remove the aforementioned subject field and the only very stable ways I have with the current architecture of MediaWiki, are CSS and JS;
But this is problematic because a user can easily turn off both (most users won’t do that, but still).
I want to remove the field because I have other custom fields such a select list that direct a customer to send me messages in the context of jobs only (I don’t want to get any other kind of messages from surfers in that particular site).
How to prevent parsing of a should-be-parsed HTML element from server (Apache)?
Is there any “nasty trick” with
.htaccess, SSH or Cpanel to prevent the parsing of the should-be-parsed subject field by some criteria (say, its HTML attribute or CSS class or whatever other applicable criteria)?