From: Lea V. <vil...@cs...> - 2004-08-20 09:31:30
|
I have created a plugin that basically creates a bibtex file from a set of pages linked to a master page (*). It works and currently generates a normal looking Wiki page with the bibtex entries. However, since real bibtex files are not HTML files, I'd like my plugin to output a plain text page instead of HTML so we could just save the file to the disk as such. Generating a file to the Wiki server disk is not ideal, since all Wiki users do not have file access to the server. Any hints? (*) Basically this is very idiotic functionality, i.e. read a list of linked pages and extract sections of type @whatever{... .... } from each linked page. -- Lea 'LadyBug' Viljanen Ignorance killed the cat, Researcher, TuBE-project curiosity was framed. Univ. of Helsinki, Dept. of CS |
From: Reini U. <ru...@x-...> - 2004-08-20 10:05:11
|
Lea Viljanen schrieb: > I have created a plugin that basically creates a bibtex file > from a set of pages linked to a master page (*). It works and > currently generates a normal looking Wiki page with the > bibtex entries. > > However, since real bibtex files are not HTML files, I'd like > my plugin to output a plain text page instead of HTML so we > could just save the file to the disk as such. Generating > a file to the Wiki server disk is not ideal, since all Wiki users > do not have file access to the server. > > Any hints? Let the users download their pages with ?action=zip. At the PhpWikiAdministration page. If you want to have everything in your plugin, look at the lib/loadsave.php code. MakeWikiZip() with the request argument pages="Page1,Page2,...". > (*) Basically this is very idiotic functionality, i.e. read a list > of linked pages and extract sections of type > @whatever{... > .... > } > from each linked page. > -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Lea V. <vil...@cs...> - 2004-08-20 12:16:57
|
On Friday 20 August 2004 13:04, Reini Urban wrote: > If you want to have everything in your plugin, look at the > lib/loadsave.php code. > MakeWikiZip() with the request argument pages="Page1,Page2,...". I made some experiments and also looked at PageDump plugin. The problem is that I have a wiki page that is dynamically created by <?plugin CreateBib?> (this plugin invocation is the whole contents of the page) and all the stuff having pagenames as arguments do not seem to like that. At best with the zip method I get the literal page contents but not the dynamically generated bibtex stuff. -- Lea 'LadyBug' Viljanen Ignorance killed the cat, Researcher, TuBE-project curiosity was framed. Univ. of Helsinki, Dept. of CS |
From: Reini U. <ru...@x-...> - 2004-08-20 12:33:01
|
Lea Viljanen schrieb: > On Friday 20 August 2004 13:04, Reini Urban wrote: > > >>If you want to have everything in your plugin, look at the >>lib/loadsave.php code. >>MakeWikiZip() with the request argument pages="Page1,Page2,...". > > > I made some experiments and also looked at PageDump plugin. > > The problem is that I have a wiki page that is dynamically > created by <?plugin CreateBib?> (this plugin invocation is the > whole contents of the page) and all the stuff having pagenames > as arguments do not seem to like that. At best with the zip method > I get the literal page contents but not the dynamically generated > bibtex stuff. so your CreateBib plugin has to generate an bibtex download action button also, which dumps the bibtex to the client. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Lea V. <vil...@cs...> - 2004-08-20 14:19:14
|
On Friday 20 August 2004 15:32, Reini Urban wrote: > so your CreateBib plugin has to generate an bibtex download action > button also, which dumps the bibtex to the client. OK, I created the button, but how can I refer to the contents of that dynamic page as a whole? I understand that I need to call MailifyPage or something equivalent to strip the HTML, but that needs a page contents reference. How can I get it without doing getPage(), getCurrentRevision(), getContents() sequence which does not seem to work for dynamic pages. Sorry if this is obvious, but this is my first PHP / PHPWiki effort. I really appreciate the help. -- Lea 'LadyBug' Viljanen Ignorance killed the cat, Researcher, TuBE-project curiosity was framed. Univ. of Helsinki, Dept. of CS |