I wanted to add a new functionality to my SMF board.
I'm starting a new site which uses SMF user system through SSI.php
I want a new feature.
When users sign up, i want http://username.mysite.com to be created. and the users should be able to add content to it using simple HTML.
That is, it will use my theme's index.template.php and all their content go with the theme.
Not necessarily a subdomain.
It can be http://mysite.com/username too.
People please tell me if this is possible and how.
Thank You
It's not possiabel through SMF alone. Your asking for is a "sub domain" for each user. Sub domains cost $$$, usually teh same as a normal domain. That also tend to be limited by host...
It would be possiable to make a subfolder, but would require so much coding it wouldn't be worth it. Even with mod-rewrite.
I think the easiest way would be something like http://mysite.com/index.php?action=username. I dunno if that will give you what you want though.
Quote from: Xarcell on September 18, 2006, 01:46:05 PM
I think the easiest way would be something like http://mysite.com/index.php?action=username. I dunno if that will give you what you want though.
This will not be what i'll be wanting.
subdomains cost ? weird. my host gives unlimited subdomains. it comes with the CPanel.
The sites kinda similar to deviantart
so mysite.com/username or username.mysite.com will be better.
any can you give me starting tips on how to get the subfolder thing working.
you know the MultiSMF mod by vbgamer and gamesmad
they create subfolders/subdomains once the user get signed up.
Thats the kind of thing i am looking for.
Xarcell, Sub-domains don't cost money. The only place it may cost you money is if your host wants to charge you for them. If you own the domain you have the ability to have your own Sub-domains. Otherwise, someone could just purchase name.yourdomain.com and steel part of your domain name.
Darkman, what your asking is beyond 99% of the knowledge of this community. I think you'll get suggestions on how to do this, but I wouldn't expect anyone to give you a how-to.
I dont need how-to's
I just need a start as to which file i should look and something like that.
You would probably want to look at Register.php, function Activate(), because you wouldn't want to create a directory for them until they had activated their account.
You could use the php mkdir (http://us3.php.net/function.mkdir) function to create a directory and then copy whatever files you wanted into it. Not sure how you could create a subdomain, though.
This really is more of an SMF issue than a TP issue, though, I would think.
That sounds more like you would have to make a subdomain for each member in your cpanal and then grant them access to the subdomain in order to add content to the pages.
You'll be better off going to a yourdomain.com/username like Myspace.com does because creating a sub domain does require an entry into the DNS server.
In my case then I can say that my host charges me $10 USD for a subdomain. Unless I'm mistaken...
Now that I think about it, it would be nice to have. A subdomain and root directory with the domain work properly?
Each subdomain can have its own directory. I'm not sure that I would call it root though.
A few months ago i used a subdomain as testsite.
My site was www.mydomain.net and my testsite was like test.mydomain.net. It worked great!
why dont u just assign everyone a small url from http://iscool.net
lol it gives out small urls like:
http://akulion.iscool.net
that addy points to my page
I think mkdir() seems a cool function.
I'l try that.
Quote from: Darkman on September 20, 2006, 01:31:03 PM
Hello,
Can you help me with this http://www.tinyportal.net/smf/index.php?topic=8694.0
I a noob at PHP and dont know how to make use of mkdir() in activate() function.
Can you help me do it ?
Perhaps if it just adding few lines into register.php , then can you do it for me ? Please
I would like to have on index.php file to be copied in to each members' folder
it will be http://mysite.com/USERNAME/
Thank You
I don't recommend making this into a modification to register.php or other SMF/TP files. The problem with doing so means possible issues during upgrades to SMF/TP. Also, by copying index.php to a user directory, I assume you mean an index.php that you create and not the original SMF index.php file. I would recommend a blank index.html file instead to prevent directory listings when going straight to the URL Path (http://mysite.com/auser/) and then have the code generate a index.php file with what the user wants in their page, or simply to edit the blank index.html file. Either way, creating a directory with mkdir() is easily done within a block code snippet along with other things you want them to be able to accomplish and allows you to only let Activated (registered) users to do so by the simple permissions system in TP's block permissions.
As far as the block code for them to edit their own page and such, you'll have to add that too or put in a php file that you can include() in the block. All of this of course going into a phpblock of some sort. You can even limit the code to just accepting some plain HTML that you write to the index.html file in their directory, and then use something like my Custom Page block (http://www.tinyportal.net/smf/index.php?topic=7159.0) for displaying it either in an Article that they can click a link in your menu to get at, or in a center block so its displayed as part of your site for them everytime the come to the home page.
As far as having me do this, you'll have to get on the waiting list. I've already got a number of project requests in front of you. But it is certainly something I can do.
Thank You Thurnok.
I dont want an HTML coz, mysite.com/user/ leads to mysite.com/user/index.php if index.html is not avaialable.
it doesn't give dir listing.
What i want is for every member http://mysite.com/user/index.php will be created.
in the index.php , i will code so the the top row will be displaying user avatra, username, posts, and other postbit info and alsi about arcade shop etc..
the rest of the page will be blank and there will be an "EDIT" link shown only to the owner of that page and the admin.
the owner of that page can click on that link and add content using simple HTML and it will be displayed.
If possible, i'd like to have two blocks on the left in each member page where the member can add their links etc...
firstly i want the code to be created so that DIR/index.php will be created for every user.
I'll later bother about the coding of that file.
By the way, how can i achive this without editing Register.php
I'm trying to edit register.template.php
Any phpblock can be made to make the directory.
If you are going to make an index.php file, you are in for some work. You will have to modify the index.php file using safe logic to insert your user's custom HTML that they create everytime they edit it.
For ease of use, you are better off making it an index.html file, and then you can simply give them a text edit area in your phpblock to copy/paste or manually type in their HTML that can then simply overwrite the index.html each time.
In your phpblock that displays their HTML page (via an include() function) you can simply put the other items you mention (avatar, etc.) anywhere you want in the block and it will be seperate from their saved HTML file (index.html).
QuoteAny phpblock can be made to make the directory.
??? I didn't know that.
But how to make that when a user registers , the page for theme is created ?
Do you not have any blocks that are not displayed for Guests? Any of these can create a user directory (ensuring it doesn't already exist first) and in that sense you will only create one for a registered user.
My suggestion is to put it into the block you actually create that allows the user to make/edit their custom HTML page on your site, since you will obviously only allow registered users to see that block to begin with.
Oh !
You are talk about the Custoim Page Block that you linked to.
But what i want is the page should be visible to all.
It is like profile but lets the user have their own content and viewable by all including guets.
Its not in the front page. it will be a separate page.
No, I'm not talking about my Custom Page block. My reference to that many posts above was that you could (as an option) use that for displaying users' pages. The Custom Page block I wrote allows a user to elect whether to have their page public or not. If the page is public, other users can simply select that member from the pull down and POOF - it displays that user's custom page.
What I was talking about was that you will need a mechanism for getting the user's custom HTML code "into" your site. A block that allows them to put it in can also ensure they have a user directory with (if you wished) a default HTML file there already.
No mechanism needed for getting user's HTML code into mine.
Coz users will directly input their HTML at my site.
Similar to MYSPACE but only one page with their own HTML
LOL Really? So you are giving them FTP access to your server? Because if you aren't, they have to enter their HTML into some
mechanism you provide them. :2funny:
Webster's Dictionary:mechÂÃ,·aÂÃ,·nism
Pronunciation: 'me-k&-"ni-z&m
Function: noun
1 a : a piece of machinery b :
a process, technique, or system for achieving a resultIn other words, you have to have a
page (mechanism) that contains some
controls (textarea, editbox, etc.) that allows them to put in the HTML they wish for their page. From the 2nd paragraph of my previous post:
Quote from: Thurnok on September 21, 2006, 03:39:19 AM
A block that allows them to put it in can also ensure they have a user directory with (if you wished) a default HTML file there already.
The block would contain a page with the necessary controls (textarea, editbox, etc.) for someone to enter in HTML code that can be written to a file (in their directory presumably) for later display. I only mention the file because you have been talking about a user directory. You could just as easily (well, actually its a bit more difficult coding-wise) put their entered HTML into a database, which negates the need for a user directory.
QuoteIn other words, you have to have a page (mechanism) that contains some controls (textarea, editbox, etc.) that allows them to put in the HTML they wish for their page. From the 2nd paragraph of my previous post:
Quote from: Thurnok on September 20, 2006, 21:39
A block that allows them to put it in can also ensure they have a user directory with (if you wished) a default HTML file there already.
The block would contain a page with the necessary controls (textarea, editbox, etc.) for someone to enter in HTML code that can be written to a file (in their directory presumably) for later display. I only mention the file because you have been talking about a user directory. You could just as easily (well, actually its a bit more difficult coding-wise) put their entered HTML into a database, which negates the need for a user directory.
EXACTLY RIGHT THURNOK.
This is what i want.
But, will the user pages be visible to all members ?
If the answer is yes.
OK GREAT.
When can you help me do this ?
I am launching the site this week. So ...
QuoteOK GREAT.
When can you help me do this ?
I am launching the site this week. So ...
??? How can you set an ETA for a release or opening day, when you have no clue on how to make things work for the site.
Its simple.
I might lauch the site without this thing and add it once finished
LOL