Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2017
    Posts
    22
    Points
    474
    Level
    7

    Question Regarding Files and Directory

    Hi,
    I have one php file & I wanted to run that file using interworx control pannel (ex: keeping my php file in some directory & calling that file ), how can I do that ?. What are the steps I have to follow & Please show me one example or documentation link.


    Thank you,
    kiran

  2. #2
    Join Date
    Apr 2012
    Posts
    2,179
    Points
    24,154
    Level
    67
    Hi kiran

    Many thanks

    If I understand fully, I would suggest to use a hook

    Many thanks

    John

    Event Hooks Setup

    https://r.tapatalk.com/shareLink?sha...2&share_type=t

  3. #3
    Join Date
    Apr 2012
    Posts
    2,179
    Points
    24,154
    Level
    67
    Ohh sorry, you could also use a cron I suppose

    Many thanks

    John

  4. The Following User Says Thank You to d2d4j For This Useful Post:


  5. #4
    Join Date
    Apr 2017
    Posts
    22
    Points
    474
    Level
    7
    Thank you for the information, but I'm looking for different scenario. I wanted to add one custom plugin under Miscellaneous & when I activate it should display top of the NodeWorx menu (like Hello World). I have followed the steps given in 'http://docs.interworx.com/interworx/plugin-developer/index-Getting-the-Lay-of-the-Land.php' (2.6 Files & Directory Structure), now where I have to keep my php code means inside the which file/diretory I have to keep my php code. Please show me one example with simple echo statement.


    Regards
    kiran

  6. #5
    Join Date
    Apr 2012
    Posts
    2,179
    Points
    24,154
    Level
    67
    Hi kiran

    Many thanks, I understand better now

    I think you need to create a folder in \interworx\nodeworx\plugins, and put your files in your folder

    The link you posted should give specific detail and example

    I'm not back until tommorow so I cannot check (on mobile phone and eyes too old sorry)

    I hope that helps a little

    Many thanks

    John

  7. The Following User Says Thank You to d2d4j For This Useful Post:


  8. #6
    Join Date
    Apr 2012
    Posts
    2,179
    Points
    24,154
    Level
    67
    Hi Kiran


    Many thanks, please see pics of the folder/file locations you need to use, the view when plugin enabled and an extract of the folder/files you use from IW docs.


    If you are not sure, you maybe better advised to work through the Hello WOrld plugin, which should make it clearer.


    Lastly, please remember to set permissions on your new files/folder so IW can access them (if your not sure over perms, just look at perms used on Hello World)


    ls -l
    total 16
    drwx------. 4 iworx iworx 4096 Apr 25 21:40 Ctrl
    drwx------. 2 iworx iworx 4096 May 3 18:18 Plugin
    -rw------- 1 iworx iworx 205 Sep 20 2010 plugin.ini
    drwx------. 2 iworx iworx 4096 May 3 18:18 templates


    I hope that helps a little


    Many thanks


    John


    http://docs.interworx.com/interworx/...oc-Section-2.6


    2.6 Files and Directory Structure
    ◾ Required Files
    The required files for a proper plugin structure are few, but each is key to the proper functioning of the plugin:◾ Plugin Directory: ~iworx/plugins/[plugin-name]
    This is the directory where all files relevant to the plugin are stored. Here, ’plugin-name’ should be short, hyphen separated (no spaces or underscores), and lowercase.
    ◾ Plugin INI file: ~iworx/plugins/[plugin-name]/plugin.ini
    The plugin INI contains plugin metadata, such as the version, author, and a brief description.
    ◾ Plugin Class file: ~iworx/plugins/[plugin-name]/Plugin/[PluginName].php
    This is the core of the plugin and contains the majority of its functionality, such as data storage, InterWorx menu updates, and enabling/disabling of the plugin. ’PluginName.php’ should reflect the naming of ’plugin-name’ above, with hyphens removed and each word capitalized.


    ◾ Optional Files
    The following files are optional to the core operation of a plugin, but allow users to further personalize their plugin interface:◾ Plugin NodeWorx Controller file: ~iworx/plugins/[plugin-name]/Ctrl/Nodeworx/[PluginUrl].php
    With this file present, a user will be able to control how the plugin is represented in the NodeWorx interface (if necessary). The naming of this file determines the URL of the controller — in this case we’d find it at /nodeworx/plugin/url.
    ◾ Plugin SiteWorx Controller file: ~iworx/plugins/[plugin-name]/Ctrl/Siteworx/[PluginUrl].php
    Much like above, this file allows for control of the plugin with regards to the SiteWorx interface. The naming of this file determines the URL of the controller — in this case we’d find it at /siteworx/plugin/url.
    ◾ Plugin default template file: ~iworx/plugins/[plugin-name]/templates/default.tpl
    The core template file, this file controls the layout and presentation of the plugin’s output in-browser.


    ◾ Other files can be included as necessary, such as those for input forms, images, payloads, formatters, custom libraries, and data sources. These are more advanced features and described in detail later on.
    Attached Images Attached Images    

  9. The Following User Says Thank You to d2d4j For This Useful Post:


Tags for this Thread

Posting Permissions

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