You can enable the extension css and javascript instead. These will allow you to override any surgeweb core CSS declarations or replace any native surgeweb javascript functions. You can customise any core surgeweb javascript function. Either by replacing it or more likely "hook" them by providing your own intermediate level of functionality which then calls the core surgeweb code in order to do the core interface actions.
You probably should not be looking at the advanced customisation techniques but be looking at the standard customisation page. The admin interface surgeweb customisation page allows you to change much of the look and feel without needing to consider html, css, and javascript. Also you can use skins to define a set of styles to be applied to multiple domains
Below are the recommended ways of making these changes to keep your life easy during surgemail upgrades. If there is something you want to change that you cannot, please contact surgemail-support@netwinsite.com with a description of what you would like to be able to change and why.
If netwin staff are troubleshooting your system for surgeweb problems and advanced customisation has been applied, one of the first tests will be to test with customisation disabled. This will preferably be done using the surgemail.ini setting surgeweb_custom for this purpose, or if necessary by copying the original files back into the surgeweb/tpl directory.
The advanced options and customisation pane in the preferences will not be displayed if you add this to any config_*.dat file:
lock_options_basic true
Add this to any config_*.dat file:
lock_options_advanced trueand the following to extend.css
.nosmart{ display:none; }
To any config_*.dat file add:
lock_name_auth true
By default users are not allowed to spoof their from header reply email addres. To allow users to set, add the following setting to the users' _user.dat file or to any config_*.dat file:
allowed_from *or
allowed_from *@mydomain.com
always_show_quota true
In extend.css add the relevant style definitions below:
#app_filestore{ display:block; } #app_photos{ display:none; }
Calendar and photos can be hidden by disabling surgeplus using the surgemail.ini setting:
g_disable_surgeplus "TRUE"or by using user_access settings
!surgeplusBlogs can be hidden using the user_access setting
!blogs
In extend.css add:
#remember_me{ display:none; }
Setup your own pages of the same name and point all the surgeweb help links at that using the follwoing setting in any config_*.dat file:
help_url http://mywebsite.com
abook name="Global" read="!*" write="!*" type="" abook name="Domain" read="!*" write="!*" type="" abook name="LdapAbook" read="*" write="" type="ldap" abook name="AuthentAbook" read="*" write="" type="auth" abook name="Surgeweb" read="*" write="" type=""
abook name="Global" read="!*" write="!*" type="" abook name="Domain" read="!*" write="!*" type=""
labels_disable true
snippets_disable true
contact_groups Friends,Family,Colleaguesor
contact_groups Foo,Baror
contact_groups
The raw user.cgi settings on the "Options - Preferences - Filtering and Spam Control" page already get hidden if g_user_access / user_access settings are used to disable spam handling. To always hide, add this to extend.css:
.raw_user_cgi{ display:none; }
#opt_fs_disabled_warn{ display:none; }
This functionality can be enabled / disabled using g_user_access / user_access / the authentication databse user_access fields and they will be removed from display in surgeweb:
relevant fields: fwd, fdwonly, exceptions, friends, spam
To remove the "Check the delivery log for a record of processing actions" link on the "Options - Preferences - Filtering and Spam Control" page, add this to extend.css:
#opt_fs_log{ display:none; }
To remove the "Options - Preferences - Advanced" page current surgemail version, add this to extend.css:
#opt_adv_version{ display:none; }
config_domain.dat add: mobile_custom_banner true and you place your modified logo image in surgeweb/custom/banner_mobile.jpg or surgeweb/custom/your_domain/banner_mobile.jpg
mobile_custom trueThen create _mobile_custom.htm file in surgeweb/custom (and optionally in surgeweb/custom/domain.com). This allows you to arbitrarily modify the icon url or completely override and replace the content on individual top level template pages.
# modify the banner image url as we see fit if needed, here are two examples #||define((mobile_banner),concat((/whatever?domain=),domain_ex,(&img=banner_mobile.jpg)))|| #||define((mobile_banner),(https://netwinsite.com/img2/logo_med_onwhite.png))|| # Example of overriding the whole template output of any of the top level pages in # the surgeweb/tpl/mobile directory ||if(equal(page,(sw.htm)))|| Yes!! Own template output :-) # Should base page content on the original file sw.htm in surgeweb/tpl/mobile directory # Can even include a template from the original surgeweb/tpl/mobile directory if we want ||include||../tpl/mobile/_msgs.htm|| </body> </html> ||template_exit()|| ||endif||Note: This mechanism for template customisation without making changes to the tpl directory can be used on the html interface as well using the settings of "html_custom true" and "_html_custom.htm" file.
# Hook the usercgi dialog function to do some of our own handling instead if(true){ hook_user_cgi_dlg(); } # Store original function and replace with our own one. In this case do our own action if it was the password button var user_cgi_dlg_orig; function hook_user_cgi_dlg() { user_cgi_dlg_orig=user_cgi_dlg; user_cgi_dlg=function(type){ if (type=='password'){ open_popup2('https://my.server.name/public/changepass.aspx'); return; } user_cgi_dlg_orig(type); } }
#opt_gen_change_password{ display:none; }
var node=dge('link_bar').childNodes[2]; var frag=document.createElement('span'); frag.innerHTML=' <a href="https://netwinsite.com">MyLink</a> | '; node.parentNode.insertBefore(frag,node);
.folder_icon{ background: url(vbtn_icons.gif?||vz||) no-repeat 0 -80px; }
# Base folder name colours ul.ftree{ color:blue; } # Colors associated with folder list selection handling .ftree .selected, .ftree .hover_js, .ftree .hover_js a, .ltree .selected, .ltree .hover_js { color:blue; } ul.ftree .selected a { color:blue; } #folders .part_cursor:hover, #folders .part_cursor:hover a { color:blue; } # Labels and Searches text color .green_text{ color:blue; }
.fault_report_button{ display:none; }
rcol_login Some textor iframe based:
rcol_login iframe rcol_login_url https://netwinsite.comand in extend.css customise rcol_login_outer and rcol_login_iframe for positioning etc as needed.
disable_login_autocomplete true
st_hint_custom_01 Hint: The My Company mailserver documentation can be found <a href="http://mycompany.none/page.htm" target="popup">here</a> and is maintained by John Doe st_hint_custom_02 Hint: This rather important thing our My Company users should know about...2) Define the strings id numbers you want to get shown using a setting in config_*.dat
custom_hints_show 01,02Note: a maximum of 32 custom hints are available and the numbers must be two digits (ie 1-9 are zero prefixed)
system_hints_disable 01,02,05Disable the hints system completely using (surgemail 6.0b-4+) [and 6.0a3-3(patched)]:
all_hints_disable true
autologout_enforced trueAlternatively assign the default duration (in minutes) and default state for new users [on|off] using these config_*.dat settings:
autologout_duration 30 pref_autologout_type on
extras_disable allor
extras_disable legal,aliasNone: Extras tab also only shows the relevant entries when allowed to as per user_access authentication database permissions
if(true){ move_panel_to_top('app_menu') alternate_menu(); }Or alternatively here the creation of panels on the left say with your own content in it. Here are several examples from extend.js:
# New fancy panel at the bottom with title and body text. Again can have anything in it new_panel_fancy('My own panel header', 'Fancy panel body with anything in it','bottom'); # New fancy panel at the bottom with live maps as an example var content='<iframe id="a_map" src="http://wikimapia.org/s/#lat=-40.7805414&lon=173.8476563&z=4&l=0&m=a&v=1" width="'+lc_width()+'" height="200" frameborder="0" style="background:||lpanel_color||"></iframe>'; new_panel_fancy('Wikimapia!! <i><a href="http://wikimapia.com" target="_popup">link</a></i>',content,'bottom',true); # New fancy panel at the bottom with youtube content as an example var content='<object width="'+lc_width()+'" height="200"><param name="movie" value="http://www.youtube.com/v/Pfs4Rd5f_IQ&hl=en&fs=1"></param>'+ '<param name="allowFullScreen" value="true"></param>'+ '<embed src="http://www.youtube.com/v/Pfs4Rd5f_IQ&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true"'+ ' width="'+lc_width()+'" height="200"></embed></object>'; new_panel_fancy('Youtube!!',content,'bottom',true);
# Globally disable inbox caching. Anyone saving preferences with this enabled will set # their account's inbox caching to disabled in their own preferences. This will remain # disabled unless the user re-enables. global_nocache true # Globally disable new mail checks. Anyone saving preferences with this enabled will set # their account's inbox caching to disabled in their own preferences. This will remain # disabled and the user is not able to re-enable, so requires editing of _user.dat to # re-enable new mail checks. global_nocheck true