IncludeUpload-Talk

Here is where to talk, comment, question and discuss about Include Upload.

(If you want to ask questions about uploads in general, go to the PmWiki.UploadsAdmin page.)

Recipe name in RecipeInfo line didn’t match, causing RecipeCheck issue. Uploaded fixed version. —Said Achmiz November 13, 2021, at 03:48 AM


This is nice! Could you add some code to filter HTML special characters in order to render any script or HTML form code uneffictive? The following does the trick:

return Keep(($class ? "<pre class='$class'>" : '<pre>')
	    . "filetype=$filetype\n"
	    . htmlspecialchars($filetext) . '</pre>');

Then it becomes quite useful for showing files with code content (I was testing php files). HansB December 07, 2007, at 11:00 AM

Done! See the 2008-01-05 version Kathryn Andersen January 05, 2008, at 02:00 AM

When uploadincluding a text file, what is the easy way to have it word wrap? Is there some class magic that will do it?

If you want to use CSS, see http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/39674 What you would do, would be to put something like this in your pub/css/local.css file

.includeup pre {
  white-space: pre-wrap;       /* CSS-3                  */
  white-space: -moz-pre-wrap;  /* Mozilla, since 1999    */
  white-space: -pre-wrap;      /* Opera 4-6              */
  white-space: -o-pre-wrap;    /* Opera 7                */
  word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

Note that, according to the post, this doesn't work reliably in IE.

Alternatively, you could use a text-to-HTML converter on your text files, see $IncludeUploadTextToHtmlCmd on the Include Upload page. There are two that I know of that work: asciidoc and txt2html.

Kathryn Andersen March 23, 2007, at 05:01 PM


Talk page for the IncludeUpload recipe (users?).