Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[HELP] Perl

Name: Anonymous 2009-01-28 19:20

I been trying to set up a wiki for personal use, but this WikiWord shit is the worst thing I've ever seen. Who's bright idea was to make links work like that? Anyways, the thing is in Perl I don't know shit about programming, let alone Perl. So I was wondering if you expert programmers have a suitable solution to my problem.

The only thing I want is a way to put a space between WikiWordLinksThatLookLikeThis.

I found these lines that change the way links look.
my $name = "ICANEDITSHITHERE";
 my $title = shift @_;
 -e "pages/$title"
  ? "<a href=\"wiki.cgi?$title\">$name<\/a>"
  : "<a href=\"edit.cgi?$title\">?<\/a>$title";
 }


So if I edit a page and put WikiWordShitLink and save, it'll show up as ICANEDITSHITHERE, provided that I am using the aforementioned code.

There's also this related code elsewhere in the file.

my $link = "[A-Z][a-z0-9]+([A-Z][a-z0-9]+)+";

my $page = $ENV{QUERY_STRING} =~ /^($link)$/


I don't know what to do, but I'd figure you expert programmers would. Source is here: http://leuf.net/ww/tww?WikiWaySources

Name: Anonymous 2009-01-28 19:22

Use MediaWiki. /thread

Name: Anonymous 2009-01-28 19:28

Uh-oh, you got a stack pointer monadic overflow!

Name: Anonymous 2009-01-28 19:55

BIG IRON

Name: Anonymous 2009-01-28 19:57

>>2
MediaWiki is pig.

Name: Anonymous 2009-01-28 20:01

>>5
s/.$/ disgusting./

Name: Anonymous 2009-01-28 20:02

Try using UseModWiki instead. It's another Perl wiki software.

>>2 Gives good advice, MediaWiki is your best bet.

>>5 Yes it's pig, but it works.

Name: Anonymous 2009-01-28 20:03

mediawiki is what php script kiddies use because it has a MILLION features that they will never use on their empty wiki.

Name: Anonymous 2009-01-28 20:11

>>7
I was going to try UseMod before I used QuickiWiki, but their site is down or something, doesn't show for me: http://www.usemod.com

As for MediaWiki, I didn't want bloated, I want small and simple. Which also brought me to TinyWiki as well, but their site doesn't work either.

Name: Anonymous 2009-01-28 20:20

>>9
PmWiki is another good alternative to MediaWiki. It's written in PHP though. (I'm assuming you want a Perl wiki)

http://www.pmwiki.org/

Name: Anonymous 2009-01-28 20:21

>>9
I used a simple wiki written in Bourne shell once, think it was just called shwiki, but damned if I can find it now.

Name: >>11 2009-01-28 20:32

Name: Anonymous 2009-01-28 20:43

#!/usr/bin/perl
 use CGI':all';$$_=param$_ for x,t;$z=($t&&"+>").$x;open z;print z$t
 if$t;$_=escapeHTML($t||join"",<z>);s/([A-Z]\w+){2,}/v$&/ge;print
 header,h1($x),pre($_,map{"\n".v$_}grep{open
 _;grep/$x/,<_>}<*>),start_form,textarea(t),hidden(x,$x),submit,end_form;sub
 v{a{href,url."?x=@_"},@_}


Eat your heart out.

It doesn't work for me, but http://c2.com/cgi/wiki?ShortestWikiContest

Name: Anonymous 2009-01-28 21:05

>>13
rm -rf /

Name: Anonymous 2009-01-28 21:08

