vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbSubdomains v1.0 (german/english) (https://vborg.vbsupport.ru/showthread.php?t=39332)

Minots 06-01-2002 10:00 PM

vbSubdomains v1.0 (german/english)
 
Hi everybody.

First of all I hope that my english is not to bad to
understand because my favorite language is german.

I have done my first hack and here it is.
This hack will make it possible to give all registered members
a free subdomain.
It looks like http://username.yourdomain.com and using "frame-redirection".

This hack will only work if you have a real toplevel-domain with 'wildcards' enabled. Somebody know it as 'catchAll-subdomain' (*.yourdomain.com automatic redirect to your homepage).

Some hack details:
* member can edit the subdomain options at the userCP -> edit options
* member can change hompage title
* member can change homepage url
* member are able to set metatag 'author'
* member are able to set metatag 'keywords'
* member are able to set metatag 'description'
* member are able to set metatag 'revisit'
* member are able to set metatag 'robots'
* special-chars in username are allowed
* all subdomain-hits are counted. cause this it?s possible to create a "subdomain top 10" or anything else in future versions
* subdomains are avaible for all registered and all new members
* admin can set the amount of posts a member need before he can use the subdomain (requsted by hagi)
* works with vBullentin v2.2.4 (Step 7.1) & v2.2.6 (Step 7.2)

I wish that there will be no problems by installing this hack
because I?m not often online for the next 1 - 2 weeks.
Nevertheless I will come as often I can to help and to answer at your questions.

The one and only thing I ask for is:
Please rate this hack and click the 'install-button' if you use it.
So i can see your opinion about it and know whether future versions are meaningfull.

Neo 06-02-2002 05:14 AM

care to give a example?

Minots 06-02-2002 05:16 AM

Hi again.
Here is a snapshot of userCP -> edit subdomain options
for a better illustrate. ;)
(with german templates)
The attachment contains a snapshot from adminCP where you
set the amount of needed posts.

http://www.minots.de/images/minots/suboptions.jpg

hagi 06-02-2002 05:23 AM

is their a way to make it so that certain usergroups or if they have been here for xx days and have xx amount of posts because i wouldnt really want people to just join the board so they can have a subdomain.

Minots 06-02-2002 05:27 AM

@ neo
Sorry, at this time i canĀ“t give a sample(-account) cause I am
using my domain (minots.de) for another free subdomain service.
If my hoster enabled wildcards to my second domain (d0x.de)
I will make a "demonstration board-account", so you will be
able to see and test this hack live.

@hagi
This is a great idea and I will try to include it in the next version.

Dean C 06-02-2002 07:20 AM

ill try this 2nite... it looks AMAZING.... ive been trying to get a hack like this for months...

but i can't quite understand how this works... does it jus give a redirect???

Minots 06-02-2002 08:13 AM

@ Mist

I will try to give you a short description how it works.
Lets see it with an example url like http://membername.boardname.com ;)

Because you have set a catchAll-Subdomain for your topLevel-domain (*.boardname.com) all requests are going to your main html-directory.

The result of the .htaccess entry "DirectoryIndex vbsubdomain.php index.php index.html" is that the server
was first processing the file vbsubdomain.php.

In vbsubdomain.php the there are routines who
1.) get the host name (http://membername.boardname.com)
2.) get the "www." away if present
3.) delete everthing after the first slash "/" if present
4.) delete the ".boardname.com"
result of this is that we now have the pur "membername"

5.) after that it checks if "membername" is in the usersubdomain-table
if it isn?t --> auto proceed to your main hp-file like "index.php, index.htm, ..."
6.) if in table get subdomain variables(options) and do a framed html-output with all collected subdomain-options
PHP Code:

<html>
<head>
<title><?php echo $row[title?></title>
<meta name="keywords" content="<?php echo $row[metaauthor?>">
<meta name="keywords" content="<?php echo $row[metakeywords?>">
<meta name="description" content="<?php echo $row[metadescription?>">
<meta name="revisit-after" content="<?php echo $row[metarevisit?>">
<meta name="robots" content="<?php echo $row[metarobots?>">
</head>
<frameset rows="100%,*" frameborder="NO" border="0" framespacing="0">
<frame name="main" src="<?php echo $target_url ?>">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
<a href="<?php echo $target_url ?>">Hier klicken um <?php echo $row[title?> zu besuchen.</a>
</body>
</noframes>
</html>

7.) it counts how often a subdomain was used
PHP Code:

mysql_query("UPDATE usersubdomain SET hits=hits+1 WHERE username='$subhost'") or die (mysql_error()); 

The file vbsubdomain.php contains a few lines of code
for error-handling.

I hope that my description isn?t to hard to understand and you
will now have a good overview how and why this hack works.

With friendly greetings,

Neo 06-02-2002 04:06 PM

This is a really nice hack. Good job :)

Velocd 06-02-2002 04:08 PM

Wow, this looks great but still kinda cloudy on how it works. It looks as if members are allowed to add their own sub-domains, whatever that would mean ;)

bluecat 06-02-2002 07:44 PM

Does anyone have this on their board so we can see how it works?


All times are GMT. The time now is 02:06 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.01282 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete