Commit Graph

718 Commits (fda61c9349f6420f331c8c424177f2b1f3c04100)

Author SHA1 Message Date
Simon McVittie 09a5cdbb34 Don't prepend tagbase to tags if they start with "./" or "/".
That syntax made little sense previously, and this allows sites to put
"most" of their tags under $tagbase.
2008-07-21 22:02:55 +01:00
Joey Hess 46617c23f4 rename skeleton.pm
Add '.example' so it's not installed with the other plugins.
2008-07-21 07:49:28 -04:00
Gabriel McManus e3b0584a49 Use correct term prefixes when searching.
The Z term prefix is for stemming and shouldn't be used here.
X is for custom fields.
2008-07-19 13:23:02 -04:00
Joey Hess 584f3e3061 Add a postscan hook.
* Add a postscan hook.
* search: Use postscan hook, avoid updating index when previewing.
2008-07-17 16:17:15 -04:00
Joey Hess c4f124d78a fix pos setting
What was really going on is that expanding a smiley modified the string and
reset the match process. Force set pos so it continues on from the expanded
smiley.
2008-07-17 13:11:47 -04:00
Joey Hess df3a8b183c smiley escaping fixes
Smileys need to be double-escaped to work, since the smiley plugin runs as
a sanitize hook, and markdown helpfully removes one level of escapes first.

There were some bugs in the smiley handling code that made escaped smileys
still be expanded. After unescaping a smiley, it needed to move pos forward
past it or the next pass would expand it.

Also, once the m//g got to the end, it seemed to loop back through and make
one more pass (a difference in perl 5.10's regexp exngine? I observed that
pos was undefined when this happened, so added a `last unless defined pos`.
2008-07-17 12:34:38 -04:00
Joey Hess 3096c8ea69 formatting etc 2008-07-16 17:43:42 -04:00
Joey Hess 2c05a34be1 Merge commit 'intrigeri/pedigree' 2008-07-16 17:31:15 -04:00
intrigeri 35668b87d3 pedigree rename to parentlinks: rename/adapt everything
* Renamed to parentlinks every single variable or function called
  pedigree
* Removed the parentlinks function from Render.pm
* Enabled the new parentlinks plugin by default
* Adapted testsuite and documentation to reflate the above facts

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-15 16:25:39 +02:00
intrigeri 486f460132 pedigree rename to parentlinks: renamed files, to start with
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-15 16:09:40 +02:00
intrigeri 55000fd779 pedigree: rewrote with different design
(and updated testsuite + docs accordingly)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-15 13:06:52 +02:00
Joey Hess 2696e0c6db fixes 2008-07-14 23:00:29 -04:00
Joey Hess 76bda69a92 use prune to delete rendered files
This handles deleting empty directories too.
2008-07-14 22:45:12 -04:00
Simon McVittie b29d11b3c6 Fix aggregateinternal migration so it skips expired entries, and deletes output 2008-07-15 03:24:05 +01:00
Joey Hess af48316b1d Merge commit 'smcv/aggregateinternal' into aggregateinternal
Conflicts:

	IkiWiki/Plugin/aggregate.pm
2008-07-14 20:15:08 -04:00
Simon McVittie 302bb836f2 Use _aggregated as extension for internalized aggregation 2008-07-15 01:04:29 +01:00
Joey Hess 51bf0ea529 changes to debug message printing 2008-07-14 19:43:45 -04:00
Simon McVittie 50a5ab3c4e Add aggregateinternal mode to ikiwiki-transition.
Usage:
1. Update all pagespecs that use aggregated pages to use internal()
2. ikiwiki-transition aggregateinternal $srcdir $htmlext
   (where $srcdir and $htmlext are the srcdir and htmlext options in
   your .setup file)
3. Add aggregateinternal to your .setup file
4. Rebuild the wiki
2008-07-14 23:39:22 +01:00
Simon McVittie 18b3e970ff Merge commit 'origin/master' into aggregateinternal 2008-07-14 23:34:07 +01:00
intrigeri b391b5a80b pedigree: added DISTANCE loop variable
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-14 14:52:34 +02:00
intrigeri b857b229d8 pedigree: fix RELDEPTH in PEDIGREE_BUT_ROOT...
... at least when it's not used in the same template as
PEDIGREE_BUT_TWO_OLDEST (see Known bugs section in pedigree.mdwn for
details)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-14 14:25:42 +02:00
intrigeri df42a5ef21 pedigree: added _but_root & _but_two_oldest loops
... after having learned a bit of Perl, knocked my head against
Perl references and arrays of hashes, tried to use some nice
functionnal programming constructs - no success - to make things
more generic... I'm back to the roots, with this simple code :)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:03:22 +02:00
intrigeri 16cf69477d pedigree: fixed misc bugs
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:03:06 +02:00
intrigeri f32369f669 added new plugin: pedigree
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:02:23 +02:00
Joey Hess ffc99f5904 switch preprocess hooks to use error function 2008-07-13 15:05:34 -04:00
Joey Hess e4e3d7e2d4 convert fatal error to warning
Since perlmagick is not a hard dep, and goodstuff is enabled by default,
imgs should not crash builds
2008-07-12 20:21:42 -04:00
Simon McVittie 5c0896e674 Make aggregated items be internal pages if --aggregateinternal is used.
This addresses <http://ikiwiki.info/todo/aggregate_to_internal_pages/>
in a simple way. With this approach, a flag day is required, on which all
users of aggregated pages start to inline them using the internal() pagespec;
after that, the aggregateinternal option can safely be switched on in the
setup file (and the old aggregated pages can be deleted by hand).
2008-07-12 18:15:11 +01:00
Simon McVittie 9a184badf5 Stop prepending urn:uuid: to guids that look like UUIDs 2008-07-12 17:34:40 +01:00
Simon McVittie 415c8e0cb5 Rename [[!inline atomid="..."]] to [[!inline guid="..."]] to be consistent with [[!meta guid="..."]], which also outputs an Atom <id> 2008-07-12 17:12:37 +01:00
Simon McVittie 2bd8ada5a6 Accept [[!inline ... atomid="..."]] and use it to populate the feed's Atom <id>.
This is often the same as the feed's <link> (in which case it can be omitted) but sometimes it's a urn:uuid: URN instead.
2008-07-12 17:09:41 +01:00
Joey Hess f707d62481 Merge commit 'smcv/master' 2008-07-12 12:02:57 -04:00
Joey Hess d101269bde Move yesno function out of inline and into IkiWiki core, not exported. 2008-07-12 12:01:22 -04:00
Simon McVittie 1f26a1bf16 Bug fix: use &IkiWiki::pagetitle rather than nonexistent &pagetitle in meta plugin, so that PageSpecs with title(...) work again 2008-07-12 16:44:55 +01:00
Joey Hess ca30d95a78 rename uuid to guid 2008-07-12 10:59:45 -04:00
Joey Hess 37471e92d9 elide temp var 2008-07-12 10:49:12 -04:00
Simon McVittie 9c6444bf68 meta plugin: if uuid looks like it is in fact a UUID, prepend "urn:uuid" (otherwise leave it alone, so we can assign non-UUID <id>s to Atom items to avoid planet-flooding) 2008-07-11 23:57:47 +01:00
Simon McVittie e767f18867 inline plugin: if meta plugin is also enabled, and has collected a uuid for a page, then pass it into the rssitem/atomitem templates 2008-07-11 23:44:12 +01:00
Simon McVittie 9b34b879e2 meta plugin: also collect [[!meta uuid="..."]] 2008-07-11 23:42:38 +01:00
Joey Hess d73d4fed03 rename beautify_url to stress it only works on the path component 2008-07-11 10:33:41 -04:00
Joey Hess d5de560f50 beautify url recentchanges_link redirs to
This ensures that the same link is reached as is used on pages,
so browsers will know that the link on pages has been visited, and color it
appropriately.
2008-07-11 09:44:47 -04:00
Joey Hess dcab5e2e48 template: Add support for a BASENAME variable. 2008-07-10 15:25:42 -04:00
Joey Hess 06709cdf31 improve error message if virus checker fails w/o output 2008-07-09 16:53:03 -04:00
Joey Hess 2449c596af otl: Support utf-8 files. (Recai Oktaş) 2008-07-08 20:52:30 -04:00
Joey Hess ad02f69836 attachment: Support perl 5.8's buggy version of CGI.pm.
This is truely horribly disgusting. CGI::tmpFileName, in current perls, is
an undocumented function (which should be a clue..) that takes the original
filename of an uploaded attachment, and returns the name of the tempfile
that CGI has stored it in.

In old perls, though, CGI::tmpFileName does not take a filename. It takes
a key from the object's {'.tmpfiles'} hash. This key is something
crazy like '*Fh::fh00001group' -- apparently the stringification of a
filehandle object.

Just to add to the fun, tmpFileName doesn't take the key, it expects a
refernce to the key. Argh?!

But the fun doesn't stop there, because in perl 5.8, CGI.pm is also broken
in two other ways. The upload() method is supposed to return a filehandle
to the temp file. It doesn't. The param() method is supposed to return
a filehandle to the temp file, that stringifies to the original filename.
It returns just the original filename, no filehandle.

Combine all these bugs, and you end up with this disgusting commit. Since
I have no way to get the filehandle, I *need* to get the tempfile name.
If I had the filehandle, I could probably pass it into tmpFileName, and
it might strigify to the right key name. But I don't, so the only way to
determine the key is to grub through the .tmpfiles hash ourselves.

And finally, one the temp file name is discovered, a filehandle can finally
be obtained by (re)opening it.

I recommend that this commit be reverted when perl 5.8 is a mercifully
faded memory.

I'm really, really, really glad I'm actually being paid for working on
this right now!
2008-07-08 18:10:53 -04:00
Joey Hess 2e5785907d explicitly set form type to multipart
This is the default in unstable's formbuilder, but not in stable's,
and CGI multipart is needed for fule uploads.
2008-07-08 17:18:02 -04:00
Joey Hess 22839215fb check for tempfile being empty 2008-07-08 16:21:01 -04:00
Joey Hess 6f3c980e2b undef $fh before opening 2008-07-08 12:16:36 -04:00
Joey Hess 66f35e30dc another try at dealing with CGI.pm problem
open the temp file if all attempts to get a fd fail
2008-07-08 11:25:30 -04:00
Joey Hess 71f10579c0 attachment: Support old versions of CGI.pm that lack an upload method. 2008-07-08 10:42:58 -04:00
Joey Hess f156308aef attachment: Fix an uninitialised value warning when editing a page that currently has no attachments. 2008-07-08 09:40:46 -04:00