Hi, I have modified the source to make that the action=edit reads/writes from a file. I modify it with fopen in mode r+, and no problem when the new text is long equal or less than old text, but when is major it overwrites the old text as I want, but also the following. There's any function to write something in a file but not overwriting it?
Also, as I now don't care of content in bd, all the conflicts of simultaneous users handled by Mediawiki in EditPage.php now have to be handled by me, right? (with flock, I suppose)
Thanks in advance
Jordi
Jordi Domingo wrote:
Hi, I have modified the source to make that the action=edit reads/writes from a file. I modify it with fopen in mode r+, and no problem when the new text is long equal or less than old text, but when is major it overwrites the old text as I want, but also the following. There's any function to write something in a file but not overwriting it?
I'm not sure what that means...
Also, as I now don't care of content in bd, all the conflicts of simultaneous users handled by Mediawiki in EditPage.php now have to be handled by me, right? (with flock, I suppose)
Well, yeah. If you remove the core code from the wiki you'll have to replace it or live without it.
-- brion vibber (brion @ pobox.com)
On 4/25/05, Brion Vibber brion@pobox.com wrote:
Jordi Domingo wrote:
Hi, I have modified the source to make that the action=edit reads/writes from a file. I modify it with fopen in mode r+, and no problem when the new text is long equal or less than old text, but when is major it overwrites the old text as I want, but also the following. There's any function to write something in a file but not overwriting it?
I'm not sure what that means...
I have a .po file, for translations. There's a msgid "Example" in english, and later a msgstr "" with the translation or empty (must be translated). I show the content of msgid (no problem) and when I save contents, overwrite the content of msgstr. The problem is
msgid "Example" msgstr "" #comment #more comment
and writing "Example translated" in wiki
msgid "Example" msgstr "Example translated" omment
and I would like to insert some blanks before writing or something to no delete the posterior comments or more important things of later in the archive.
Also, as I now don't care of content in bd, all the conflicts of simultaneous users handled by Mediawiki in EditPage.php now have to be handled by me, right? (with flock, I suppose)
Well, yeah. If you remove the core code from the wiki you'll have to replace it or live without it.
In fact I attempted to save .po in bd, but it's a bit of useless as I want the .po modified as a file, and probably I had have to modify bd. Now when I call to updatearticle from editpage.php I also make this saving. But all the wiki stuff of collaborative web interface without user-privileges and possibility for not-login goes great for what I want to do!
-- brion vibber (brion @ pobox.com)
Thanks
Jordi
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org