Results 1 to 10 of 19

Thread: Custom js

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #16
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Custom js

    OK Leif (and anybody else who is interested)... you asked for it!

    Here is a minimally (well, perhaps a little more than that) tested DF4WP for DataFlex v19.0. The ZIP contains two other ZIPs: the plugin (dataflex4wordpress.zip) and the library workspace (DF4WPlib_190.zip).

    The plugin should, as before, be uploaded as a zip to your WordPress site (Dashboard --> Plugins --> Add New --> Upload Plugin --> Choose file ... select dataflex4wordpress.zip ... Install Now --> Activate Plugin).

    The library workspace you should unzip, then use as a library from your app's workspace, making the following changes (along with appropriate Use statements) to your app:


    • cWebApp --> cWPWebApp
      • Set psWPEncryptSecret to "whateverIsInSecretInTheDF4WPDashboard"
      • Use WebResourceManager.wo --> Use WPWebResourceManager.wo // important for getting various pathing right

    • cWebView --> cWPWebView
    • cWebModalDialog --> cWPWebModalDialog
    • cWebImage --> cWPWebImage
    • cWebColumnImage --> cWPWebColumnImage


    The latter two are only required if you are loading the images using the older technique of having them under the AppHTML directory and using a relative URL, rather than using the DownloadURL of the WebResourceManager technique, which is taken care of in WPWebResourceManager.wo.

    In addition, when making reference to other local web-available resources (things you would normally load by relative URL from your AppHTML directory or subdirectories of that), amend the setting to be (FQUrl(ghoWebResporceManager, relativeURL)) rather than just relativeURL. This will dynamically replace relative URLs with fully qualified URLs (getting it right, I hope).

    Read the plugin help (now prettier, I hope ): there are a couple of new shortcode settings: customjs and customcss (always use lowercase).

    DF4WP19.zip

    Enjoy... and please let me know at once if you discover any bugs.

    Mike
    Last edited by Mike Peat; 30-Oct-2017 at 10:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •