Current time: 05-18-2024, 01:52 AM Hello There, Guest! (LoginRegister)


Post Reply 
Subdomains for domain-aliases
Author Message
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #1
Subdomains for domain-aliases
I've read somewhere that this feature is already on the roadmap, but I was unable to find it.
I have done a quick implementation of it on my ispcp installation. It consists mostly of code duplicated from the subdomain source, but it works pretty well on my machine.
I have attached the needed files to this post. Just apply the patch and copy the "ispcp-alssub-mngr" into the engine directory and "delete_alssub.php" in gui/client.

I think for a final implementation of this we should consider redesigning the manager code of all the managers a bit. There is lots of duplicated code that could be put in another common file.


.zip  alssub.zip (Size: 11.05 KB / Downloads: 51)
(This post was last modified: 10-08-2007 05:53 PM by zpin.)
10-08-2007 05:51 PM
Find all posts by this user Quote this message in a reply
push Offline


Posts: 3
Joined: Jan 2008
Reputation: 0
Post: #2
RE: Subdomains for domain-aliases
Thank you very much for this patch zpin!

I made some modifications to the patch and alssub-mngr, so it works with RC3.
Also the sql for the extra table (subdomain_alias) was missing in your .zip.
By 'reverse engineering' Wink, i found out the structure, it's included as well.

Cheers


Attached File(s)
.gz  alssub_rc3.tar.gz (Size: 10.8 KB / Downloads: 21)
01-19-2008 09:34 PM
Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #3
RE: Subdomains for domain-aliases
Ah, right... I forgot that Smile
I'll be updating the patch for RC3 once it's released.
01-20-2008 10:26 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: Subdomains for domain-aliases
Quote:I'll be updating the patch for RC3 once it's released.
RC3 is released Wink
Any news about it ?

Greez BeNe
02-16-2008 10:24 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Subdomains for domain-aliases
@zpin
please take care - I upload a corrected version of ispcp-als-mngr last night.
02-16-2008 10:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #6
RE: Subdomains for domain-aliases
right, I didn't update to RC3 yet Smile

I'll upload the patches as soon as I've done the update. Could take another week or so...
02-16-2008 11:15 PM
Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #7
RE: Subdomains for domain-aliases
Ok, here's the new package... Same instructions as in the first post:

- apply the patch
- copy "ispcp-alssub-mngr" into the engine directory (default: /var/www/ispcp/engine)
- copy "delete_alssub.php" to gui/client (default /var/www/ispcp/gui/client)
- import subdomain_alias.sql into the ispcp database

"worksforme", no warranties whatsoever Wink


Attached File(s)
.zip  alssub.zip (Size: 11.66 KB / Downloads: 38)
02-19-2008 01:07 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #8
RE: Subdomains for domain-aliases
Perfect!
If it works - can we build it in the current trunk ?
Because of the Feature Freeze...

I will try it.

Greez BeNe
02-19-2008 04:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #9
RE: Subdomains for domain-aliases
Sure, do whatever you want with it Smile

It's far from perfect, though. Imho all the "mgr" code (not only my "alssub" addition) should be rewritten to use a central library. Right now the code duplication is crazy Smile If I should ever find the time I'll try to do this, but it doesn't look good at the moment.
02-19-2008 05:04 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #10
RE: Subdomains for domain-aliases
zpin Wrote:Sure, do whatever you want with it Smile

It's far from perfect, though. Imho all the "mgr" code (not only my "alssub" addition) should be rewritten to use a central library. Right now the code duplication is crazy Smile If I should ever find the time I'll try to do this, but it doesn't look good at the moment.

At least it has an advantage: Since the documentation of the code is worse than the code itself (there is no docu) it's easier to read all the duplications than to jump from function to function in all files... :-)

But of course - good code is looks different... but also has another history Smile
02-19-2008 06:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)