• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    FOG 1.6 own plugin

    Scheduled Pinned Locked Moved General
    2 Posts 2 Posters 8 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Valer
      last edited by

      Hello,

      How can I add JavaScript and CSS files to my own custom plugin in FOG 1.6?

      My plugin has several submenus, and I would like all of them to use the same JavaScript and CSS files. I want to avoid creating duplicate files for each submenu or copying the same files multiple times under different names.

      For example:

      index.php?node=myplugin&sub=list
      

      should load:

      myjs.js
      mycss.css
      

      and

      index.php?node=myplugin&sub=something
      

      should also load:

      myjs.js
      mycss.css
      

      What is the recommended way to include shared JS and CSS files across all pages/submenus of a custom FOG 1.6 plugin?

      Tom ElliottT 1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @Valer
        last edited by

        @Valer I think we need to understand what this plugin is doing.

        CSS isn’t something we’ve allowed to be injectable though it could be.

        You can still use your own CSS but that’s more at the FOG Configuration -> FOG Setting -> FOG_THEME, but you would need to put it on your server in a location you type the path too here.

        https://docs.fogproject.org/en/latest/development/plugin-development

        This is a good toolkit for understanding how to build your own plugin.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        96

        Online

        12.7k

        Users

        17.6k

        Topics

        156.9k

        Posts
        Copyright © 2012-2026 FOG Project