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 (currently these can only be added in the tpl/skins directory but I will add the ability soon to have your own skins stored in the custom directory)
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
To any config_*.dat file add:
lock_name_auth true
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
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
# 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="http://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;
}
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);