Hi all, I'm trying to include a very small portion of raw HTML in my Wiki's Donate page-- just a PayPal button. But none of the default coding will allow it to display properly, so I'm thinking it's because Raw HTML is disabled by default. I've been reading that it's dangerous to enable it across the Wiki, so is there a way just to allow certain tags, or a small portion on a particular page, or pages ONLY edited by SysOps?
I'm not sure where I would go about changing the preference for the WHOLE Wiki if I had to in order to include the code, though I have a feeling that I would need to access that place for some other Wiki-wide preferences I was wondering about-- such as why the Talk pages are called "Discussion" on my Wiki. How do I access the preferences so I can play with these things (if necessary)? -Azurite
On 09/07/07, Azurite azurite@seventh-star.net wrote:
Hi all, I'm trying to include a very small portion of raw HTML in my Wiki's Donate page-- just a PayPal button. But none of the default coding will allow it to display properly, so I'm thinking it's because Raw HTML is disabled by default. I've been reading that it's dangerous to enable it across the Wiki, so is there a way just to allow certain tags, or a small portion on a particular page, or pages ONLY edited by SysOps?
This sounds like a classic case for a parser hook extension.
Rob Church
Well, I do have the ParserFunctions extension installed and working, but judging by what it says about raw HTML, it won't work for mine- the HTML tag involved is <form>. I'm not sure if there's another sort of HTML that might not have that code, but all I want is a PayPal link... -Azurite
On 10/07/07, Azurite azurite@seventh-star.net wrote:
Well, I do have the ParserFunctions extension installed and working, but judging by what it says about raw HTML, it won't work for mine- the HTML tag involved is <form>. I'm not sure if there's another sort of HTML that might not have that code, but all I want is a PayPal link...
No, what I'm talking about is a parser hook extension, that is, a <tag> extension. You could write a simple extension that injects the desired HTML, then just use, e.g. <paypal /> wherever you wanted the form to appear.
There should be dozens of examples of this on the web and in our Subversion repository.
Rob Church
I guess I'm a bit of a newbie to extensions; looking for ParserHook on wikimedia.org/wiki brought up a lot of results, but I'm not sure which one will do what I need, and sorting through them all seems a bit foolish. What exactly might such an extension be called? I've already seen the articles for extending wikitext, but it doesn't seem to contain anything specific enough/pertaining to my situation. -Azurite
On 10/07/07, Azurite azurite@seventh-star.net wrote:
I guess I'm a bit of a newbie to extensions; looking for ParserHook on wikimedia.org/wiki brought up a lot of results, but I'm not sure which one will do what I need, and sorting through them all seems a bit foolish. What exactly might such an extension be called? I've already seen the articles for extending wikitext, but it doesn't seem to contain anything specific enough/pertaining to my situation.
There's an example at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/examples/Parser_....
Rob Church
Thank you Rob for the example... but if it's required to write/customize the Parser Hook extension to get it to work, is there anywhere that has instructions on how to do this? I don't know what to do with the code given in the example Rob linked me to. -Azurite
On 10/07/07, Azurite azurite@seventh-star.net wrote:
Thank you Rob for the example... but if it's required to write/customize the Parser Hook extension to get it to work, is there anywhere that has instructions on how to do this? I don't know what to do with the code given in the example Rob linked me to.
Mail me privately with the HTML you'd like included in the hook, and I'll knock together an extension; it will take all of about 30 seconds.
Rob Church
mediawiki-l@lists.wikimedia.org