Log in

View Full Version : Close Social Groups


djxcee
05-14-2009, 03:16 AM
I know we can turn it off but is there a way to turn it to closed? Similar to what the forum does (Inactive Forum) but for social groups.

Lynne
05-14-2009, 04:00 AM
Define 'closed'. If the forums are closed, no one can see them. So, you want a sign on your social group page that just says the group is closed (and nobody can see a thing)? Or do you mean you want to be able to close it to users joining? Or close it to posting?

Anyway, whichever of those you mean, you will have to modify the code. Depending on which it is, it could just be a simple plugin that you need to write.

djxcee
05-14-2009, 05:01 AM
Lynne,

Closed as in a sign that shows that the group is inactive (Similar to vBulletin's Option for the entire forum).

Lynne
05-14-2009, 03:34 PM
Then just use the group_start_precheck hook to create a plugin with a standard_error (look up the standard_error function in the API (in Quick Links)).

djxcee
05-28-2009, 05:38 PM
I created a plugin with hook location "group_start_precheck" with the following code:
void standard_error ([string $error = 'Groups is currently closed to improve its features.']

However I don't see anything.

Lynne
05-28-2009, 06:25 PM
Why do you have void in front of the statement? And did you look up standard_error in the vB API like I suggested?

djxcee
05-28-2009, 07:19 PM
That's the code I got from the vB API.

I'm sorry if I didn't answer your question as I'm a bit new to PHP.

Lynne
05-28-2009, 07:38 PM
Ah, I see where you got it. You don't actually put the 'void' there or any of hte stuff that is light colored. So, it actually would look something like this:
standard_error(something, something, something, something) However, the last three 'somethings' are optional. And the first one is a string. So, you want something like this:
standard_error('Groups is currently closed to improve its features.')

djxcee
05-28-2009, 08:24 PM
Lynne,

Thank you for the help but I did that and still nothing is happening.
groups.php can still be accessed.

Product: vBulletin
Hook: Location: group_start_precheck
Title: Close Social Groups
Execution Order: 5
Plugin PHP Code: standard_error('Groups is currently closed to improve its features.')
Plugin is Active: Yes

Lynne
05-29-2009, 01:34 AM
Did you put a ";" at the end of your line? (Sorry, I was just showing you how to use standard_error in my code above, not making it exactly what should be in the plugin.) The plugin should be:

standard_error('Groups is currently closed to improve its features.');