May 17, 2012, 07:03:54 PM


Author Topic: AWB plugin support  (Read 484 times)

Offline MoonWolf

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
AWB plugin support
« on: June 01, 2011, 11:40:03 AM »
Hi,

Sometimes i look over my few installs and thinks of ideas i would like to implemet but since awb is a closed system (no source) it is impossible. Is there any chance we could see some form of plugin system in future AWB versions so we can implement own code during the process of fetching and maintaing data( like before it starts and after it finished)? and also some way to inject menus in admin. It would make awb more powerfull since the comunity also can contribute to awb in that way. Why im asking is because i would like to implement things like "the best spinner" api and monitoring things.

beside this i love the new features of 2.0. keep up the good work

Offline nobody

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
Re: AWB plugin support
« Reply #1 on: June 02, 2011, 03:06:22 AM »
It sounds like a cool request, but I don't think it's possible with NOT open source software. I might be wrong, still...

Offline MoonWolf

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: AWB plugin support
« Reply #2 on: June 02, 2011, 03:59:34 PM »
I don't see any problems with that since the coder creates the rules to follow. like functions to use.
lets say we put all our active modules in a pluginsdir then then awb checks and loads our plugins and execute the construct of ex a class :)

Offline awesome

  • Full Member
  • ***
  • Posts: 121
  • Karma: +0/-0
Re: AWB plugin support
« Reply #3 on: June 07, 2011, 02:09:33 AM »
Is it possible to do so with ENCRYPTED software? How will you know how to access some AWB functions from plugin? Sorry if it's a dumb question :)
Please forgive me for my English...

Offline MoonWolf

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: AWB plugin support
« Reply #4 on: June 07, 2011, 09:44:23 AM »
Ok here is an example!

Lets say that awb has a new file added caled plugins.php
This file contains 2 Unencrypted empty functions
the $vars is an array with example current keyword,Processposition, and tabledata like tableid of current keyword.

plugins.php
Code: [Select]
function BeforeProcess($vars){
}
function AfterProcess($vars){
}

within those 2 functions we can pass own code like this for example:
Code: [Select]
function BeforeProcess($vars){
      include 'plugins/myplugin.php';
      $firstplugin = new PluginClass($vars);
      $firstplugin->Start();
}

in a plugins dir we create a file called myplugin.php that contins this
Code: [Select]
class PluginClass{
    protected $CurrentKw,$Process,$TableId;
    function __construct($vars) {
        $this->Process = $vars[0];
        $this->CurrentKw = $vars[1];
        $this->TableId = $vars[2];
    }
    function Start(){
       
    }
    function Start2(){
       
    }
}

Ofcourse we don't limit ourselfes to use classes since we can include our plugins and execute a function instead or just plain code.

Hope that clearifies my thoughts.

//MoonWolf

Offline MoonWolf

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: AWB plugin support
« Reply #5 on: June 07, 2011, 09:58:59 AM »
oh! just forgot something.

lets say in in the plugins.php file we can make a return value of the $vars
like in the end make a "return $vars;" would be great. that would make us able to modify on the fly and  pass data into awb :).

I don't see the need to access awb's internal functions atm. just add own to be executed in difrent places where awb run. If somehow adsenseboy intends to make some functions available to us he could make a class that is encrytped but functionnames intact(not obfuscated) that we could call with global statement. But i'm sure he knows how since he have a functional template system :).

Regards,
MoonWolf