Extension talk:TagCorrection

From mediawiki.org
Jump to navigation Jump to search

Add example?[edit]

Hi, could you give an example of how you would change the code to include, say, an RSS tag? That would be very helpful. Thanks.

Can this be extended for re-editing?[edit]

I have got this working now. This seems to work well when inserting tags but if you edit the article, it then destroys the tag again by introducing various stray "&amps". Is it possible to extend it so that it works also when the article is re-edited using FCKeditor?

I will try to make this possible[edit]

I just changed the code at the extension site, since through mediawiki parsing the code was destroyed and wouldn't work.

At the moment I'm just working on a more convenient way to add tags. If you check the site again today evening the code will be improved.

I will then also try to make reediting possible. --Jperl 12:06, 9 September 2007 (UTC)

new version online[edit]

hi, I just put the new code online. Now new tags can be added more simply. I haven't got rss feed extension installed. Can you tell me how the editor destroys the code?

RSS tag destruction example[edit]

Thanks for the updated version - looks great. In terms of the RSS problem, a simple Rss tag can be inserted initially thanks to your extension - for example, Extension:RSS -- Error: "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml" is not in the whitelist of allowed feeds. The allowed feeds are as follows: https://wikimediafoundation.org/news/feed/, https://wikimediafoundation.org/category/technology/feed/, https://wikimediafoundation.org/category/technology/mediawiki/feed/, https://discourse-mediawiki.wmflabs.org/c/ask-here.rss, https://codeclimate.com/github/wikimedia/mediawiki-extensions-CentralNotice/feed.atom, https://codeclimate.com/github/wikimedia/mediawiki-extensions-DonationInterface/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-crm/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-dash/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-php-queue/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-SmashPig/feed.atom and https://codeclimate.com/github/wikimedia/wikimedia-fundraising-tools/feed.atom.
The issue is with more complex rss tags that include an "&" symbol. They degrade on editing (even with the new version of your extension), with increasing numbers of "amps" being included. I tried amending your file as follows to add in &amp:

#additional tags to be added here
$wgTagnames = array("source", "rss");
#tags where content like &quot;, &lt;,  should be replaced (eg <source>)
$wgTagnamesHtmlReplace = array("source", "rss");
#html codes which should be replaced within the tags of $wgTagnamesHtmlReplace
$wgHtmlCodeReplace = array('&quot;' => '"', '&lt;' => '<', '&gt;' => '>','&amp;' => '&', '<br>' => chr(13), '&nbsp;' => ' ');

But that didn't seem to do it. Any thoughts? Thanks.

Thanks for your response[edit]

My first thougth is that the &amp; in the editor might be an &amp; for the & and then another amp; (if you look at the sourcecode of my post you will see what I mean, cause I have to write &amp;amp; to show this as &amp;). I will have a look on that on my own (install rss extension and test it) this weekend. I hope that I can figure out what the problem is.

Regexp mistake[edit]

Hi, I just uploaded a corrected version. There was a mistake in the regular expression so the sequences weren't replaced. Should work now. I also corrected the problem that the editor is automatically making an external wikilink between the rss tag. Please tell me if there are appearing any other problems (I fear they will ;))

Looks great now[edit]

Seem to be working perfectly - excellent stuff. Thanks.

Does this extension work with MediaWiki 1.13?[edit]

Hi, I installed the extension on MediaWiki 1.13, but it seems to do nothing. The Tags are destroyed as before :-( Any idea? Thanks a lot! --Filburt 15:54, 4 November 2008 (UTC)

Solved: Broken <ref>, <references> and user tags[edit]

In combination with the latest version of Extension:Cite <ref> and <references> tags will break while switching between FCKeditor and Wikitext (the result is <ref>, <references>). Also user tags i.e. extension tags which are not automatially identified by FCKeditor break this way.

In the development area at the FCKeditor website you can find two patches to solve this problem - they seem to work fine:

(For patching files on windows systems use TortoiseSVN). --Filburt 14:49, 23 November 2008 (UTC)

I can't download the file[edit]

I tried the following link and it doesn't work.
Is the extension still available?
-Coulomb 10:46, 30 December 2008

back again online[edit]

sorry, the problem was that my website was down. I didn't expect this and posting the code to mediawiki is a bit difficult, because of the tags and < &lt; etc. the link should work again.

But strange, that I didn't get an email that the discussion was changed. Maybe I deleted to watch the page. Otherwise I would have answered earlier. --Jperl 19:11, 12 January 2009 (UTC)