Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2005, 12:17 AM
suryoyena suryoyena is offline
 
Join Date: Dec 2004
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Creating a user subdomain with a wishname .. read more

Hey people

I've got an idea, but dont know how to built that.

At the moment in vB you have a standard profile page for each user and you can reach it about the URL 'http://www.domain.com/member.php?u=1'.

My idea is that the user have the option to choose after their registration in the usercp a name and send it. This name would be a subdomain or alternative (if that's impossible with the subdomain) a new folder with a link to their profile page.

Example:

-- Choose the word 'johny' (This user have e.g. the uid 73)
-- The script creats the subdomain 'http://johny.domain.com'
-- 'http://johny.domain.com' will redirect you to 'http://.../member.php?u=73'
-- By the way: The name for the subdomain can be a different as the original vB-Username*

*Many user have in their nicks special characters like ? or § etc.

How you design later the profil page is your option. It's not important for this hack.

What do you mean to this request? Sounds it possible to do something like that?

I really don't know how it work with 'creating a subdomain' with a script.
The other option sounds more realisable: While choosing a name (johny), the script creates a folder named 'johny' with a htaccess-file, which redirects to the root-profile-page (member.php?u=73).

It would be very nice if it's possible too to see only the new url in the browser (and don't switch to 'http://.../member.php?u=73').

I hope my english is clear enough. If not, ask me please the unknowable parts.

Greets,

Chris :squareeyed:
Reply With Quote
  #2  
Old 06-01-2005, 12:37 AM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea, I'd love the see this also
Reply With Quote
  #3  
Old 06-01-2005, 07:02 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think there is already a discussion about using mod_rewrite rules to achieve something like this.
Reply With Quote
  #4  
Old 06-01-2005, 01:18 PM
suryoyena suryoyena is offline
 
Join Date: Dec 2004
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
I think there is already a discussion about using mod_rewrite rules to achieve something like this.

Could you please tell us where we can find it?

A general question:

Is it even possible to write a script that creats a subdomain?
I searched for it but found nothing.

Chris
Reply With Quote
  #5  
Old 06-01-2005, 01:41 PM
Greebo Greebo is offline
 
Join Date: Dec 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't this have to be handled at the Apache level or even possibly higher up?

You're trying to mess with domain addresses - and the domain address tells one computer how to get to another computer. I'm no networking expert but I think what you're trying to do falls outside the boundaries of php on a webserver, because you generally can't just go to (whatever).address.com.

A URL is an address to a server. Typically if you change the prefix of an address, one of two things happens. Take "custom.vbulletin.com/org".
If you go to custom.vbulletin.com - you get redirected to www.vbulletin.com - not by php, but either by the dns on vbulletin's server, or by apache on vbulletin's server. One or the other has been set up to handle incoming requests to (unknown).vbulletin.com and redirect them to www. This isn't a php function - this happens before the browser ever gets to the pages.

If you try to go to custom.vbulletin.org on the other hand, you get a page cannot be found. Why? Because no redirect has been set up at a higher level to send ????.vbulletin.org to www. That redirect missing means the browser can't find the server or - if you found the server, the server didn't know what to do with you.

So I don't think what you can do is within the bounds of php *inside* the forums because the browser has to find the forum first. At a minimum dns and/or apache would have to know to pass (unknown).yourdomain.com to www and THEN you'ld have to examine the referrer url inside php and look up the right user.
Reply With Quote
  #6  
Old 06-01-2005, 01:53 PM
suryoyena suryoyena is offline
 
Join Date: Dec 2004
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Greebo: I know what you mean, but I saw a website from Germany (uboot.com) and every user have a own 'webpage'. With his registration he gets automaticly a own subdomain. That's why I ask. I haven't found anything abouth somethink like this. I dont think that the admins creats for each user by himself a new subdomain, becaus it would be a fulltimejob.

Who knows sth.?
Reply With Quote
  #7  
Old 06-01-2005, 02:00 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't have to "create" subdomains.
It's pretty easy to set up if you have access to the Apache and BIND Configuration.
Took me 4 minutes to get this working
  • Setup a "wildcard domain" in BIND
    *.yoursite.com IN A 123.123.123.123
  • Setup a vHost for *.yourdomain.com
  • Place a mod_rewrite or PHP (or Perl, Python, ...) script there to transform the hostname into smth. like http://www.yoursite.com/forum/member.php?username=...

And you're done.
Reply With Quote
  #8  
Old 06-01-2005, 02:06 PM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by suryoyena
@ Greebo: I know what you mean, but I saw a website from Germany (uboot.com) and every user have a own 'webpage'. With his registration he gets automaticly a own subdomain. That's why I ask. I haven't found anything abouth somethink like this. I dont think that the admins creats for each user by himself a new subdomain, becaus it would be a fulltimejob.

Who knows sth.?
you're right, every user is user.domain.com <== this is not a real sub domain, it's just virtual and you can use mod_rewrite to achive it, don't ask me why I only know that but I don't really know how cuz my knowledge in .htaccess is limited. I really want something like this tho.

and, if you want to show the profile of a user with the name john with userid = 100, you can just use 'john' since vb3 allows you to access john profile through http://domain.com/member.php?usernam=john

If you need an example site for something like this: the best should be http://www.deviantart.com , myspace.com offers myspace.com/username which is also good.

If someone can do this, please make your actions.
Reply With Quote
  #9  
Old 06-01-2005, 02:20 PM
suryoyena suryoyena is offline
 
Join Date: Dec 2004
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey Guys!

Thanks for the answers. I didn't know that. Okay:

-- deathemperor, thanks for this tip, but it's a community with many young people and I think it's only cool for them when they can say: "Hey visit my profile at chris.community.com" or else

-- KirbyDE, thanks, but it's still to abstract for me, because I didn't worked yet in this field. You would help me much if you describe this a bit better.

Nice
Reply With Quote
  #10  
Old 06-01-2005, 03:11 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I don't know how I can describe this better

Do you have access to your DNS Configuration, either be directly editing BIND configuration or through a web frontend?
If you can't edit your DNS records in any way you're out of look, as this is absolutely necessary because otherwise nick.yourcommunity.com won't resolve to an IP address.

Furthermore you must be able to create a vHost for *.yourcommunity.com, again either by editing httpd.conf or through a web frontend.

When this is done, you can use smth. like
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.yourcommunity\.com$ [NC]
RewriteCond %1 !^www$ [NC]
RewriteRule (.*) http://www.yourcommunity.com/member.php?username=%1 [R,L]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04071 seconds
  • Memory Usage 2,254KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete