Log in

View Full Version : Newbie Lock mod


Revan
07-30-2004, 10:00 PM
As requested by The Realist here (https://vborg.vbsupport.ru/showthread.php?t=67833).

This mod basically locks a newbie with 0 in post count from opening any other forums than your "newbie forum", or introductions forum.


Ive tested it in any way I can think of on both 3.0.0 and 3.0.3, so it should be fool proof.
Its also my first released vB mod, and it took me 20 secs to write and 30 to test.
Go easy on meh :nervous:

Yes I know theres usergroups for this, but it was a request, not my idea.
Sue me :ermm:

Silverdawn222
07-31-2004, 05:38 PM
I think it's a great mod! Usergroup Permissions can be very complex in Vbulletin. Love it, thanks!

AN-net
07-31-2004, 06:33 PM
interesting ill look into it;)

Floris
07-31-2004, 07:20 PM
As requested by The Realist here (https://vborg.vbsupport.ru/showthread.php?t=67833).

This mod basically locks a newbie with 0 in post count from opening any other forums than your "newbie forum", or introductions forum.


Ive tested it in any way I can think of on both 3.0.0 and 3.0.3, so it should be fool proof.
Its also my first released vB mod, and it took me 20 secs to write and 30 to test.
Go easy on meh :nervous:

Yes I know theres usergroups for this, but it was a request, not my idea.
Sue me :ermm:
You can do this with usergroups indeed, I see no reason why one would also request this besides being unwilling to learn the permissions.
Thank you for sharing the resource though.

Silverdawn222
07-31-2004, 08:16 PM
You can do this with usergroups indeed, I see no reason why one would also request this besides being unwilling to learn the permissions.
Thank you for sharing the resource though.

The permission system, especially on larger boards, can create complex situation. If you need a simple solution than this piece of code is perfect, I think.

The Realist
07-31-2004, 11:11 PM
Yes indeed it is simple and like me Im all for simple things in life.

Well done M8 I will have a look at it and get back to you asap, Im a we bit pi$$ed now :)

Its 1:10am and just crawled through the door :)

Laters

The Realist
08-01-2004, 09:34 AM
Just tried it M8 and it dont work. I logged in as a new user and yes it lockes down all the sections and stops the new member from viewing all the sections apart from the choosen one.

I made a post in the choosed section and it would not give me permission to access the other sections.

Laters

Revan
08-01-2004, 12:45 PM
wtf lol
this is bs I tested it myself on my localhost just now.
I can post video evidence if you want, cos its working just perfect.

Maybe the problem is that post counts doesnt count in your newbie forum?
cos this takes its value from the bbuserinfo['posts'] or postcount as you can see.

other than that I have no idea lol

The Realist
08-01-2004, 01:06 PM
My posts counts in the section is turned off yes. I will turn it on and give it another go.

Laters

The Realist
08-01-2004, 01:13 PM
It does work M8, it was because I had post counts turned off.

Tell me.............

Can it be added so that new members can only see this section I want them to make there first post in and once they made that post the other sections become viewable?

Laters

Revan
08-01-2004, 01:34 PM
sorry mate couldnt really see the solution to that in there.
this would make it abit more advanced so then I think its easier to just do forum permissions and usergroups...

Deska
08-01-2004, 04:10 PM
How if I want newbie user can access morethan one forum?

The Realist
08-02-2004, 08:07 AM
Try

................ <= 0 AND $forumid != 18, 19, 20 etc, etc)

Get the idea.

How if I want newbie user can access morethan one forum?

Revan
08-02-2004, 07:49 PM
Nah more like AND $forumid != 18 AND $forumid != 19 AND $forumid != 20
etc ;)

Deska
08-03-2004, 08:53 AM
Try

................ <= 0 AND $forumid != 18, 19, 20 etc, etc)

Get the idea.

Looks like your idea not good :p

Glenn379
08-04-2004, 07:17 AM
Nice job Revan! I don't give out many of those, so cherish it ;) The only thing is that I wish I could change the message it says without changing the original for other purposes. Oh well :p

Revan
08-07-2004, 08:17 PM
I believe you could do this by not changing the if() for the original print_no_permission, and instead put below the if():
if ($bbuserinfo['posts'] <= 0 AND $forumid != 18)
// change 18 to your forum id
{
standard_error('Ph34r d4 1337 err0rz!');
}
;)

WARNING: this hasnt been tested :)

Glenn379
08-08-2004, 12:42 AM
Well I had to take the hack off because it was impractical. Many of my members would not know what was wrong because people don't want to read the error message, you know? Its annoying because I'd rather've kept it on. X_X

Revan
08-08-2004, 12:01 PM
XD
pity your n00bs are ignorant bastards ;)
I never really expected anyone but the requester to actually use this. XD

glenvw
09-05-2004, 04:10 PM
I would love this with a few edits.

I am looking for a very easy method of restricting new members to one post in a given forum. They need to introduce themselves, etc.

My site is driven by people posting offers they find elsewhere on the INternet. However I get loads of spamming idiots who run in and spam my board with MLM offers, money schemes, etc.

I then have to delete all their posts and ban them which quite frankly is not very effective.

What I would like to see is a person register, then be directed to his/her first post section. They post an introduction and then are locked out. Then as admins or Mods scan the messages, they can easily approve them or leave them locked out.

I know I could set this up with the permissions system but there are too many cumberenses having to go into the admin panel each time you need to edit some one's permissions.

I also would like to be able to ban someone with a click of the mouse...

venomx
09-07-2004, 05:31 AM
I just had a thought... Whats wrong with setting it so Registered Members can only see one forum and set up a Promotion that will move the member to a different user group after one post?

The Realist
09-07-2004, 08:36 PM
And you are 100% correct?

Why the hell did'nt I think of that :)


I just had a thought... Whats wrong with setting it so Registered Members can only see one forum and set up a Promotion that will move the member to a different user group after one post?

venomx
09-07-2004, 10:15 PM
Not sure it will work but what I have read about promotions it should... Just each time you set up a new forum you would have to make sure you edited the permissions if it wasnt under a "mother" one...

VBUsers
10-29-2005, 08:50 AM
old yes , but definitly a must do can someone port this for 3.5.0 gold i know you can play with the permissions but i had this on 3.0 and it was simple and easy to do. thanks

VBUsers
10-31-2005, 03:03 AM
old yes , but definitly a must do can someone port this for 3.5.0 gold i know you can play with the permissions but i had this on 3.0 and it was simple and easy to do. thanks


can a coder please help on this old but necissary hack or point out the exact way to do it in a how 2 for 350 gold?

CarpHunter
01-05-2006, 10:45 PM
Was looking for this myself.

Started to go through some code and found the function that states the forum permissions.

if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']))
{
print_no_permission();
}


My geuss is to add the same stuff as was done in the original so it becomes:
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR $bbuserinfo['posts'] <= 0 AND $forumid != 18)
// 18 being the newbie forum id
{
print_no_permission();
}


Haven't tested it yet because I dont have the new forum up yet.
If they made all variables the same regarding users and posts it should work ok.

VBUsers
01-06-2006, 06:46 AM
Was looking for this myself.

Started to go through some code and found the function that states the forum permissions.

if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']))
{
print_no_permission();
}


My geuss is to add the same stuff as was done in the original so it becomes:
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR $bbuserinfo['posts'] <= 0 AND $forumid != 18)
// 18 being the newbie forum id
{
print_no_permission();
}


Haven't tested it yet because I dont have the new forum up yet.
If they made all variables the same regarding users and posts it should work ok.


well i have 3.5.1 and it rolled over so it works. you can sign up to my forum and see how i have it set up if you like. its in my sig