Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

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)?

0
Posted

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)?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123