On 11 Mar 2005, at 09:54, David Gerisch wrote:
I want to be able to populate a page with different template texts.
If you mean the same URL with different texts at different times, you're gonna run up against the "cache problem".
Essentially, it is pretty deeply wired into MediaWiki that pages do not change unless edited. You can search the archives for "cache" and see that some are discussing ways around this, but it won't be simple or easy.
I'm using MediaWiki 1.4rc1. I see in EditPage.php a function called getEditToolbar(), that then has an array of toolbar buttons.
Question 1: would this be the best/correct place to add my template text?
At least on Safari using 1.4 beta 5, the edit tool bar *does not* put the text in the edit box at the insertion point; it puts it in the little field above that, which you then have to copy-n-paste. Cumbersome. It would be nicer if it could plop it at the insertion point. (I have not seen this mentioned in the release notes for newer versions; apologies if it's been fixed.)
Question 2: Is it possible to get those edit buttons to prompt the user for data?
That's what the current buttons do -- did you try copying and modifying their code?
BTW: I just had great fun hacking SpecialListusers.php and QueryPage.php to display user info (which I've added additional fields to) in a table. (See http://www.IslandSeeds.org/wiki/Special:Listusers)
Since ListUsersPage->formatResult() only does one record, and the outer HTML construct is buried deep within QueryPage->doQuery(), is there any interest in factoring that part out so subclasses can override? Something like formatOpen(), formatClose(), and formatRecord().
(The last one is needed becasue the output of formatResult() is decorated with <li...>...</li> inside QueryPage->doQuery() -- perhaps this is best moved to formatRecord() instead?)
I'll do the work if it will get rolled in -- otherwise, I've just made my changes in-line via "$this->getName() == 'Listusers' ? ... : ..." which I don't like, but it'll be easier to merge in the next release than the more comprehensive solution.
:::: We are like tenant farmers chopping down the fence around our house for fuel when we should be using nature's inexhaustible sources of energy - sun, wind and tide. I'd put my money on the sun and solar energy. What a source of power! I hope we don't have to wait until oil and coal run out before we tackle that. -- Thomas Alva Edison (1847-1931) :::: Jan Steinman mailto:Jan@Bytesmiths.com/Item/80BF02