vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Close Social Groups (https://vborg.vbsupport.ru/showthread.php?t=213655)

djxcee 05-14-2009 03:16 AM

Close Social Groups
 
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:
PHP 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:
PHP Code:

standard_error(somethingsomethingsomethingsomething

However, the last three 'somethings' are optional. And the first one is a string. So, you want something like this:
PHP Code:

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:

PHP Code:

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



All times are GMT. The time now is 03: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.01070 seconds
  • Memory Usage 1,727KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete