First time here? Check out the FAQ!

Revision history  [back]

Since we don't particularly care about images, but want links to uploaded files, with minor changes, we were able to implement this functionality.

Ctrl-G inserts a link instead of an image. Modify skins/default/media/js/wmd.js and in doLinkOrImage, around line 1742, remove the ! from the start tag to make it a link instead of embedding an image.

In views/writers.py, upload function, around line 59:

  • Remove the check on extensions (we don't care to limit to just images)
  • Changed the new_file_name to retain the original file name (instead of a numerical name)

Definitely not appropriate for everyone, but it meets our need.

If this is functionality that askbot would want to provide in the regular release, I would suggest adding a new command/icon to WMD (ctrl-F for file or ctrl-U for upload?).

Probably would require a few more changes to upload to distinguish between images (and limiting extensions) and files (without limits).

Since we don't particularly care about images, but want links to uploaded files, with minor changes, we were able to implement this functionality.

Ctrl-G inserts a link instead of an image. Modify skins/default/media/js/wmd.js and in doLinkOrImage, around line 1742, remove the ! from the start tag to make it a link instead of embedding an image.

In views/writers.py, upload function, around line 59:

  • Remove the check on extensions (we don't care to limit to just images)
  • Changed the new_file_name to retain the original file name (instead of a numerical name)

Definitely not appropriate for everyone, but it meets our need.

If this is functionality that askbot would want to provide in the regular release, I would suggest adding a new command/icon to WMD (ctrl-F for file or ctrl-U for upload?).

Probably would require a few more changes to upload to distinguish between images (and limiting extensions) and files (without limits).