P a g e
|
1

About
ZPanel
ZPanel
is
an
open-­‐source
web
hosting
control
panel
for
Microsoft
Windows
and
POSIX
based
operating
systems.
ZPanel
is
developed
and
maintained
by
the
ZPanel
Team.
ZPanel
is
written
in
PHP
and
as
standard
works
with
the
Apache
Web
Server
and
uses
MySQL
as
for
its
backend
data
storage.
More
information
about
the
project
and
to
download
and
get
started
with
ZPanel,
please
visit
the
official
website
at:
http://www.zpanelcp.com/

About
the
framework
The
framework
is
considered
the
'core'
part
of
ZPanel,
the
framework
contains
multiple
utility
classes
and
handles
the
MVC
architecture,
the
framework
is
what
all
modules
sit
on
top
of
and
communicate
with.
The
framework
was
designed
and
developed
by
Bobby
Allen
in
memory
of
his
best
childhood
friend
(David
Dryden)
who
passed
away
in
February
2011
at
the
age
of
22,
officially
named
the
'Dryden'
framework
it
is
designed
to
be
super
easy
to
develop
modules
with
far
greater
integration
for
modules
of
that
seen
in
previous
version
of
ZPanel.
The
framework
implements
its
own
implementation
of
an
MVC
architecture
which
we
feel
provides
greater
security,
easier
integration
and
faster
for
developers
to
build
robust
and
secure
modules.

The
purpose
of
this
guide
The
purpose
of
this
guide
is
to
provide
an
aspiring
module
developers
with
clear
information
on
what
the'
Dryden'
framework
is,
some
of
its
functionality
and
how
to
begin
writing
modules
for
ZPanelX,
we
will
also
aim
to
keep
this
document
as
simple
to
follow
as
possible
and
is
intended
as
a
quick
start
guide
rather
than
a
full
blown
document.

both
of
which
would
make
use
of
the
hooks
system.
Examples
of
a
system
module
may
include
any
one
of
the
following:-­‐
Nightly
backup
to
remote
a
server.
Examples
of
this
kind
of
module
may
include:
Postgres
Databases.
System
module
A
system
module
does
not
include
an
interface.
I
will
now
explain
how
each
of
these
module
types
differs.
Send
usage
statistics
to
a
web
service
every
daemon
run
etc.
security
and
configurability.P a g e
|
3
Type
of
modules
In
ZPanelX
there
are
now
three
types
of
modules
these
are
as
follows:-­‐
• • • System
module
User
module
Admin
module
The
main
difference
between
these
modules
is
their
visibility.
a
user
module
provides
both
access
restrictions
based
on
groups
as
well
as
the
ability
to
enable
or
disable
the
module
globally.
User
modules
provide
full
functionality
thus
meaning
a
web
interface
and
can
also
provide
web
services
and
hook
scripts.
Error
Page
Editor
Admin
module
This
module
is
designed
to
be
used
when
user
modules
have
configuration
options
and
therefore
Admin
modules
are
only
accessible
from
the
'Module
Admin'
module
these
should
be
thought
of
as
configuration
modules
really.
User
module
This
is
by
far
the
most
common
type
of
module.
SVN
Repositories.
these
modules
generally
only
make
use
of
system
hooks
and/or
web
services.
System
modules
do
not
appear
as
an
icon
in
ZPanel
nor
do
they
appear
in
the
Module
Admin
module
as
these
are
generally
very
low
level
and
do
not
require
the
kind
of
security
configurations
of
other
kinds
of
modules.
user
modules
can
also
be
moved
between
module
categories.
An
example
of
this
kind
of
module
is
the
Apache
Config
module
show
here:-­‐
Module
developer
guide
for
ZPanelX
.

The
following
files/folders
are
NOT
required
and
only
need
to
exist
if
you
wish
your
module
to
make
use
of
the
more
advanced
features
that
the
Dryden
framework
has
to
offer.
Module
developer
guide
for
ZPanelX
.xml
file.php
hooks/*
For
different
types
of
modules
you
don’t
need
certain
files.
for
example
a
‘System’
module
generally
only
uses
hook
files
or
has
a
web
service
extension
therefore
and
as
the
‘system’
modules
as
explained
in
the
‘Types
of
modules’
section
don’t
have
a
graphical
front-­‐end
therefore
doesn’t
require
the
module.
All
modules
MUST
have
a
module.P a g e
|
4
The
standard
folder
structure
of
a
module
The
example
screenshot
below
shows
an
example
layout
of
the
main
folders
and
files
of
a
module.zpm
file.ext.
• • code/webservice.

hook.php
file
can
be
found
later
on
in
this
document.
More
information
regarding
use
of
template
tags
can
be
found
in
the
Framework
tinplating
tags
section
of
this
document.php
file.
executing
some
SQL
code.jpg”>
This
will
then
display
the
image
named
‘myimage.
the
code
folder
can
(if
the
module
makes
use
of
them)
hold
the
following
files:-­‐
• • • install.)
to
complete
upon
an
installation.
the
code
folder
is
also
the
recommended
folder
to
place
in
any
PHP
code
libraries
that
you
may
want
to
use
in
your
module
and
any
other
PHP
includes
etc.
The
hooks
folder
Again.
The
files
stored
in
this
folder
can
be
easily
retrieved
for
use
in
the
modules
‘view’
by
using
this
template
tag:-­‐
<# ui_tpl_assetfolderpath #>
So
we
can
easily
display
a
module
image
that
exists
in
the
‘assets’
folder
like
so:-­‐
<img src=”<# ui_tpl_assetfolderpath #>/myimage.
The
deploy
folder
If
exists
(this
is
not
a
required
folder).
upgrade
or
removal
of
a
module
via
the
zppy
interface.
As
well
as
these
two
standard
files.ext.run
remove.
although
the
technical
aspects
of
how
the
zppy
cient
works
are
covered
in
the
zppy
documentation.
this
folder
is
not
required
and
only
exists
if
your
module
should
make
use
of
any
hooks.
The
files
(PHP
classes)
that
exist
in
this
folder
are
named
with
the
Hook
execution
name
and
then
with
the
.php
when
in
use.P a g e
|
5
I
will
now
explain
what
the
man
folder
types
are
used
for
and
go
into
more
detail
about
them.run
upgrade.ext.
creating
some
extra
folders
etc.
these
files
are
simply
PHP
files
containing
extra
tasks
(such
as
copying
files.
The
code
folder
The
code
folder
contain
executable
PHP
and
is
the
first
place
that
the
Dryden
framework
will
look
for
your
module’s
controller.jpg’
on
your
modules
user
interface.
CSS
and
JavaScript
files.
The
deploy
folder
is
used
by
the
zppy
(pronounced
‘zippy’)
client.
The
code
folder
also
is
home
to
the
webservice.php
file
extension.
More
about
the
controller.
This
folder
is
also
a
great
place
to
store
your
modules
icon
that
appears
in
ZPanel.run
These
files
are
executed
when
the
zppy
client
installs
upgrades
or
removes
the
module
from
your
ZPanel
installation.
The
assets
folder
The
assets
folder
provides
a
standard
place
to
store
module
specific
images.
Module
developer
guide
for
ZPanelX
.ext.

this
is
most
certainly
a
major
file
and
one
that
as
a
module
developer
you
should
ensure
that
you
configure
correctly
before
releasing
your
module
for
public
consumption.
(See
screenshot
2)
The
framework
will
also
check
for
updates
for
the
module
using
the
content
of
the
<moduleupdateurl>
tag.)
This
file
also
contains
the
version
number
of
the
module
as
well
as
other
information.
it
includes
an
update
service
URL
which
is
used
by
the
server
running
ZPanel
on
to
check
and
display
if
the
module
has
updates
available
and
if
so
will
also
provide
a
link
to
enable
the
user
to
download
the
latest
version
of
your
module.
(See
screenshot
3)
This
file
is
also
used
in
other
parts
of
the
system
and
obviously
in
future
could
also
be
used
by
third-­‐ party
modules.xml
file
This
file
contains
meta
information
about
the
module
and
in
used
in
various
places
in
ZPanel.
Screenshot
2
–
Showing
the
‘module
information’
window
which
is
part
of
the
Module
Admin
module:
Module
developer
guide
for
ZPanelX
.
The
main
places
where
the
contents
of
this
file
is
used
are
as
follows:-­‐
•
• •
Import
the
module
meta
data
into
the
x_modules
table
and
uses
the
module
description
tag
data
on
user
however
over
when
highlighting
over
a
module.
The
module.P a g e
|
6
More
information
on
hooks
can
be
found
later
on
in
this
document
in
the
section
named
‘Integration
using
hooks’.
this
file
contains
information
about
the
developer
and
the
module
itself.
(See
screenshot
1)
The
'Module
admin'
module
interrogates
this
file
and
displays
the
information
when
an
admin
clicks
on
the
module
information
link.
Screenshot
1
–
Shows
the
module
description
on
‘hover
over’
of
the
module
icon.

these
are
maintained
by
the
ZPanel
team
and
will
mean
you
have
less
that
you
need
to
maintain
etc
as
the
ZPanel
team
will
keep
these
core
classes
patched
and
if
the
low
level
PHP
functions
used
are
ever
deprecated
we’ll
replaced
them
to
ensure
that
the
functions
remain
working
as
they
should.
Using
an
IDE
(Integrated
development
environment
such
as
NetBeans
or
Eclipse
will
allow
you
to
easily
browse
and
auto-­‐complete
class
methods
within
your
module
code.
This
functionality
is
provided
by
the
controller.zpm
file
via
the
framework
template
tags.ext.
more
information
about
these
tags
can
be
found
in
the
Framework
Template
Tags
section.P a g e
|
7
The
module.
This
file
contains
a
PHP
class
with
methods
the
methods
from
this
file
are
accessed
via
the
module.
this
file
is
considered
the
model
(controller
extension).
This
file
can
also
call
and
make
use
of
any
of
the
standard
framework
classes
and
methods
under
the
dryden/
directory.
for
more
information
about
the
template
tags.
think
of
these
as
utilities
or
‘tools’
and
where
ever
possible
you
as
a
module
developer
should
make
use
of
these
in
your
modules
instead
of
duplicating
functionality.
By
using
the
framework
classes
and
methods.
the
Dryden
framework
will
auto
load
any
of
these
classes
upon
request.
do
more
with
less!
The
Dryden
framework
contains
a
whole
host
of
easy
to
access
static
functions.
please
see
the
Framework
Template
Tags
section.
this
file
is
considered
the
view.
This
file
contains
standard
HTML/XHTML
and
can
access
data
objects
and
code
via.
Module
developer
guide
for
ZPanelX
.php
file
In
the
MVC
methodology.
Use
the
framework
classes.
The
controller.zpm
file
In
the
MVC
methodology.
the
template
tags
that
are
provided
by
the
Dryden
framework.

php
file)
to
pass
data
back
and
forward
to
the
view
(the
module’s
module.zpm
file
would
be
successfully
parsed
and
the
translated
string
outputted
to
screen:
Module
developer
guide
for
ZPanelX
.php
file.zpanelcp.
For
example.
<% endloop %>
Each
of
the
above
tags
with
the
exception
of
the
translation
tag
relies
on
the
controller.
<% endif %>
Looping/Controls:-­‐
<% loop MethodName %>.ext.zpanelcp.php
file
of
the
current
module.ext.ext.
the
template
translation
tags
does
a
database
lookup
in
the
x_translations
table
in
the
ZPanel
database
and
if
there
is
a
corresponding
language
translation
it
will
replace
the
text
with
the
equivalent
otherwise
it
will
fall
back
and
use
the
text
string
encapsulated
between
the
'<:'
and
':>'
tag.
we
recommend
that
you
follow
the
official
template
CSS
styles
to
ensure
that
your
modules
interface
uses
the
standard
CSS
styles
so
that
your
module
remains
'fluid'
on
new
template/styles
the
user
installs
on
their
server.
This
is
covered
in
greater
depth
in
the
template
documentation:
-­‐
http://developer.
all
PHP
code
has
to
be
placed
inside
a
PHP
method
inside
the
module’s
controller.P a g e
|
8
Great
lengths
have
been
taken
to
create
utility
classes
for
just
about
all
general
development
requirements
as
well
as
class
and
method
documentation
conforms
to
the
PHPDoc
standard.com/api/
Don't
break
the
user
interface
style.
use
the
official
CSS
class
names!
Although
you
don't
have
too.
For
module
development
there
are
four
main
template
tag
types
which
you
can
use.zpm
file.
It
is
important
to
note
that
each
of
the
above
tags
MUST
have
a
space
after
and
before
the
tags
are
closed.
the
tag
will
simply
appear
in
the
template
without
being
parsed.zpm
file).
A
full
list
of
the
framework
classes
and
their
properties
can
be
found
online
here:-­‐
http://developer.com/template/
The
framework
template
tags
As
a
security
feature
execution
of
PHP
has
been
disabled
from
being
ran
from
inside
the
module.
Translation
tags
Translation
tags
are
used
for
on
the
fly
translation
of
text.
not
doing
this
will
invalidate
the
tag
and
it
will
not
be
parsed.
this
block
of
code
in
the
module.
<% else %>.
<~ ArrayKey ~>.
the
use
of
template
tags
allows
the
model
(the
module’s
controller.
these
are
as
follows:-­‐
Translation
tags:-­‐
<: Text to translate :>
Core
Template
Tags: <# ui_tpl_assetfolderpath #>
Code
execution:-­‐
<@ MethodName @>
Logic
tags:-­‐
<% if MethodName %>.

Logic
tags
We
also
provide
logic
tags
so
a
decision
can
be
made
at
the
view
layer
as
to
display
a
module
related
area
or
text. so hello!'.
here
is
an
example:-­‐
static function getSayHello(){ return 'I was told to say hello.
Be
aware
that
for
custom
strings
and
less
generic
words
and
phrases
a
module
developer
will
need
to
include
new
rows
to
the
x_translations
table
to
ensure
his
or
her
module
is
multi-­‐lingual.ext. } To
execute
the
code
and
get
your
text
to
display
in
the
'view'.php
file:-­‐
static function getTodayIsMonday(){ if(date('D') == 'Mon') return true.
The
requirements
of
this
tag
requires
that
you
have
a
method
(static
function)
in
your
controller.php
file.ext.zpm
file
like
so:-­‐
Module
developer
guide
for
ZPanelX
.
here
is
an
example:-­‐
So
a
simple
static
function
in
our
controller.
simply
checks
if
the
day
today
is
Monday.
these
logic
tags
basically
just
check
the
return
value
of
a
static
function
in
your
modules
controller.ext.
this
isn't
required
but
a
good
idea
if
you
want
your
module
to
have
full
localisation
support.
the
method
name
is
that
of
the
tag
contents
prefixed
with
'get'.zpm
file:-­‐
<@ SayHello @> The
above
example
is
obviously
really
simple
and
your
actual
methods
would
normally
return
more
than
just
a
basic
string
and
more
likely
to
return
an
array
or
data
object. } The
above
code.
you
would
enter
this
tag
wherever
you
wanted
the
text
to
appear
in
your
module.
Code
execution
tags
Probably
the
most
used
type
of
tag.
the
above
string
simply
says
'
This
is
the
text
to
translate'.
this
enables
you
to
execute
some
PHP
code
and
return
some
text
output
if
required.P a g e
|
9
<: This is the text to translate :> If
the
module
developer
provided
translations
for
his
module
in
French
and
the
user
had
'French'
selected
as
their
language
via
the
'My
Account'
module
then
the
tag
would
be
parsed
and
outputted
in
the
template
when
parsed
as:
Ceci est le texte à traduire
For
those
of
you
that
cannot
speak
French. return false.
so
we
can
now
use
this
logic
in
our
module.php
file.

ext.
the
data
is
sent
back
to
the
main
controller
and
then
on
to
the
module’s
controller.php
file
this
is
where
it
will
execute
the
contents
of
the
method
named
‘doDeleteCron’.
so
for
example:-­‐
<% if TodayIsMonday %> <@ ShowMeMyJobs @> <% endif %> The
above
code
would
only
run
the
<@
ShowMeMyJobs
@>
code
if
the
day
is
a
Monday!
Control
loop
tags
A
great
use
for
control
loops
can
be
when
you
want
to
generate
a
drop
down
menu
from
a
database
table
or
if
you
want
a
list
of
rows
to
display./?module=cron&action=DeleteCron"
method="post">
I’ve
highlighted
the
form
action
to
class
method
part.
the
method
name
should
be
prefixed
with
'do'.
this
should
now
make
sense
and
you
can
see
where
we
have
used
the
‘do’
prefix
for
posting
data
in
the
same
way
that
we
use
the
‘get’
prefix
for
when
we
request
data
from
the
view
layer
using
the
‘<@’
tags.
Here
is
an
example
snippet
HTML
form
tag:-­‐
<form
action=".
if
a
valid
data
array
is
returned
you
can
then
use
the
results
in
the
template
like
so:-­‐
<td>Domain name</td> <td>Domain home directory</td> <% loop AllDomains %> <tr> <td><~ domainname ~></td> <td><~ domaindir ~></td> </tr> <% endloop %> The
result
would
then
create
a
row
and
display
all
of
the
domains
that
exist
in
the
returned
array.php
file
for
you
to
then
manipulate.
With
the
control
loop
tags
you
can
easily
iterate
over
an
array
of
results.
Like
the
Logic
and
Execute
code
tags.
the
method
needs
to
be
prefixed
with
'get'.
The
result
of
which
should
be
an
easy
Module
developer
guide
for
ZPanelX
.
when
the
form
is
posted.ext.
Posting
of
HTML
form
data
When
posting
data
using
forms
inside
your
modules
you
need
to
use
an
'action'
URL
parameter.P a g e
|
10
<% if TodayIsMonday %> Yay today is <strong>Monday</strong> <% else %> I can assure you that today is not Monday! <% endif %> You
can
also
just
use
a
logic
block
without
the
use
of
an
<%
else
%>
tag.
Control
loops
require
the
method
to
return
a
valid
data
array.
the
value
of
which
then
passes
the
data
to
a
method
in
your
modules
controller.

'FormFieldName').com/example_module.
ZPanel
will
connect
to
the
remotely
hosted
updateservice.ext.P a g e
|
11
to
browse
controller.
This
is
what
the
contents
of
the
updateservice.
Another
example
of
getting
the
raw
form
data
and
processing
it
inside
you
‘do’
method
could
look
like
so:-­‐
if ($controller->GetControllerRequest('FORM'.
if
the
module’s
module.0" encoding="utf-8"?>
<updateserver>
<latestversion>100</latestversion>
<downloadurl>http://packages.
If
the
module
URL
is
not
contactable
then
the
module
will
simply
report
as
being
up
to
date
(there
are
no
updates
available)
on
the
assumption
that
the
module
developer
no
longer
owns
the
domain
name
or
no
longer
develops
the
module
and
therefore
we
assume
that
the
user
is
using
the
latest
version
of
the
module. $retval = TRUE.zpanelcp.xml
file
can
be
manually
updated
by
hand
and
be
a
static
XML
file
or
depending
on
your
skills
as
a
developer
you
could
automate
this
with
PHP
or
another
dynamic
language
if
you
wanted
too.zpp</downloadurl> </updateserver>
Module
developer
guide
for
ZPanelX
.
Using
the
above
example
you’d
replace
the
FormFieldName
text
with
the
input
field’s
name
to
quickly
grab
the
posted
form
data. } The
above
example
would
get
the
value
of
the
text
field
name
‘inScript’
from
the
posted
form
and
then
check
it
to
see
if
its
blank.
Grabbing
field
data
Inside
your
‘do’
method
(for
example
‘doDeleteCron’
as
shown
in
our
above
example)
you
can
easily
grab
the
field
data
from
the
inputs
you
‘posted’
from
the
forum
using
this
controller
method:-­‐
global $controller.
The
module
update
service
By
default
ZPanel
will
go
through
on
a
daily
basis
and
check
the
versions
of
all
modules
that
exist
in
the
/modules/
folder
in
ZPanel.. 'inScript') == '') { self::$blank = TRUE.xml
file
at
the
given
URL. .xml
file
looks
like:-­‐
<?xml version="1.php
file
where
you
(as
a
developer)
can
quickly
differentiate
between
the
method
types.
The
updateservice..
if
it
is
blank
it
sets
a
static
variable
‘$blank’
to
‘true’
which
can
then
be
checked
before
returning. $controller->GetControllerRequest('FORM'.xml
file
is
found
to
have
a
valid
<moduleupdateurl>
tag.

php
in
the
desired
method
at
the
point
of
required
execution.
to
do
this
you
simply
add
this
declaration
(in
the
same
way
we
have
in
the
framework)
to
your
controller.
from
a
technical
view.
a
practical
use
for
this
hook
might
include
to
destroy
other
server
sessions
for
other
web
apps
such
as
phpMyAdmin
etc.
System
or
Modadmin
module.
Module
developer
guide
for
ZPanelX
.hook.P a g e
|
12
The
<latestversion>
tag
should
contain
the
latest
version
of
the
module
that
you
have
released
for
public
use.php
the
contents
of
this
file
would
then
be
executed
each
time
a
user
logs
out
of
ZPanel.
if
the
version
number
in
the
<latestversion>
tag
is
newer
to
that
of
the
one
that
the
ZPanel
server
has
installed
it
will
then
use
the
link
in
the
<downloadurl>
tag
to
provide
the
ZPanel
administrator
with
a
download
link
to
grab
the
latest
version.
these
files
are
simply
'included'
at
the
point
of
execution.php
file
extension.
Integration
using
hook
files
Hooks
are
a
new
feature
added
in
ZPanelX
which
enables
modules
to
'hook
in'
at
a
given
point.
So
for
example.
Hook
files
are
standard
PHP
scripts
that
are
executed
inline.
the
framework
and
core
classes
provide
several
default
hook
points
of
which
can
all
be
used
in
any
type
of
module
being
that
a
User.
Adding
XMWS
web
service
functionality
to
your
module
If
you
have
designed
your
module
to
use
'interface'
methods
and
'worker'
methods
as
described
in
The
Best
practices
of
module
development
for
ZPanelX
then
adding
XMWS
functionality
really
is
quick
and
easy.
you
would
need
to
create
a
file
named
OnUserLogout.
this
will
be
used
by
ZPanel
to
display
and
determine
if
the
currently
installed
version
of
the
module
is
older
than
your
most
recent
release.
Adding
hook
points
into
your
modules
In
more
advanced
modules
you
may
wish
to
provide
your
own
hook
points
to
enable
other
developers
to
integrate
easier
with
your
module.
Hook
files
that
you
create
must
reside
in
your
/hooks/
directory
of
your
modules
root
folder
and
must
be
named
with
the
hook
reference
and
then
have
the
. When
adding
your
own
hook
points.
if
you
wanted
to
run
some
code
when
a
user
logs
out
of
ZPanel.
be
sure
to
give
them
a
sensible
but
unique
name
as
someone
else
may
accidently
use
the
same
name
as
your
hook
and
in
which
case
may
have
undesired
affects.
runtime_hook::Execute('YourHookNameHere').
There
are
ton’s
of
standard
hooks
across
the
ZPanel
framework
and
as
we
are
always
adding
additional
hooks
we
don’t
supply
a
complete
list
of
all
the
available
hooks
(there
are
so
many!)
and
instead
we
recommend
that
developers
explore
the
core
code
and
see
where
they
need
a
hook
to
execute
and
then
choose
a
hook
name
suitable
to
their
requirements
to
use
from
the
code.ext.hook.

ini
file
therefore
when
your
module
throws
an
error
you'll
receive
an
error
message
on
screen.’).
it
just
makes
things
more
‘professional’.
You
can
also
use
the
global
$zlo
(ZPanel
Logging
Object)
within
your
modules
controller.ext.
Logfile.zpm
(HTML/XHTML
content). $zlo->writeLog().
Best
practices
of
module
development
for
ZPanelX
When
designing
your
module
you
should
think
about
what
methods
you
need
and
what
ones
do
what.
Its
best
to
keep
HTML
and
PHP
code
separate
therefore
we
do
not
recommend
you
echo
out
HTML
from
your
PHP
methods
but
understand
if
you
want
to
and
in
some
circumstances
we
are
aware
that
it
is
necessary
to
do
so!
–
The
new
template
logic
tags
and
conditional
loops
in
most
cases
will
enable
you
to
have
a
dynamic
bridge
between
your
code
and
module.
to
screen
or
email)
like
to:-­‐
global $zlo.
A
'worker'
class
basically
does
the
actual
action
and
takes
parameters
and
relies
on
the'
interface'
class. .ext. $zlo->mextra(‘This can be used for extra logging information such as a trace log etc.php
file
to
log
errors
to
the
predefined
data
logging
medium
as
set
in
the
x_settings
table.
its
always
good
to
provide
documentation
too.
ideally
you
should
split
your
methods
up
into
'worker'
methods
and
'interface'
methods
by
doing
this
you
can
easily
make
use
of
your
'worker
'methods
not
only
from
the
module
web
interface
but
also
using
XMWS
(Web
services)
this
will
reduce
the
amount
of
code
and
generally
keep
things
clean
and
tidy.zpp
(ZPanel
Package
File)
file.
database.
Always
make
sure
that
your
module’s
module.
If
you
want
your
modules
to
have
a
maximum
audience
and
to
have
full
compatibility
with
the
zppy
package
manager
you
must
ensure
you
package
your
module
into
a
.xml
file
is
configured
correctly
and
up
to
date.
how
long
it
took
to
execute
as
well
as
a
list
of
all
modules
that
are
currently
loaded
can
be
seen
at
the
bottom
of
the
current
page.
(eg.com/xmws/
Debugging
your
modules
at
runtime
To
view
errors
within
your
modules
you
are
advised
to
enable
PHP
error
reporting
if
you
haven't
already
done
so
in
your
PHP.
hook
script
or
webservice. // A custom error code.
Production
servers
do
not
normally
have
PHP
error
reporting
enabled
for
security
reasons
therefore
unless
you
enable
this
you
are
more
than
likely
to
receive
a
blank
screen
or
for
it
to
simply
suppress
the
error.
Module
developer
guide
for
ZPanelX
. whatever you want! $zlo->detail(‘My module error description would go here’).P a g e
|
13
The
XMWS
web
service
layer
is
documented
in
this
document:
http://developer. $zlo->code(3445).php
to
do
any
error
checking
or
validation.zpanelcp.
By
appending
the
current
URL
of
a
page
with
&debug=true
you
will
then
notice
that
debug
information
containing
how
much
memory
the
current
page
is
using...
When
releasing
your
modules
to
the
public
ensure
that
you
have
fully
tested
your
module.

com
is
the
way
to
go!
Module
developer
guide
for
ZPanelX
.
Personally
I
recommend
using
Netbeans.
All
good
developers
should
use
a
decent
IDE.
its
open-­‐ source.
Other
resources
The
official
PHP.
this
is
great
to
a
quick
look
at
all
available
framework
classes
and
methods
–
especially
if
your
IDE
(Integrated
Development
Environment)
of
choice
doesn’t
support
PHPDoc
auto-­‐completion.
host
your
source
code
and
provide
you
with
bug
tracking
functionality!
-­‐
Github.net
website
provides
outstanding
documentation
for
the
language
if
you
are
a
professional
developer
then
you
don't
need
us
to
tell
you
that
the
PHP.net
website
is
a
great
resource
and
tool
to
help
you
build
any
type
of
module.com/zppy/
The
best
way
to
learn
By
far
the
best
way
to
learn
and
one
of
the
beauties
of
open-­‐source
software
is
to
look
and
explore
the
code.zpanelcp.
sign-­‐up
for
an
account
on
GitHub.
get
a
feel
for
what
they
are
doing
-­‐
the
ability
to
look
at
live
working
examples
and
armed
with
this
guide
you
should
now
be
well
on
your
way
to
writing
your
first
module.
If
you
intend
on
making
your
module
professionally
use
version
control.zpanelcp.P a g e
|
14
more
information
about
how
to
achieve
this
an
thus
provide
automated
updates
and
a
means
of
installing
your
modules
automatically
from
both
the
Mod
Admin
module
and
the
CLI
read
the
Zppy
documentation
which
can
be
found
here:-­‐
http://developer.com
if
you
don't
already
have
one
and
use
your
Github
repository
to
document.
The
official
ZPanel
community
forums
are
also
a
great
place
to
ask
questions
and
get
help
from
the
official
ZPanel
development
team
Developer.
for
a
module
developer
wanting
to
write
a
module
for
ZPanel
you
should
take
a
look
at
the
default
modules
that
come
with
ZPanelX.com
provides
full
class
and
method
documentation
in
an
easy
to
browse
format.
comes
with
version
control
support.
auto-­‐completion
and
full
of
other
really
useful
tools.