Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Limit Thread Prefix by Usergroup Details »»
Limit Thread Prefix by Usergroup
Version: 1.0, by Opserty Opserty is offline
Developer Last Online: Apr 2009 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.1 Rating:
Released: 06-23-2008 Last Update: Never Installs: 30
DB Changes Uses Plugins
Code Changes Additional Files  
No support by the author.

/*================================================= =====================*\
|| ################################################## ################## ||
|| # ---------------- LIMIT THREAD PREFIX BY USERGROUP -------------- # ||
|| # ---------------------- CREATED BY OPSERTY ---------------------- # ||
|| # This modification may not be redistributed without prior consent # ||
|| ################################################## ################## ||
\*================================================ ======================*/


WARNING: THIS MODIFICATION REQUIRES FILE EDITS.
Please follow all instructions carefully before attempting to use this modification


What does this modification do?
This modification allow you to control which Usergroups have access to use certain prefix sets. For example in a Help/Bug Report forum, you may only want to allow staff to prefix problems into categories.

Why does this modification require file edits?
The AdminCP has a minimal number of hook locations onto which to attach plugins, this is done for security and stability reasons by the vBulletin team. Therefore it has not been possible to make this modification 'file edit' free.

What versions of vBulletin does this modification work with?
This modification has been tested to work with 3.7.1, however it will most probably also work on 3.7.0. Please note I cannot offer support for help with this modification on 3.7.0 so if you experience problems it will be best to upgrade to 3.7.1 and then see if your errors are resolved.

How to install:
(These instructions are detailed also in the README file attached in the ZIP Archive.)


1. IMPORT PRODUCT
------------------------------------------------

Import the product as normal through the AdminCP.

AdminCP > Plugins & Products > Manage Products


2. UPLOAD FILE
------------------------------------------------

Upload functions_opserty_prefix_ugps.php to the '/includes/' directory of your forum root


3. MAKE FILE EDIT (1)
------------------------------------------------

Download and Open admincp/prefix.php from your vBulletin installation. (Code additions have been highlighted in Green)

You will need to edit the file in a plain text editor, notepad or wordpad will do fine.

Find (approx. Line 303):


PHP Code:
$prefixsetdm->set('displayorder'$vbulletin->GPC['displayorder']);
$prefixsetdm->set_info('title'$vbulletin->GPC['title']);

$prefixsetdm->save(); 
Replace with:

Code:
$prefixsetdm->set('displayorder', $vbulletin->GPC['displayorder']);
$prefixsetdm->set_info('title', $vbulletin->GPC['title']);

require_once(DIR . '/includes/functions_opserty_prefix_ugps.php');
process_selected_groups();

$prefixsetdm->save();
3. MAKE FILE EDIT (2)
------------------------------------------------

Find (approx. Line 448):

PHP Code:

    
if (empty($enabled_forums))
    {
        
// default to selecting "none"
        
$enabled_forums = array(-1);
    }

    
print_forum_chooser($vbphrase['use_prefix_set_in_these_forums'], 'forumids[]'$enabled_forums$vbphrase['none'], falsetrue);
    
    
print_submit_row(); 
Replace with:

Code:
    if (empty($enabled_forums))
    {
        // default to selecting "none"
        $enabled_forums = array(-1);
    }

    print_forum_chooser($vbphrase['use_prefix_set_in_these_forums'], 'forumids[]', $enabled_forums, $vbphrase['none'], false, true);
    
    require_once(DIR . '/includes/functions_opserty_prefix_ugps.php');
    show_usergroup_list($prefixset['allowedugps']);
    
    print_submit_row();
]


4. UPLOAD
------------------------------------------------

Upload the newly edited prefix.php to your server and test away =]

If you receive PHP Parse errors it means you have probably edited prefix.php incorrectly, download a new copy of prefix.php from vBulletin.com and try editing the file again.

Remember to undo file edits and remove files, if you uninstall this product in order to avoid errors in future.

I have done my best to test this modification, however if you notice any bugs please post them in this thread so I can look into them.

Please do not private message me for support with this modification, all support will be given through this thread ONLY.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 08-16-2008, 07:21 AM
oz_girl's Avatar
oz_girl oz_girl is offline
 
Join Date: Mar 2008
Location: Australia
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great mod, reserved
Reply With Quote
  #23  
Old 11-05-2008, 02:58 AM
nando99 nando99 is offline
 
Join Date: Dec 2005
Location: South Florida
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you can only set usergroup permission when adding new thread prefixes? When I go to edit a prefix, I don't see a way to edit usergroup permissions...

Nevermind.... The permissions are on the prefix set not on individual prefixes... thanks!
Reply With Quote
  #24  
Old 12-06-2008, 07:10 PM
puertoblack2003's Avatar
puertoblack2003 puertoblack2003 is offline
 
Join Date: Aug 2005
Location: Philadelphia
Posts: 1,073
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works well on 3.7.4 :up:
Reply With Quote
  #25  
Old 06-08-2009, 12:22 PM
FreneZy FreneZy is offline
 
Join Date: Sep 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The mod did not works anymore since I upgraded vB to 3.8.1
I have included the file change to the new adminCP prefix.php file.

Seems that the userCP is unable to change anything on the prefix "group" rights.
When I add a new group to enable it to use a prefix, it still is unable to do.
When I remove a group, it still is enable to use prefixes !

So there is something strange and I don't find what ! HELP !!!
Reply With Quote
  #26  
Old 06-12-2009, 05:21 PM
FreneZy FreneZy is offline
 
Join Date: Sep 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #27  
Old 07-22-2009, 03:11 AM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need this for a 3.7x site so I am going to give it a try. It looks very promising!
Reply With Quote
  #28  
Old 10-04-2009, 11:17 AM
dimmicosacerchi dimmicosacerchi is offline
 
Join Date: Jun 2009
Location: Italy
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is compatible with 3.8.4?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:08 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.09412 seconds
  • Memory Usage 2,278KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete