View previous topic :: View next topic |
Author |
Message |
natrat22
Joined: 28 Jul 2016 Posts: 37 Location: Australia
|
Posted: Sun Jul 31, 2016 11:34 pm Post subject: Customising Slips |
|
|
I understand visual customisation of slips must be be done directly in the code.
But what about the info fields? I can't find them in UI Customisation. I want to remove some and modify others (ie, turn KB into MB). Does this all need doing manually as well? If so how can i change KB to MB in the code?
ta
nathan |
|
Back to top |
|
|
alan Forum facilitator
Joined: 26 Sep 2003 Posts: 4435
|
Posted: Mon Aug 01, 2016 5:45 am Post subject: |
|
|
You need to make changes to the followings:
1) cmlang.php : line 964 change to MBytes
Code: | $lang['setcfg_users_popup_slip_uquota'] = 'Upload Quota(MBytes):';
$lang['setcfg_users_popup_slip_dquota'] = 'Download Quota(MBytes):';
$lang['setcfg_users_popup_slip_tquota'] = 'Total Quota(MBytes):';
|
2) slip.php : Line 291 add "/1024" to the output
Code: | // Upload Quota
if(isset($user_info['bwcountUL'])){
if ( $user_info['bwcountUL'] == 2)
$userData = $userData . "\n\n<tr><td><font face=Arial size=1><strong>•</strong> ".get_cm_var('setcfg_users_popup_slip_uquota').($user_info['bwquotaUL']/1024)."</font></td></tr>";
}
// Download Quota
if(isset($user_info['bwcount'])){
if ( $user_info['bwcount'] == 2)
$userData = $userData . "\n\n<tr><td><font face=Arial size=1><strong>•</strong> ".get_cm_var('setcfg_users_popup_slip_dquota').($user_info['bwquota']/1024)."</font></td></tr>";
}
// Total Quota
if (isset($user_info['bwcountSha']) && $user_info['bwcountSha'] == 2) {
$userData = $userData . "\n\n<tr><td><font face=Arial size=1><strong>•</strong> ".get_cm_var('setcfg_users_popup_slip_tquota).($user_info['bwquotaSha']/1024)."</font></td></tr>";
} |
Note that you only need to change the line (Upload, Download, Total) that you use. _________________ ~ Patronsoft Limited ~ |
|
Back to top |
|
|
natrat22
Joined: 28 Jul 2016 Posts: 37 Location: Australia
|
Posted: Mon Aug 22, 2016 12:01 pm Post subject: |
|
|
Hi Alan,
just doing this now, however the slip.php file on my system doesn't have the brackets around this section from line 291:
.$user_info['bwquotaUL'].
Just checking that i need to add them in exactly as in your example:
($user_info['bwquotaUL']/1024). |
|
Back to top |
|
|
alan Forum facilitator
Joined: 26 Sep 2003 Posts: 4435
|
Posted: Tue Aug 23, 2016 4:02 am Post subject: |
|
|
It is better to have brackets to avoid ambiguity. _________________ ~ Patronsoft Limited ~ |
|
Back to top |
|
|
natrat22
Joined: 28 Jul 2016 Posts: 37 Location: Australia
|
Posted: Wed Oct 26, 2016 2:04 am Post subject: |
|
|
Thanks for this. What do I do to remove a line entirely? I dont want the slips to show these lines:
• Account will bind to first login MAC address
• Account allow login in All network segments
and/or i want to change it to reflect my own text |
|
Back to top |
|
|
natrat22
Joined: 28 Jul 2016 Posts: 37 Location: Australia
|
Posted: Wed Oct 26, 2016 4:48 am Post subject: |
|
|
Also is there a way to remove the "Sign Up Now!" link next to the Scratch Code box? I'm not sure that is serves any purpose does it? I can understand it required for the username/password option. |
|
Back to top |
|
|
alan Forum facilitator
Joined: 26 Sep 2003 Posts: 4435
|
Posted: Wed Oct 26, 2016 1:18 pm Post subject: |
|
|
Are you interested in subscribing to our maintenance program? Our maintenance program includes official support plus free upgrade. Please email us at firstspot@patronsoft.com to discuss. _________________ ~ Patronsoft Limited ~ |
|
Back to top |
|
|
|