Skip to main content
deleted 30 characters in body
Source Link
Dave_O
  • 55
  • 1
  • 2
  • 9

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created. How do I place my current theme's header/footer within this code: function arfGenURL($orgName) { date_default_timezone_set('America/New_York'); $dir = "organizations/" . $orgName . "/dashboard/"; echo var_dump(mkdir($dir,0777,TRUE)); $content = "Organization Dashboard | "; $fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb"); fwrite($fp,$content); fclose($fp); print_r(error_get_last()); }

function arfGenURL($orgName)
{
date_default_timezone_set('America/New_York');
$dir = "organizations/" . $orgName . "/dashboard/";
echo var_dump(mkdir($dir,0777,TRUE));
$content = "<html><head><title>Organization Dashboard |</title></head><body></body></html>";
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb");
fwrite($fp,$content);
fclose($fp);
print_r(error_get_last());
}

Thank you!

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created. How do I place my current theme's header/footer within this code: function arfGenURL($orgName) { date_default_timezone_set('America/New_York'); $dir = "organizations/" . $orgName . "/dashboard/"; echo var_dump(mkdir($dir,0777,TRUE)); $content = "Organization Dashboard | "; $fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb"); fwrite($fp,$content); fclose($fp); print_r(error_get_last()); }

Thank you!

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created. How do I place my current theme's header/footer within this code:

function arfGenURL($orgName)
{
date_default_timezone_set('America/New_York');
$dir = "organizations/" . $orgName . "/dashboard/";
echo var_dump(mkdir($dir,0777,TRUE));
$content = "<html><head><title>Organization Dashboard |</title></head><body></body></html>";
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb");
fwrite($fp,$content);
fclose($fp);
print_r(error_get_last());
}

Thank you!

added 514 characters in body
Source Link
Dave_O
  • 55
  • 1
  • 2
  • 9

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created. How do I place my current theme's header/footer within this code: function arfGenURL($orgName) { date_default_timezone_set('America/New_York'); $dir = "organizations/" . $orgName . "/dashboard/"; echo var_dump(mkdir($dir,0777,TRUE)); $content = "Organization Dashboard | "; $fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb"); fwrite($fp,$content); fclose($fp); print_r(error_get_last()); }

Thank you!

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created.

Thank you!

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created. How do I place my current theme's header/footer within this code: function arfGenURL($orgName) { date_default_timezone_set('America/New_York'); $dir = "organizations/" . $orgName . "/dashboard/"; echo var_dump(mkdir($dir,0777,TRUE)); $content = "Organization Dashboard | "; $fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb"); fwrite($fp,$content); fclose($fp); print_r(error_get_last()); }

Thank you!

Source Link
Dave_O
  • 55
  • 1
  • 2
  • 9

Direct Dynamic URL in root to a location within template

I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

The "organization-name" is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

The problem I have is that the URL is getting created in root not within the theme. So I'm getting a blank screen.

My question is, how can I extend my current theme to these dynamic URLs that get created.

Thank you!