How do I make it so only admins can add full html codes to articles?/ > Answer/: How could the database determine, who have added the tags (to > make it work)?
Look in diffs? But these tags can be changed after by > another user, what can change its meaning. So there are several > “half-ways”: > > * if last change of page was made by sysop, then HTML tags are > enabled, otherwise not (if anyone make any change after, this will > be disabled) > * if sysop added HTML tags, the page is automaticly blocked for > editing by other users > > I don’t know, how to do that *in mediawiki*, it is only theory. But both > ways would require some hacks in php scripts. > > ———————————————————————— > > A quick and really dirty way is to just copy the following line to > includes\Setup.php line 211 > > if ($wgUser->isAllowed(‘protect’)) $wgRawHtml=true; > > > This will check whether the current user can change page properties > (normally only a sysop can do that) and will set the $wgRawHtml variable > accordingly. Of course (if you know what you’re doing) you can replace > /protect/ by a special HTML permission y