Zubrag.com :: Forum

zubrag.com => cPanel Scripts => Topic started by: sherry on November 21, 2007, 08:13:32 AM



Title: subdomain creator - automatic created folder
Post by: sherry on November 21, 2007, 08:13:32 AM
i do love the script....
but anytime i create a subdomain, it's automatically create a new folder with the same name with the subdomain....
can i change the location of that folder?

actually, i create a folder first and then create the subdomain....
i can redirect it, but there always be a folder in public_html....

it can be huge and i hope there will be something i can do about it.....
thanks before.....
many thanks... :)


Title: Re: subdomain creator - automatic created folder
Post by: zubrag on November 21, 2007, 09:20:40 AM
Hi. I believe it is possible, just need to pass dir parameter to the script.

Currently script has following code:
$request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd";

change it to
$request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd&dir=SUBDOMAIN_FOLDER_HERE";


Title: Re: subdomain creator - automatic created folder
Post by: sherry on November 21, 2007, 10:22:08 AM
Currently script has following code:
$request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd";

change it to
$request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd&dir=SUBDOMAIN_FOLDER_HERE";

in dir parameter...
what should i write?
dir=public_html/folder1/subfolder1/
or
dir=www.domain.com/folder1/subfolder1/

i'm confused
i've been trying this....
but still not work....

thanks a whole bunch....  :)


Title: Re: subdomain creator - automatic created folder
Post by: zubrag on November 22, 2007, 03:33:09 AM
try adding full path, starting from the root.


Title: Re: subdomain creator - automatic created folder
Post by: sherry on November 22, 2007, 08:13:43 AM
it doesn't work at all.....

i've been added the dir parameter like this:
dir=public_html/folder1/subfolder1
and
dir=ftp.mangosteenchristiannetwork.com/public_html/folder1/subfolder1
and
dir=www.mangosteenchristiannetwork.com/folder1/subfolder1

is there anything else?

thanks a lot....  :)


Title: Re: subdomain creator - automatic created folder
Post by: zubrag on November 22, 2007, 10:20:25 AM
public_html is not the root folder.
save following as php file in public_html folder and open it in browser. It will show path to the file from the root (it starts from slash /).

<?php echo __FILE__; ?>


Title: Re: subdomain creator - automatic created folder
Post by: sherry on November 25, 2007, 01:19:14 PM
i've been trying this:
https://www.domain.com:2083/frontend/x/subdomain/doadddomain.html?
domain=user8&rootdomain=domain.com&dir=home/domain/public_html/folder1/subfolder1/

and it doesn't work....
so...
is the script possible to not created folder automatically?
for me, that's not necessary...
so...
i create the folder by myself and i create the subdomain, and just redirect it to the folder i've been created.....
is it possible?????

many thanks....  :)


Title: Re: subdomain creator - automatic created folder
Post by: zubrag on November 26, 2007, 05:57:13 AM
Hi. What was the output of the <?php echo __FILE__; ?>

In your example above (&dir=home/domain/public_html/folder1/subfolder1/), that is not path from the root. Path should start form /
For example, if <?php echo __FILE__; ?> outputs /home/domain/public_html/folder1/subfolder1/ then "from the root" would be /home/domain/public_html/   (note slash at the beginning)


Title: Re: subdomain creator - automatic created folder
Post by: sherry on November 26, 2007, 11:21:07 AM
it doesn't work...

feel desperate already....

can the script not created the folder automatically???


Title: Re: subdomain creator - automatic created folder
Post by: zubrag on November 26, 2007, 12:55:11 PM
Unfortunately I do not know if it can skip creating a folder (as i said before, i have no access to cPanel anymore and cannot create/test cpanel scripts)


Title: Re: subdomain creator - automatic created folder
Post by: sherry on December 02, 2007, 12:58:53 AM
anyway, thanks....

many thanks.... :)