TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 307
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 251
  • Total: 251

Is this Possible

Started by gfxindia, September 18, 2006, 01:38:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xarcell

Now that I think about it, it would be nice to have. A subdomain and root directory with the domain work properly?

IchBin

Each subdomain can have its own directory. I'm not sure that I would call it root though.

whoesa

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!

akulion

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

gfxindia

I think mkdir() seems a cool function.
I'l try that.

Thurnok

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 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.
Thurnok
The one, the only!

gfxindia

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

Thurnok

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).
Thurnok
The one, the only!

gfxindia

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 ?

Thurnok

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.
Thurnok
The one, the only!

This website is proudly hosted on Crocweb Cloud Website Hosting.