Changes

Jump to navigation Jump to search
m
→‎Exercise 2: The magic of templates: add note about esmith perl libraries location for SME9
Line 104: Line 104:     
The reason this works is subtle, but follows from the overall architecture. It is critical to study this example until you understand it thoroughly. If you understand exactly how this example works, you understand a substantial part of the SME Server architecture.
 
The reason this works is subtle, but follows from the overall architecture. It is critical to study this example until you understand it thoroughly. If you understand exactly how this example works, you understand a substantial part of the SME Server architecture.
 +
 +
{{Note box|Please note that as of SME Server version 9 and forward, the default location of the esmith perl libraries is'/usr/share/perl5/vendor_perl/esmith, for previous SME Server versions is  '/usr/lib/perl5/site_perl/esmith'.}}
    
To understand this example in detail, let's start from the top by studying the user interface. The implementation section of the <span class="emphasis">''E-mail''</span> function can be found in the file <tt class="FILENAME">/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/emailsettings.pm</tt>. If you study the part of this script that gets executed when the user clicks <span class="emphasis">''Save''</span>, you will find some Perl code that saves the administrator e-mail address into the configuration database and signals the <tt class="FILENAME">email-update</tt> event - thus informing the system that the email settings have changed:
 
To understand this example in detail, let's start from the top by studying the user interface. The implementation section of the <span class="emphasis">''E-mail''</span> function can be found in the file <tt class="FILENAME">/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/emailsettings.pm</tt>. If you study the part of this script that gets executed when the user clicks <span class="emphasis">''Save''</span>, you will find some Perl code that saves the administrator e-mail address into the configuration database and signals the <tt class="FILENAME">email-update</tt> event - thus informing the system that the email settings have changed:

Navigation menu