A lot of subscription based web sites give the user there own personal directories. Such as Photo exchange sites, Auction sites, classified sites, hosting sites etc…
Using your software How do I set up each user with their own personal directory?
When a user joins I want to be able to dynamically assign a unique folder to that client so they can upload images files etc… using a file manager that I have created.
Is this possible?
Have I purchased the wrong management tool?
Not exactly, All of my clients use the same software in the level that they have paid for. So they have access to the same secure page, however one of the features of the software is a wysiwyg type photo manager, so when my clients join up I need to be able to create a directory that they can upload there images to. I want it to be dynamically created when they join and unique to that client.
I was going to use php function mkdir("test/clientfolder") and use there name or a striped down version of there email for the directory name, however because this software uses Smarty templates and ionCube encoding I can not get it to work.
Any sugestions?
Not exactly, All of my clients use the same software in the level that they have paid for. So they have access to the same secure page, however one of the features of the software is a wysiwyg type photo manager, so when my clients join up I need to be able to create a directory that they can upload there images to. I want it to be dynamically created when they join and unique to that client.
I was going to use php function mkdir("test/clientfolder") and use there name or a striped down version of there email for the directory name, however because this software uses Smarty templates and ionCube encoding I can not get it to work.
Any sugestions?
You should be able to add PHP code into the /interface/subscribed.php template.
You'll need to wrap your PHP code around these tags:
{php} {/php}
and the PHP code will work just fine. You should be able to grab
their email address via the email variable.
Let me know if you try this and have any questions or how well it worked.
I am still having a little trouble
I did what you said and it works fine as long as I use this
{php}
mkdir("test/anyfolder");
{/php}
It will create a folder named anyfolder in the test parent directory
but as soon as i try this
{php}
mkdir("test/{$name}");
{/php}
I get an error the name variable is not passing to the script so it is trying to create a directory test/ and the parent directory already exists.
any sugestions?
Try the following steps:
Create a file in the installation folder, named for example:
mkdir.php
Contents:
---------------------
<?php
echo " ---> $_POST[email]";
?>
---------------------
Then in the subscribed.php template, add this:
{php}
include("mkdir.php");
{/php}
You'll see when you get to the subscribed.php template, after
registering you should see:
--> email@address.com
You can take it from there. "mkdir.php" being the include file and can have any PHP code you wish in it. You can use the $_POST vars and do what you wish with them.
What do you think?
Thanks
That did it
actually used
{php}
mkdir("test/$_POST[email]");
{/php}
in the subscribed.php file
and it works perfect
You Rock
Thanks
That did it
actually used
{php}
mkdir("test/$_POST[email]");
{/php}
in the subscribed.php file
and it works perfect
You Rock
Good call, good stuff! Glad to help.
i2
I like this idea

are these folders set to 777 or another chmod by the script?
yes you can set the chmod any way you like if you use this
<?php
mkdir("/path_to_my/dir", 0777);
?>
the only thing to remember is that in any case (with or without setting the chmod)the parent directory has to already be created
so in this example the directory
"path_to_my" has to already exsist on your server
so that the script can create the "dir" directory inside it with the chmod of 0777