| [ PHPXref.com ] | [ Generated: Sun Jul 20 21:01:33 2008 ] | [ web-cp 0.5.7 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 web://cp DEVELOPPER 2 ============================================================================== 3 This document covers briefly the ineer workings of web://cp to help people 4 develop add-ons, modules or simply translate the interface and make skins 5 ============================================================================== 6 7 :: LANGUAGE FILES 8 web://cp supports several languages. You can view the current translations 9 in your /web/lang directory. The most up to date file is usually english.phps 10 11 You can create new language files as you see fit or update them. Keep in mind 12 that you need to update your config.php file for supported languages: 13 $cfg['lang'} = 'lang1,lang2,lang3'; 14 and keep all languages updated & aware of other languages: 15 $T['english'} = 'English'; 16 $T['french'} = 'French'; 17 $T['german'} = 'German'; 18 $T['spanish'} = 'Spanish'; 19 20 21 :: INTERFACE SKINS 22 You can add and remove web://cp skins by editing the file /web/skin/list 23 A few skins are provided with web://cp by default. You can create your own 24 or modify the ones provided. A simple system was developped to make skin 25 creation as fast as possible. You should take a look at a skin like 26 default/skin.phps to have some examples on how to create them. 27 28 Note: Related tags must be on the same line (for multiple tags like {LOG OUT}{/LOG OUT}) 29 30 The current tags are currently supported: 31 {WEBCP VERSION} web://cp version 32 {WEBCP NAME} web://cp name 33 {WEB HOSTING CP} 'Web Hosting Control Panel' 34 {LICENSE} License information 35 {NOW} Current time 36 {LANG} Language used 37 {WHERE AM I} Current page viewed 38 {IMG PATH} Path to this skin's base directory (usefull for images) 39 {SKIN ID} Skin ID name 40 {HEADER} Add necessary headers in your html file 41 {SYSNAME} System Name 42 {PORT} Port used (usually 81) 43 {BOOKMARK NAME} 'Bookmark' 44 {LOG OUT NAME} 'Log Out' 45 {EXTERNAL NAME} 'External Tools' 46 {MENU NAME} Current Panel menu name 47 {P0 NAME} 'Central CP' 48 {P1 NAME} 'Server CP' 49 {P2 NAME} 'Reseller CP' 50 {P3 NAME} 'Domain CP' 51 {P4 NAME} 'Personal CP' 52 {MENU ID} Current panel 53 {RESELLER NAME} Current Reseller name if panel < server 54 55 {BOOKMARK}{/BOOKMARK} Add link to set current page as default (bookmark) 56 {LOG OUT}{/LOG OUT} Add link to log out 57 {MENU ITEMS}*{/MENU ITEMS} Add menu items seperated by '*' (can be <br>, 58 dots, table rows, etc) 59 {EXTERNAL MENU}*{/EXTERNAL MENU} Add external menu items seperated by '*' 60 {P0}*{/P0/}**{/P0} Only show '*', seperated by '**' is user is level 0 61 (central admin), and so on till {P4} (normal user). 62 Example: {P0}{P0 NAME}{/P0/} .{/P0} 63 {ICON}*{IMAGE}**{TEXT}***{/ICON} Add icons (same as menu items but more 64 configurable. 65 {ALL MENU ITEMS}*{MENU ITEMS TITLE}**{MENU ITEMS CONTENTS}***{/MENU ITEMS CONTENTS}****{/ALL MENU ITEMS} 66 Adds all allowed menu items at the same time. 67 68 ** a few more tags are planned ** 69 70 71 72 DEVELOPPER INFORMATION 73 ============================================================================== 74 The information below is usefull only if you intend to add external scripts, 75 debug or develop web scripts or server add-ons for web://cp 76 ============================================================================== 77 78 :: EXTERNAL SCRIPTS 79 Simply edit each supported language files to add or remove external tools from 80 being linked directly by web://cp 81 Examples: 82 $T['external'][0]['name'] = 'PHPMyAdmin'; 83 $T['external'][0]['url'] = '/phpmyadmin/'; 84 $T['external'][1]['name'] = 'Postaci Webmail'; 85 $T['external'][1]['url'] = 'http://'.$cfg['sysname'].'/postaci/'; 86 ** a gateway between web://cp and external script is planned ** 87 88 89 :: WEB INTERFACE PHP SCRIPTS 90 web://cp is divided in 5 distinct panels, each with a different level of 91 privileges. From 0 to 4, central administration to user administration. 92 93 Scripts must be localized in the correct location: 94 /web/personal 95 /web/domain 96 /web/reseller 97 /web/server 98 /web/central 99 100 Files in /web handle the basic functions of web://cp 101 index.php Main script, includes everything and handles all web requests 102 init.inc.phps Authentication Script, verifies user validity 103 parser.inc.phps Parse the selected skin 104 login.inc.phps This page is displayed when a user must login, logout, etc. 105 functions.inc.phps Contains all functions used by web scripts. Handles 106 user, domain, reseller, database management, data 107 fetching, regular expressions, etc. 108 config.inc.phps Master config file, contains default configuration values 109 setup.php This script is run when 0 users exist instead of a login 110 111 Basically, each script dealing with the server that need root access must 112 deal with the database & commit() the changes so that the webcp.php backend 113 handle the work. Stuff that need access and interactivity should be done 114 via ftp access (file manager, save backups, etc). 115 116 117 :: SERVER MODULES 118 The webcp.php server will launch as a daemon, then look for changes to apply 119 to the server every seconds. It also launches cron.php every minute to 120 monitor the system, analyze stats, etc. 121 122 All server files are in /server and /server/lib contains the modules updating 123 the services configuration. lib/service.wcp.phps is used at each user & 124 domain updates (as needed) and lib/service.sys.phps is launched once all user 125 & domain updates are completed. An example use of this system is handling 126 each domain's seperated Apache configuration file in apache.wcp.phps and 127 updating the list of active domains & sorting them with apache.sys.phps 128 129 This seperation is there to avoid needless file creation as long as all 130 updates are not applied to the system. 131 ** cron files will soon be in the /server/cron directory ** 132
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |