HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   How are server components called? (http://www.howtoforge.com/forums/showthread.php?t=53844)

nveid 20th August 2011 00:47

How are server components called?
 
I'm digging around trying to find out exactly how the server module/plugins components are called. So anyone that has some expertise in the manner please lend me a hand, how exactly per-say does a particular code piece call a specific plugin in the server code?

I'll give a specific example for one spot I'm looking at.. from shell_user_edit.php, where is the actual call it sends to to ADD users? I can modify how its adding, but to better understand I'd like to know what exact piece of code tells its to call method insert in the class shelluser_base_plugin


Thank you, for who can point me in the right direction. :)

nveid 20th August 2011 01:19

nevermind.. found my answer after some more digging around, I'd delete the thread if I could.. Seem to have a habit of answering questions & finding my own answers. :)

nveid 20th August 2011 01:38

got another one though..


done a bit of gripping & checked the ISPConfig manual.. nothing explains how/when "advanced" part of the form['tab'] is used? I understand it gets added by checking if someone is an admin, but what part of the code actually reads it?

nveid 20th August 2011 15:53

Another one before I goto sleep.. I'm working on the support module as well, trying to make it a little better.. How do I access the form data record when I'm doing a delete?

I'm trying something to this affect but its not working..

Code:


class support_delete extends tform_actions {
        function onDelete() {
                error_log("datarecord -> " . print_r($this->dataRecord,1));
                $user_id = $_SESSION['s']['user']['userid'];
                if($this->dataRecord['recipient_id'] != $user_id) {
                        // In this case just delete in the view table for this guy..
                        $sql = "INSERT INTO support_views (support_message_id, sys_userid, deleted) VALUES ( $this->id, $user_id, '1')";
                        $app->db->query($sql);
                                error_log("Executed: ".$sql);
                } else {
                        parent::onDelete();
                }
        }
}

$deletion = new support_delete;
$deletion->onDelete();



All times are GMT +2. The time now is 02:52.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.