Divide the installed_plugins.inc.php!

Discussion in 'Integration' started by draj, Feb 3, 2007.

  1. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hallo Alex!

    I found out that each script for obvious reasons - needs to use for / foreach command / function. Once started, it could only be killed or stopped through apache restart.

    Further, there is no possibility of making the database records work in batches. Simply because if an installed_plugin.inc.php i.e. for e.g. joomla.inc.php is invoked then it will do the work until stopped or died.

    I propose:

    It would be better to have this file divided into two for instance >>

    joomla.php & joomla.inc.php

    Therefore if joomla.php bears the $start as well as $number, then it could call the joomla.inc.php for x number of times passing both of those variables. By this joomla.inc.php would not eatup server resources and that particular process _BY_THE SCRIPT_ joomla.inc.php could only be used for lets say 500 record EACH TIME and then load again and again.

    $start = Record number where it is currently
    $number = An incremental value to be passed on or chosen.

    joomla.php passes values of $start & $number amd makes the joomla.inc.php run x number of times which will in turn an apache process to _END_ x number of times as follows:

    joomla.php >>> $start

    $start >> joomla.inc.php $start & $number
    Code:
    	    $query = $this->query($s="SELECT email
    	            FROM [db]users
    	            WHERE email='$email[$count]'
    	            LIMIT $start,$number")");
    
    $num = mysql_num_rows($query);
    
      for ($count=0; $count < $num; $count++)   {
      
      $email[$count] = $row[0];
      
      if ( $member_email_exists ) {
      	  Do this query
      } else {
      	 Do that query
      }
    
    $start = $start + $number;
    
    >> Go to query again;
    
    If the $number='1'; then it is also possible to use this system to work will integrated_plugin_1.inc.php & integrated_plugin_2.inc.php DIRECTLY FROM installed_plugin.php which has a potential of generating a new era of plugin architecture in the aMember, if you understand what I mean!

    Hence

    installed_plugin.php could invoke the following

    $start >> integrated_plugin_1.inc.php
    $start >> integrated_plugin_2.inc.php
    $start >> integrated_plugin_3.inc.php
    $start >> integrated_plugin_4.inc.php

    Or even aMember installation could pass this number to each plugin in a loop untill the last possibility required. This in turn could help in the Rebuild, Imports and Syncronisation of the databases. Currently the plugin function is invoked lets say in a vertical manner i.e. an instance of a plugin is invoked until complete vertically and my proposal would make the instances cut down horizontally thereby allowing several possibilities of cross-plugin interactions. Does it make sense?
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hallo Alex!

    There was something that was not clear before in my message.

    Due to the ignore_user_abort(true); the script rebuild keeps running. I can deactivate ofcourse. Here the deactivation can happen oif and only if there is an output in the browser window. If not, the function is setup automatically to be true!

    What i meant is to make a new file joomla.php that would spawn a new thread using joomla.inc.php with certain values.

Share This Page