Phantom

  • About PhantomJS

    This simple module allows the upload of a PhantomJS binary file and makes it executable during a system check. Other modules which require PhantomJS can then use the binary, for example the ujWebshot module which takes advantage of Phantom's screenshot capabilities. https://www.jamroom.net/ultrajam/documentation/modules/4696/webshot



  • PhantomJS

    PhantomJS
    PhantomJS is a large binary file, which is why a separate module has been built to upload it rather than including it as part of a larger module.

    "PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG."

    It is available under a BSD license: http://phantomjs.org/
  • Installation

    Upload the module to your server or install from the Marketplace.
    You will then find it in the Tools section of the ACP menu.
    Go to the module info tab in the admin control panel and enable it.
  • Upload PhantomJS

    Upload PhantomJS
    Next go to the Phantom Binary tab, click the link to open the PhantomJS download page where you must choose the correct current binary for your server. If you are on Jamroom hosting choose Linux 64-bit which at the time of writing will download a tar archive named phantomjs-2.1.1-linux-x86_64.tar.bz2
  • Select that archive, upload to your server and save.

    PhantomJS will be installed and given the correct permissions to run.

    If you have any problems try running the System Check.
  • Using PhantomJS

    That's about it, PhantomJS doesn't do anything by itself, it is used by other modules.

    You can get the path to the bin directory using the function ujPhantom_binary_path() and the full path including the file using ujPhantom_binary_file()

    See ujWebshot for a working example.

Tags