Prev Previous Post   Next Post Next
  #1  
Old 28th December 2009, 20:21
oilyflutesalad oilyflutesalad is offline
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 2
Thanked 11 Times in 9 Posts
Send a message via MSN to oilyflutesalad
Default [DOMAINID] Prefix

I wanted to include the ID of the parent domain in FTP accounts, so after a bit of firebug magic and a quick look through relevant files, I've modified the source to add the keyword DOMAINID.

Example Usage:
Code:
c[CLIENTID]d[DOMAINID]_
Will result in something like "c3d12_default" if an FTP account with name "default" was added. Without the domain ID prefix, a client would get a duplicate error if they tried to create a "default" FTP account for each domain, even though it would make sense to be able to create them. Now they can have default accounts for every domain in their account.

Open tools.inc.php for editing. I'm using Ubuntu Server 9.10. The path to your ISPConfig directory may be different on your distro.
Code:
vi /var/www/ispconfig/sites/tools.inc.php
Go down to the replacePrefix function. Add ,'DOMAINID' to the $keywordlist array, then add a new case under the two existing ones:
Code:
[...]
        // Array containing keys to search
        $keywordlist=array('CLIENTNAME','CLIENTID','DOMAINID');
[...]
                                case 'CLIENTID':
                                        $name=str_replace('['.$keyword.']', getClientID($dataRecord),$name);
                                break;
                                case 'DOMAINID':
                                        $name=str_replace('['.$keyword.']', $dataRecord['parent_domain_id'],$name);
                                break;
[...]
And that's it! Save the file and you're done. To change your prefixes, go into ISPConfig then on the System tab, click "Interface Config" in the system menu.
Reply With Quote
The Following 3 Users Say Thank You to oilyflutesalad For This Useful Post:
BorderAmigos (17th February 2010), falko (29th December 2009), moglia (16th January 2010)
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to receve email aberrio Server Operation 16 8th July 2009 10:26
slow download through webserver problem snewp Technical 14 9th May 2008 05:25
Outlook does not Authenticates aberrio Server Operation 30 1st November 2007 19:21
No ftp login for ispconfig-webuser agri Installation/Configuration 12 19th March 2007 10:06
How to change Prefix for database name ??? IKShadow Installation/Configuration 2 1st December 2006 13:11


All times are GMT +2. The time now is 18:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.