Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can manually pass an id to your script: e.g nicUpload.php?id=introPicHeader and it will become introPicHeader.jpg (or appropriate extension) in the images folder you defined.</p> <p>However, I have noticed that this script is broken and cannot access the configuration option uploadURI if specified directly in nicEdit.js during the nicEditorAdvancedButton.extend({. This causes access to an relatively pathed "Unknown" resource, causing an error. </p> <p>The documentation implies otherwise and the fact that the nicURI was specified here for imgur.com (maybe as a default) gave me the impression I could also add a uploadURI reference to the nicUpload.php script in a single place rather than on every editor instantiation. </p> <p><strong>Update</strong></p> <p>This works if you pass it during instantiation, which I guess does allow for easy dynamic id population.</p> <p>Unfortunately, the nicUpload.php is riddled with errors and it's output is not JSON. The editor expects to parse JSON and finds a script tag and errors with unexpected token "&lt;". </p> <p>There are a raft of other errors which I will attempt to identify:</p> <p>In nicEdit.js</p> <ol> <li>A.append("image") should be infact A.append("nicImage")</li> <li>this.onUploaded(D.upload) should become this.onUploaded(D)</li> <li>this.onUploaded(D) should be moved to within the try block after var D=JSON.parse(C.responseText) to fix variable scope issues</li> <li>B.image.width needs to become B.width</li> </ol> <p>In nicUpload.php </p> <ol> <li>JSON output is not formed correctly, comment out html output and output just json_encode($status).</li> <li>JSON output needs to return a key/value pair named links rather than url although renaming the var D=B.links to var D=B.url in nicEdit.js would also suffice as a fix.</li> </ol> <p>Both php and javascript code leaves a lot to be desired, I get many errors regularly and have been fixing them myself.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload