Sketchfab for Atto

Atto ::: atto_sketchfab
Maintained by Jetha Chan
Sketchfab 3d model embedding
Latest release:
24 sites
6 downloads
7 fans
Current versions available: 1

Sketchfab embedding comes to Atto! This plugin contains an Atto toolbar button that simplifies adding Sketchfab content to rich content areas within Moodle - just click the button, paste a link to a Sketchfab model (e.g. http://sketchfab.com/models/028d91eadb424857a82d119ea5a269a5) and the plugin will do the work of embedding a good-looking thumbnail into your post for you.

Requirements

  • Moodle 2.7.7+ (2014051207.02 or higher)

Quick install

  1. Put this entire directory at PATHTOMOODLE/lib/editor/atto/plugins/sketchfab
  2. Visit your site notifications page to install the new plugin.
  3. Add the "sketchfab" plugin to the Atto toolbar.

Screenshots

Screenshot #0

Contributors

Jetha Chan (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Jetha Chan
    Wed, 8 Apr 2015, 5:11 PM
    I've fixed the prechecker issues and bumped the version number accordingly - ready for review.
  • Anthony Borrow
    Thu, 9 Apr 2015, 1:41 PM
    Jetha - I really like the intended functionality; however, I was not able to get the atto plugin to work.

    I installed the atto and filter plugins together. I added the skethchfab button to the atto list of plugin in the files section so that I had:

    files = image, media, managefiles, sketchfab

    When I added a URL, being a Star Trek fan, I picked https://sketchfab.com/models/ec58cd67997a49e3acccd67d8236115e and waited for a while and saved the label. When I look at the html code all I see in the label is:

    Enterprise


    Am I missing a step or is something not working as expected? I created another label and added the iframe embed code from the image and it seemed to appear fine there. Any suggestions? Peace - Anthony
  • Jetha Chan
    Fri, 10 Apr 2015, 11:24 AM
    Anthony - thanks for taking a look! Could I get some more information about your environment, including the exact version of Moodle you're running?

    If you could also open the Javascript console in Chrome's web inspector - right-click anywhere, click "Inspect Element", click the Console tab - and let me know what shows up in the console when attempting to embed, that'd also be a big help.

    In the meantime I will try and reproduce the issue.
  • Jetha Chan
    Fri, 10 Apr 2015, 5:03 PM
    I can't repro on stable branches:
    * 2.7.7+ (build 20150409)
    * 2.8.5+ (build 20150409)
    * 2.9dev (build 20150409)
  • Anthony Borrow
    Sun, 12 Apr 2015, 6:49 AM
    So I am using FF (37.0.1) under Ubuntu 14.04, Moodle 2.8.5+ (20150326), PHP 5.5.9, Postgres 9.3.6 and this is the error that I noticed in the console:

    SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
    http://localhost/m28/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1428556750/mcore-debug.js
    Line 24483

    Peace - Anthony
  • Anthony Borrow
    Sun, 12 Apr 2015, 7:12 AM
    http://localhost/m28/lib/editor/atto/plugins/sketchfab/api.php?modelid=ebe22b53d71940bdacdc9ddd55518155 is not getting a response from the server. I am going to see if I can try it on another server and see if I have better luck there. Peace - Anthony
  • Jetha Chan
    Sun, 12 Apr 2015, 4:21 PM
    About the only thing I can think of looking at api.php is that cURL might not be installed? As you're on Ubuntu, make sure that php5-curl is installed; for my part, I'll add it to the list of requirements.
  • Anthony Borrow
    Mon, 13 Apr 2015, 10:40 AM
    Jetha - I have php5-curl installed - I was wondering if it might be related to the protocol (http instead of https). I was not able to test on one of my production sites as I had forgotten they did not want to use atto. Peace - Anthony
  • David Mudrák
    Thu, 16 Apr 2015, 4:20 AM
    I was able to use the atto plugin with no issues. Calling api.php gives me expected json response. The code itself looks good and clean and I believe we can approve this now.

    Anthony, these troubles with cURL might in fact also explain your troubles with the Plugins directory's install button. Does running the curl from command line work for you?
  • Ricardo Caiado
    Thu, 10 Aug 2017, 7:40 PM
    Any update to Moode v3.x?
  • Lan Thu
    Tue, 19 Dec 2017, 2:41 PM
  • Pat Sej
    Fri, 23 Oct 2020, 2:44 PM
    This would be great in Moodle 3.x, yes!
    How difficult would it be to migrate this plugin?
Please login to post comments