Eddies Wiki Discussion

EddiesWiki page was getting rather large, so this page was created to continue the discussion.


Eddie Edwards' original introduction: (moved back to EddiesWiki )


Code for the next version: Anyone who has C++ code that could enter into a next version, please edit the appropriate page from the list below.


OK just a quick note - I'm working on a V1.1 of this code right now to include a new parsing engine which allows HTML templates, style sheets, valid HTML (!) etc., etc. A beta is already available.

<rant> A few people have told me they intend to recode WikiServer on the back of [some free HTTP server]. Why??? :-) WikiServer just ain't multithreaded so you won't be able to (easily) handle multiple transactions simultaneously. And it already includes all the HTTP server it needs. If you must use a standalone HTTP server, WikiServer is almost certainly NOT the best Wiki you can bolt onto it. </rant> Still, I have no problems if people wish to do this sort of thing for their own amusement. :-)

Anyway, I'll post a note here when V1.1 is released.

-- EddieEdwards


Contribution Talk

Mods to EW 1.1 by VickiKerr

I am working (slowly) on fixing various minor flaws, and can make a revised version available by email. Those interested please let me know.

So far, only minor issues are fixed, as listed below. The source used was that of the V1.1 beta. -- VickiKerr

  1. Footnote anchors now work as specified (they used not to in some browsers).
  2. The prefixes https: and file: are now allowed.
  3. The edit box has "width:100%" specified, which improves its width in certain browsers.
  4. The edit box has wrap="soft" specified, so that horizontal scrolling is not required.
  5. Page deletion is not restricted to "admin" users. All users can now invoke this function.
  6. The wording of the instructions for resolving edit conflict is improved (The text has been changed to refer to "first window" and "second window" instead of "left window" and "right window" since in some browsers windows are showed one below the other.
  7. The "Thank you for editing" message is an h2 heading instead of h1.


I understand EddiesWiki is postcardware. If we want to send a contribution like we do with shareware, how should we send it?

If you would like to pay for EddiesWiki, please make a contribution to your local children's charity. -- EddieEdwards


Compilers

The parser code uses char* and custom string manipulation functions. It does not use STL, so should be reasonably portable. HOWEVER, the socket API calls use the WinSock API (calls and error codes) rather than the POSIX sockets API. When my busy schedule allows I do intend to fix this for V1.1. -- EddieEdwards Perhaps it should use STL and the C++ standard library? These are a lot more portable than you expect. In particular, all the compilers below support the uses of the standard library that you'd require. It would make the code a lot safer and simpler. This isn't 1998, after all...

Tested compiler configurations:

It also runs under Wine, the Linux windows emulator (tested with RedHat 9.0 and Fedora Core 1). UNIX protects port 80 (and all other ports below 1024) from general use, so you'll either need to run it as root, or else change the port number.

Running it as root just seems wrong. However, Apache does the same thing ( http://httpd.apache.org/docs-2.1/misc/security_tips.html ), so I guess that's how web servers work. I'm not going to do that, so I guess I'm going to use some largish port number.


InterWiki

MikeSmith modified the source to include an InterWiki-like feature, which Eddie put into the 1.1 beta. For instance, to form a link to this page on this Wiki, you would type "c2:EddiesWiki" (the "c2" part being the nickname for the C2 Wiki, which is in a user-configurable file). (This might be extended to allow more than WikiSites?)


I use this WikiClone on my machine to store my own private wiki pages as well as to save WikiPages of interest from other wikis. It provides simple features including ISBN, insertion of URLs, RecentChanges, Search for content and Pagenames.

It can be used as a local wiki, and it works on a local area network by using the ip of the host program. Since the source code is made available by its author, modifications, including the one made by MikeSmith will continue, making it possible to extend its features and capabilities. The executable is small enough (less than 100k) to fit on a floppy disk and leaves enough room for several hundred short wiki pages.

but what about the licence? I saw postcardware but does that mean I can take the source and make lots of changes and distribute modified binaries/source? That is a bit unclear to me -- GavinVanLelyveld

wxWikiServer, WikiServer, and Michel's Mods are public domain (Eddie wants you to send him an e-mail). Elrey's mods are closed-source (for now). -- RyanNorton

I don't think so. If you got the permission of the originator after showing him your source and abiding by any restrictions or limitations he might place on the distribution, it might be another story. It would be better to join the team of people who are trying to make EddiesWiki better by working together on a centralized source, where additions and modifications can be coordinated and made to coexist harmoniously. This is only my opinion. Check with Ed via email.


Generates Errors 400, 401, 403, 404, 500, 501 on IIS 5.0 on Windows 2000 Advanced Server.

-- sg

If you're trying to run WikiServer on a box with IIS installed, I imagine that you'd need to set the port to something other than 80, and use http://localhost:<port> to access it.

Email me if you need help.

-- EddieEdwards

Is Sam's comment just referring to the files that are generated containing the HTML the server uses for reporting those errors? This is a feature, as you can edit the files and get site-specific messages.

-- StephenGoudge?

Yeah, I had a few people confused about the "error" files. I've added a bit to the ReadMe? explaining them. But I hadn't thought of them as a "feature" before - that's a really cool idea! ;) -- EddieEdwards


I (PhlIp) have had my way with this code. The tweaks:

  else
  {

// look for a . const char* uptr = word + strlen(word) - 1; while (uptr > word && (*uptr != '.')) --uptr; if ( 0 == stricmp(uptr, ".png") || 0 == stricmp(uptr, ".jpg") || 0 == stricmp(uptr, ".jpeg") || 0 == stricmp(uptr, ".gif") ) fprintf(fd, "<img src=\"%s\">", word); else fprintf(fd, "<a href=\"%s\">%s</a>", word, word); }

To apply it, search for this line, which is original:

  fprintf(fd, "<a href=\"%s\">%s</a>", word, word);

Props to Eddie for putting so much oomph into such a small footprint!

My boss is innocent to Wikis, so whenever they ask I write a little report I write it on the Wiki, and send them a link.


I also felt the need to change some stuff in this code :) Thanks PhlIp for your ideas. I wanted to be able to change the styles dramatically so I changed the line which writes the head to this: fprintf(outfd, "<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"WikiStyle.css\" media=\"ALL\" /><title>%s</title></head>\n", stitle);

Now I just mess with WikiStyle.css to make my little wiki all pretty :) -- GavinVanLelyveld


Thanks Eddie!

I made a WindowsCE version of WikiServer. It is very small (42k), and very quick. (Maybe too fast that IE4 on CE sometime fails to catch the response.)

I will make a patch for CE adaptation if you want to integrate that to v1.1.

Also, I'm planning to make the following modification:

Separate Header and Footer output routines and consolidate them (in PageFormatting??.cpp)

Modify consolidated Header-Footer routine to read and use template file, so that user can define her/his own header or footer.

Using CeHTTP (Multithreaded Tiny HTTPD for WindowsCE) for httpServer part. (This will add capability to use WikiServer as a HTTPD and making other cgi using nScript)

Integrate FTP client so that I can upload wiki pages to a remote server (in .wik format, or .html format)

If anyone has done something similar, please let me know.

-- Telion (TelionsHome)


(Eddie) Thanks for the note. I'll wait for the v1.1. -- Telion


I am looking for a WikiEngine that works locally in my computer and totally independently without PHP, Apache or what have you. Does EddiesWiki do that?

Yes. Unzip the first 16 files. Thirteen of these are seed pages. The server's directory name is up to you, but the subdirectory for your pages must be spelt "Pages". Run the server and any browser and you're ready to wiki. Note that if you are online at the time, outsiders may access your pages via the server.


"Note that if you are online at the time, outsiders may access your pages via the server."

Ouch and double-ouch! Major potential security hole: buffer overflows, etc. How secure is EddiesWiki, particularly regarding injection attacks?

If you're worried, you're probably running a firewall anyway.

But what about those who aren't used to thinking about security? They're the ones who are most vulnerable. What does EddiesWiki do to protect them? Does it refuse to answer requests from any machine that's not in its hosts file?

Let's face it - if you're not thinking about security, but if security does matter, you shouldn't just fix one hole, but instead fix most of the holes by using a firewall.


Quirks and queries

  1. A dot (".") immediately after a url is made part of the url link. V1.1 will correct this -- ar

  2. One can't avoid CamelCase becoming a link. V1.1 will correct this -- ar

  3. Can we center text on a line? Yes, in the V1.1 beta.

  4. Unclosed emphasis results in italic or bold continuing up to the end of a line. That's the way it should work! -- ar

  5. I couldn't achieve page creation from a DumpAllPages file.

  6. A page name can end with a capital letter and can contain digits. Even CaMMeLL is allowed as a page name, but CCaMel is not.

  7. When can we expect a formal release of the next version?

  8. Can we expect a Linux version some time? (In the meantime, the Win32 binary runs under Wine.)

  9. When no page name is given in the url, the Start Page is shown, but the url is left unchanged. This is also the case in the beta of the next version, where it has more significance because there may be various start pages, and also occurs when AuthorLogin is used.


COMMENTS

If you'd like to download V1.1 beta of the Wiki, it fixes the first three issues. Issue (4) is just How It Works. Don't do unclosed emphasis if this isn't what you want! :)

Tried the beta - so I now know which of the above it fixes, but have found other issues which are new in the beta (and emailed them to you).


My EddiesWiki log recently included the following sequence -

 Thu Nov 27 2003,04:12:44,219.235.32.126,ERROR,/,309,500,HTTP/1.0 500 Internal error
 Thu Nov 27 2003,04:13:04,219.235.32.89,ERROR,/,309,500,HTTP/1.0 500 Internal error
 Thu Nov 27 2003,04:13:27,219.235.32.53,ERROR,/,309,400,HTTP/1.0 400 Bad request

If anyone can shed light on these, I'd like to be informed. -- vk

Ooops.... this seem like something to think about.


Wished For Feature

It would be great if WikiServer could export all pages as html files into a local folder. This would enable people who only have web servers (no php, cgi, jsp, or other script servers) to easily host their content on the web. The folder could be uploaded and presto! -- MattSimpson

There's a little bit of discussion on FilesystemBasedWiki about this ... want to factor it out into a new page ?


Why does the logo icon show up with a border (and a rather thick and distracting one at that?) even when the original image is replaced with borderless ones? Will the next version also do that? - it looks very strange to me. Not being a programmer, I'd prefer not to have to venture into the source code to change the image settings. Thanks for a fantastic program. -- Bruce A.

Does the border change color when you click on the icon?

Yes, it does! I see, it's being treated as a new/visited link, which it is actually ... Is there a way to change this?

Yes. In EW1.1, go to the AdminLogin menu to edit PageTemplate.html and change <img src="icon.jpg"> to <img src="icon.jpg" border=0> for each icon which acts as a link. You will then have no border (if you still see a border, refresh the page).

If you can't get EW1.1 (Beta 1) to run (especially on Windows XP), i.e., it just shuts down as soon as you open it, try deleting the wikipage with the international characters in its name. This evades a known problem. Also, check for a clash with the server started by default by Windows XP.


Links

A word starting with a capital and ending with a number will make a link: Test1 forms a link. The parser doesn't seem to include the underscore character as part of the link; it stops the link when it sees the underscore. So Test1 and Test1_1 are the same link.

Test1 is the link; "_1" is just the following text. Page names are not allowed to contain arbitrary characters. -- vk


WikiServer also includes a nice feature to backup your wiki files. If you use the DumpAllPages link, a binary file containing all your pages will be created. This is much easier than creating a zip archive of all your wiki pages. When WikiServer starts, it looks for a DumpAllPages file in the server directory. If found, it creates those archived pages in the Pages subdirectory, (overwriting pages with the same name). WikiServer renames this file with a bak extension afterwards, so it will not create the pages every time it starts. A Pages subdirectory must exist for this process to work. This is useful if you run WikiServer in 2 locations, and you want to keep your wiki pages in sync; you can just email the DumpAllPages file from one computer to the other. [For some reason, the restoration does not occur if the V1.1 beta is used. -- vk]


Anonymous user begins at StartPage instead of the "Default Page" defined in Config.wkc?

I am using the version extracted from wikibeta110_2.zip (extracts to folder "Wiki 1.1 Beta 1", which looks odd based on the presence of the "_2" in the name of the downloaded zipfile).

From reading the comments in Config.wkc, I would think that accessing EW at http://localhost would take me to the page defined as the "Default Page" in the file "Config.wkc". But instead, I always begin at Start Page. Is it supposed to work that way? I have the following in my Users.wkc file:

 :=r
 bspuser:abcdef=rw:MspHomePage
 admin:raelia=rwa:AdminHomePage

I have the following in the Config.wkc file:

 ; Default Page - this is the page that the Wiki opens on when
 ; an anonymous user opens the site

Default Page=MyDefault

; Content Type - this is the string sent in HTTP headers

Content Type=text/html; charset=ISO-8859-1

Am I simply misunderstanding how the "Default Page" is supposed to work? I would like to have a non-Author begin at the site on something other than "Start Page". -- jc

I followed the source code and found the "Root Page" implementation there. If I include

 Root Page=MyRootPageName
in the Config.wkc file, then the "root" page works as I expected the "Default Page" was supposed to work. Now I can have all anonymous users start at any page I want (not at "Start Page", which cannot be renamed). -- jc

[Yes - see the suggestions page. The beta is not perfect, especially in this area! -- vk]


linking to internal files and directories

It is very useful in a wiki that is going to be primarily for personal use to have the possibility of linking to internal files and directories - for example, file://C:/MyFile. The first versions of Eddies Wiki had this feature but for some reason (is it intentional?) the latest beta doesn't seem to have this ability. Or am I missing something? Many other Wikis (Use Mod, Swiki, Zwiki, etc provide this capability which really makes them very useful as personal wikis, why not the new versions of Eddies Wiki?


See also WxWikiServer


I think it would be nifty to stick the source code for Eddie's wiki on some wiki somewhere, so people could comment on it and explain it to each other (WikiForLiterateProgramming). But I get the impression that C2.com is probably not the appropriate place for that. What wiki would be appropriate ?

? -- DavidCary


CategoryWikiImplementation


EditText of this page (last edited July 28, 2005) or FindPage with title or text search