hello to all
i have one question about VBulletin or any other forum script.
letme explain you by example
suppose i have two domains & i want to install the VBulletin on both the forums
does i need two licenced VBulletin?
2ndly is it can be possible that only after certain number of posts in one domain of forum then only that user can access the other domain of forum .
i know it seems to be funny that why do i wanna two forums on two domains
just because of any particular reason i wanna this lol
please if this function is available please do let me know.
Thanks
vBulletin is not permitted on Frihost due to it being a paid bulletin board. Although if you have paid for vBulletin and you have it allowed by an administrator then it should be fine. You should send a private message to Bondings requesting to be able to host them. Please refer to the TOS if you are unsure of something.
Hope this helps.
nope i don't wanna host it on frihost.
i just ask this general question
I think you'd need 2 licenses, and that modification should be possible (in the registration process add a check).
I don't know what you exactly want, but wouldn't it be easier to somehow add users to a usergroup when they have over a certain amount of posts, and give that usergroup permissions to some extra forums?
@Rvec you are right
but this function can be applied on one domain of forum
but i was mean to say that if this is also applicable that like we have two domain
1. www.ginny.com
2.www.rvec.com
& suppose when user have 100 posts on www.ginny.com forum then he can access the forum which are in www.rvec.com otherwise not.
Now i hope u got what i mean.
Maybe you can install one or more hidden forums for users with less then 100 posts on the same domain.
Sonam
| ginny2689 wrote: |
@Rvec you are right
but this function can be applied on one domain of forum
but i was mean to say that if this is also applicable that like we have two domain
1. www.ginny.com
2.www.rvec.com
& suppose when user have 100 posts on www.ginny.com forum then he can access the forum which are in www.rvec.com otherwise not.
Now i hope u got what i mean. |
@Sonam what about the above quoted query?
it can be done within one domain but what about other ? is it or not?
| Quote: |
| & suppose when user have 100 posts on www.ginny.com forum then he can access the forum which are in www.rvec.com otherwise not. |
Sorry, I didn't get your idea.
Sonam
yeah it's possible, but you'd need some scripting. I think 20 lines or something like that on the domain where you want to restrict access should do the job.
I'd say make a simple function to open a direct database connection to the database of the other forum, check if the username provided is registered and has ... or more points and return true or false. Then call that function in the registration process and throw an error if the function returns false (check how the captcha is handled and you can probably use some code from that).
k
so u mean it does need if else function
& on what's files?
I don't know on what files, I don't have vbulletin, but you'd need some extra code in the pages where the registration is done (probably register.php).
If you'd like to set up a forum in Chinese, Discuz! Board may be the best choice. Unfortunately, Discuz! Board has no English version since version 5.5.0. And now, two Discuz! Board 6.1.0 on different domains can be connected by a Ucenter. 
| rvec wrote: |
| I don't know on what files, I don't have vbulletin, but you'd need some extra code in the pages where the registration is done (probably register.php). |
k
thanks you
is there any default option in VB to connect two forum domains
you'd have to ask on the vbulletin forums for info like that, I only used it once and didn't try out all the functions.
I downloaded a nulled version and it wasn't too hard to add this option. It's not the nicest looking way, but it does work. I used vbulletin 3.7.1.
Open register.php
find | Code: |
| ($hook = vBulletinHook::fetch_hook('register_start')) ? eval($hook) : false; |
and after it add:
| Code: |
//################################ make custom function############################
function allowed_to_register($nick) {
$link = mysql_connect('localhost', 'root', 'pass');
if (!$link) {
die('Database of first forum is down, can\'t register users for now. Please try again later.');
}
$db_selected = mysql_select_db('database', $link);
if (!$db_selected) {
die ('Database of first forum couldn\'t be found. Please report this problem.');
}
$result = mysql_query("SELECT username, posts FROM user WHERE username='".mysql_real_escape_string($nick)."'");
$user = mysql_fetch_array($result, MYSQL_ASSOC);
mysql_close($link);
if ($user['posts'] > 5) {
return true;
}
return false;
} |
I think you know how to make that part work (change database connect info only).
find | Code: |
| $userdata->set('parentemail', $vbulletin->GPC['parentemail']); |
and after it add | Code: |
if(!allowed_to_register($vbulletin->GPC['username'])) {
$userdata->error('not_enough_posts');
} |
close register.php
login to your admin panel and find the phrase manager(lanugeages and phrases). There add a new phrase of the type "Error Messages" for the product "VBulletin".
Varname should be 'not_enough_posts' and the text and English Translation should be 'You do not have enough posts on the first forum to register here.' or something like that. Also translate that to any other languages you might have installed.
I hope that works, post here if you get any errors.
looks good
i will look on it & ask you for furthur help
thanks
appreciated work
you do upload to vbulletin. but different versions.. some host do allow to forums like that of vbulletin and phpbb..
enjoy!
| chonghua wrote: |
you do upload to vbulletin. but different versions.. some host do allow to forums like that of vbulletin and phpbb.. enjoy! |
hows?
procedure have any official addon? in VBulletin to connect VB from two sites?
I do need some help on this sorry
| Code: |
| I think you know how to make that part work (change database connect info only). |
| Code: |
$link = mysql_connect('localhost', 'root', 'pass');//replace localhost, root and pass here
if (!$link) {
die('Database of first forum is down, can\'t register users for now. Please try again later.');
}
$db_selected = mysql_select_db('database', $link); //replace database here |
in that part replace localhost with the host of the other vbulletin installation (localhost if on the same server, else an ip).
replace root with the username to login to the database and pass with the password
replace database with the name of the database (on frihost this starts with your username).
No need to say sorry, I'd rather have you working it then you not asking any questions.
| Quote: |
| Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]\register.php on line 93 |
Have a look at this @RVEC
i'm getting this warning at the top
& can you tell me how do i set the number of posts in first forum after that the user won't get this error.
Thanks
this code should do the same, but without the error and with 4 vars at the beginning to make configuration a bit easier. You can replace the big block of code in the post above by this block.
| Code: |
//################################ make custom function############################
function allowed_to_register($nick) {
$database = 'database';//database ip of the second forum
$db_user = 'root';//database user of the second forum
$db_pass = 'pass';//database password of the second forum
$min_posts = 5;//minimum number of posts
$link = mysql_connect($database, $db_user, $db_pass);
if (!$link) {
die('Database of first forum is down, can\'t register users for now. Please try again later.');
}
$db_selected = mysql_select_db('database', $link);
if (!$db_selected) {
die ('Database of first forum couldn\'t be found. Please report this problem.');
}
$result = mysql_query("SELECT username, posts FROM user WHERE username='".mysql_real_escape_string($nick)."' AND posts>$min_posts");
mysql_close($link);
if ($result===false)
return false;
else
return true;
} |
One problem
I don't want this function & can it be stopped?
user posts on first forum automatically posted on 2nd forum also
i want that user posts on 1st forum won't be on 2nd forum.
does this could be done?
to stop the function simply remove the code.
and userposts aren't posted on both forums, this just logs in to the database of the other forum and searches for the username. If the username is found and has enough posts the function will return true, else false (and give the error).