>>13
SigWik, 4 lines, 222 chars of Perl and Shell. (source: http://caseywest.com/code/scripts/sigwik.txt) (based on FleaWi)
FleaWi, 4 lines, 228 chars of Perl and Shell. (source: http://nick.cleaton.net/fleawi.txt) (based on SigWik)

SigWik...(based on FleaWi)
FleaWi...(based on SigWik)

Hmm...

Name: Anonymous 2009-01-28 21:41

No solution to my problem then? It's grown on me.

Name: Anonymous 2009-01-29 2:46

>>16
I would help, but I still don't understand what your problem is and how is the code you posted related.

Name: Anonymous 2009-01-29 6:38

>>6
s/\.$/ disgusting\./

Name: Anonymous 2009-01-29 7:54


 #                  or is it $title that you want to fix here?
 $name = join(' ', grep(/.+/, split(/([A-Z][a-z0-9]*)/, $name)));
 my $title = shift @_;
 -e "pages/$title"
  ? "<a href=\"wiki.cgi?$title\">$name<\/a>"
  : "<a href=\"edit.cgi?$title\">?<\/a>$title";
 }

Name: Anonymous 2009-01-29 11:08

>>17
http://leuf.net/wiki/files/SeedQuicki.tar.gz
This is the file I'm using.
>>19
Yes, I'm trying to fix name, using title. That is, $name is something I made up so $title (no spaces) can be used for the url and $name (with spaces) could be seen on the page itself.

Originally it looked like this: "<a href=\"wiki.cgi?$title\">$title<\/a>"

I've been trying all night to work with it but nothing. Although I have been able to figure out other things like how to make my own markup for it, it's been pretty neat, but my original problem eludes me.

Name: Anonymous 2009-01-29 11:16

>>19
Also, this bit did not seem to do the trick. :(

Name: Anonymous 2009-03-06 7:44


The space station base   of the UAC   he knew there   were demons This?

Name: Anonymous 2009-03-06 7:45

SORTED SUBJECT.TXT: http://noog.org/cgi-bin/prog

Name: Anonymous 2009-07-12 2:44

Fatal error Message could not be posted  by me or  Common Lisp platforms  and is primarily  written in Scheme  it can be  interesting and profitable  but as a  result of among  other things a  ton of OCR  scanning of different  types will respond  differently to the  first row of.

Name: Anonymous 2009-07-12 2:45

>>24
data:text/html;base64,PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PHRpdGxlPnNob3VsZCBpIHVzZSBzYWdlPzwvdGl0bGU+PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPmZ1bmN0aW9uIGEoKXtmdW5jdGlvbiBjKGkpe3JldHVybiBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChpKS5jaGVja2VkfWFsZXJ0KGMoJ3ExJyl8fGMoJ3EyJyl8fGMoJ3EzJyl8fGMoJ3E0Jyl8fGMoJ3E1Jyl8fGMoJ3E2Jyl8fGMoJ3E3Jyk/J3llcyc6J25vJyk7cmV0dXJuIGZhbHNlfTwvc2NyaXB0PjwvaGVhZD48Ym9keT48Zm9ybSBpZD0icXVlc3Rpb25zIiBvbnN1Ym1pdD0iYSgpIj48b2w+PGxpPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9InExIiBjaGVja2VkPSJjaGVja2VkIj4gbXkgcG9zdCBpcyBzcGFtLjwvbGk+PGxpPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9InEyIiBjaGVja2VkPSJjaGVja2VkIj4gbXkgcG9zdCBpcyBhYm91dCBzb21ldGhpbmcgbWVudGlvbmVkIGluIHNvbWUgb3RoZXIgcG9zdCBpbiB0aGUgdGhyZWFkLjwvbGk+PGxpPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9InEzIiBjaGVja2VkPSJjaGVja2VkIj4gbXkgcG9zdCBjb250YWlucyBhdCBsZWFzdCBvbmUgbWVtZSBmcm9tIC9iLywgL2cvLCAvbG91bmdlLCBvciAvcHIvLjwvbGk+PGxpPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9InE0IiBjaGVja2VkPSJjaGVja2VkIj4gaSBhbSBwb3N0aW5nIHdpdGggYSBuYW1lLjwvbGk+PGxpPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9InE1IiBjaGVja2VkPSJjaGVja2VkIj4gaSBhbSBwb3N0aW5nIHdpdGggYSB0cmlwY29kZS48L2xpPjxsaT48aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJxNiIgY2hlY2tlZD0iY2hlY2tlZCI+IHRoZSB0aHJlYWQgaXMgb2ZmIHRoZSBmcm9udCBwYWdlIGFuZCBoYXMgbm90IGJlZW4gYnVtcGVkIGluIG92ZXIgYSBtb250aC48L2xpPjxsaT48aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJxNyIgY2hlY2tlZD0iY2hlY2tlZCI+IGkgaGF2ZSB2aXNpdGVkIC9iLywgL2cvLCAvbG91bmdlLywgb3IgL3ByLyBpbiB0aGUgbGFzdCBtb250aC48L2xpPjwvb2w+PHA+PGlucHV0IHR5cGU9InN1Ym1pdCIgdmFsdWU9InNob3VsZCBpIHVzZSBzYWdlPyI+PC9wPjwvZm9ybT48L2JvZHk+PC9odG1sPgo=

Name: Anonymous 2011-02-04 11:25

Name: Anonymous 2013-01-19 23:46

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List