Jump to content

[IP.SEO] ordering issue [Feature request]


Recommended Posts

Hello,

I ran into this issue today when I installed IP.SEO. I needed my sitemap plugins in my 3rd party app to be executed in a SPECIFIC order, however it turns out that IP.SEO executes them according to the order of their position in the directory of the linux file system (so the user essentially has no choice in the order of sitemap plugin execution).

What would be best is if the plugins were executed in alphabetical order. I.e.

1_plugin.php
2_plugin.php
A_plugin.php
B_plugin.php

etc.

I changed the generator.php code from:


        protected function runApplicationPlugins($app, $appPluginsPath)

        {

                $appPluginsDirectory = opendir($appPluginsPath);


                while($pluginFile = readdir($appPluginsDirectory))

                {

to:


        protected function runApplicationPlugins($app, $appPluginsPath)

        {

                $appPluginsDirectory = opendir($appPluginsPath);


                while($pluginFile = readdir($appPluginsDirectory))

                {

                        $allPlugins[] = $pluginFile;

                }

                sort($allPlugins); //sorts the plugins for alphabetical execution


                foreach ($allPlugins as $pluginFile) {



in order to accomplish this. Obviously the above would require error handling to ensure that there the $allPlugins array actually had items before sorting.

I think this is a necessary change in order to allow the user to execute each sitemap plugin in the order they choose. This change obviously will not effect users who do not mind the order of execution, but at the same time allows 3rd party developers greater control over the IP.SEO sitemap generation.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...