Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question About 2 Plugin Hooks
#1
I would like to know where the following plugin hooks are launched.. They do not seem to work the way I understand they should.

Hook 1: settings-website
Hook 2: settings-user

I would think that these 2 hooks would be launched right before the files are created.

Ex below:

Instead of
Code:
# create website xml file
        createBak($wfile, GSDATAOTHERPATH, GSBACKUPSPATH.'other/');
        $xmls = new SimpleXMLExtended('<item></item>');
        $note = $xmls->addChild('SITENAME');
        $note->addCData($SITENAME);
        $note = $xmls->addChild('SITEURL');
        $note->addCData($SITEURL);
        $note = $xmls->addChild('TEMPLATE');
        $note->addCData($TEMPLATE);
        $xmls->addChild('PRETTYURLS', $PRETTYURLS);
        $xmls->addChild('PERMALINK', $PERMALINK);
        if (! XMLsave($xmls, GSDATAOTHERPATH . $wfile) ) {
            $error = i18n_r('CHMOD_ERROR');
        }

I would expect it to be

Code:
# create website xml file
        createBak($wfile, GSDATAOTHERPATH, GSBACKUPSPATH.'other/');
        $xmls = new SimpleXMLExtended('<item></item>');
        $note = $xmls->addChild('SITENAME');
        $note->addCData($SITENAME);
        $note = $xmls->addChild('SITEURL');
        $note->addCData($SITEURL);
        $note = $xmls->addChild('TEMPLATE');
        $note->addCData($TEMPLATE);
        $xmls->addChild('PRETTYURLS', $PRETTYURLS);
        $xmls->addChild('PERMALINK', $PERMALINK);

                <?php exec_action('settings-website'); ?>    

        if (! XMLsave($xmls, GSDATAOTHERPATH . $wfile) ) {
            $error = i18n_r('CHMOD_ERROR');
        }

Am I misinterpreting the use of these hooks?
Reply
#2
Good catch Mike, looks like they were ommited from the code.

I've added them to the SVN
My Github Repos: Github
Website: DigiMute
Reply
#3
n00dles101 Wrote:Good catch Mike, looks like they were ommited from the code.

I've added them to the SVN

Awesome, thanks!
I can fix the biggest issue with my multiuser plugin.
Reply
#4
n00dles101 Wrote:Good catch Mike, looks like they were ommited from the code.

Both hooks were intentionally removed in r258: http://code.google.com/p/get-simple-cms/...ttings.php
This is what Chris commented:
Quote:i also removed some hooks that allowed plugins to put new data into the
website.xml and {user_id}.xml. I dont see the value in allowing authors to do
this, and could potentially be lethal to a site anyway...
Reply
#5
Carlos Wrote:
n00dles101 Wrote:Good catch Mike, looks like they were ommited from the code.

Both hooks were intentionally removed in r258: http://code.google.com/p/get-simple-cms/...ttings.php
This is what Chris commented:
Quote:i also removed some hooks that allowed plugins to put new data into the
website.xml and {user_id}.xml. I dont see the value in allowing authors to do
this, and could potentially be lethal to a site anyway...

Well at that time I don't believe multi user capabilities existed. Now it is almost detrimental for multi-user purposes.
Reply




Users browsing this thread: 1 Guest(s)