Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hidden Invite Only Social Groups Details »»
Hidden Invite Only Social Groups
Version: 1.02, by XiZa XiZa is offline
Developer Last Online: Nov 2008 Show Printable Version Email this Page

Category: Social Group and Album Enhancements - Version: 3.7.2 Rating:
Released: 07-07-2008 Last Update: 07-07-2008 Installs: 15
Code Changes  
No support by the author.

Hello,

I've made a code modification to hide invite only social groups from the group.php page (including search). If you are an admin, you will still see those groups listed even if you are not a member of them.

Anyway so this hack does the following:

- Removes all invite only social groups from the group list page.
- Shows an error when you try to access the group by URL if you're not a member or not invited.
Same for picture page, etc.

I just made this today and it seems like it works, but please for now test it locally first!


I didn't make a plugin since there don't seem to be hooks in the locations that I need.

Instructions:

Download the new group.php and replace your old one. Alternatively, find all the sections labeled //WESLEY mod and do the replacements manually.

UPDATE:

I also added two other replacement files, you can either just download them or follow along here to do the updates yourself..

To also remove the invitation only social groups from the list on the profile page, open includes/class_profileblock.php and go to line 1130 or so.

Remove this:

PHP Code:

/*
            $socialgroups = $this->registry->db->query_read_slave("
                SELECT socialgroup.*
                FROM " . TABLE_PREFIX . "socialgroupmember AS socialgroupmember
                INNER JOIN " . TABLE_PREFIX . "socialgroup AS socialgroup ON
                    (socialgroup.groupid = socialgroupmember.groupid)
                WHERE
                    socialgroupmember.userid = " . $this->profile->userinfo['userid'] . "
                    AND socialgroupmember.type = 'member'
                ORDER BY socialgroup.name
            ");

*/
//REMOVED BY WESLEY 
Replace by this

PHP Code:
//changed by wesley
            
$sql =     "SELECT socialgroup.*
                FROM " 
TABLE_PREFIX "socialgroupmember AS socialgroupmember
                INNER JOIN " 
TABLE_PREFIX "socialgroup AS socialgroup ON
                    (socialgroup.groupid = socialgroupmember.groupid)
                WHERE
                    socialgroupmember.userid = " 
$this->profile->userinfo['userid'] . "
                    AND socialgroupmember.type = 'member' " 

                (!
can_moderate(0'caneditsocialgroups') ? " AND socialgroup.type != 'inviteonly'" "") . "
                ORDER BY socialgroup.name"
;
            
            
$socialgroups $this->registry->db->query_read_slave($sql);

//changed by wesley 
Lastly, if you do not want to show a link to the social group from the last activity bit ("Viewing social group: link") open includes/functions_online.php

Go to line 2182

Change

PHP Code:
            WHERE groupid IN (0$socialgroupids
to

PHP Code:
            WHERE groupid IN (0$socialgroupids) AND type != 'inviteonly' 
If the group is invite only it will now just display "Viewing social group".

Show Your Support

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

Comments
  #2  
Old 07-08-2008, 06:28 PM
XiZa XiZa is offline
 
Join Date: Aug 2006
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me know if it works for you or if I missed something, thanks.
Reply With Quote
  #3  
Old 07-09-2008, 06:28 AM
XiZa XiZa is offline
 
Join Date: Aug 2006
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Soo I'd really like some feedback, is no one interested in this hack? ..
Reply With Quote
  #4  
Old 07-09-2008, 06:44 AM
Q-v-n-s-Q Q-v-n-s-Q is offline
 
Join Date: Mar 2005
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will try this out, thanks
Reply With Quote
  #5  
Old 07-09-2008, 01:25 PM
IcheeWaWa IcheeWaWa is offline
 
Join Date: Jul 2006
Location: Texas
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll be testing this out later today! Thanks for taking on the task.
Reply With Quote
  #6  
Old 07-09-2008, 01:33 PM
XiZa XiZa is offline
 
Join Date: Aug 2006
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, looking forward to that

Note that the files supplied are for 3.7.2, if you want to use this in an earlier version of 3.7, simply look in the files for "wesley" and copy/paste those sections over appropriately.
Reply With Quote
  #7  
Old 07-11-2008, 08:55 AM
Ideal Web Tech's Avatar
Ideal Web Tech Ideal Web Tech is offline
 
Join Date: Feb 2008
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is against the vBulletin license agreement to redistribute full vBulletin files.
Reply With Quote
  #8  
Old 07-11-2008, 03:30 PM
jilly jilly is offline
 
Join Date: Jul 2002
Location: central maryland
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so are we supposed to download those files and re-upload them? I don't think I want to do that, because some of my files have other modifications in them that these may overwrite - do you have a list of what to change in those files, so I can just go into them and change them manually?
Reply With Quote
  #9  
Old 07-11-2008, 04:21 PM
XiZa XiZa is offline
 
Join Date: Aug 2006
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just look at the files and search for "wesley" and replace where necessary. I could make a list later.. Btw where does it say that this is not allowed ideal_web_tech?
Reply With Quote
  #10  
Old 07-23-2008, 08:28 PM
RaTix RaTix is offline
 
Join Date: Jun 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought vB had added this in a newer patch and was about to update again when I saw your mod. Since I didn't feel like having to sort through what mods and customizations would be broken again because of it, I decided to give this a whirl. Unfortunately I ran into Db error when doing so.

I am Running VB 3.7.1 PL1. There seems to be no difference in the files specified except for your edits (File compare in Notepadd++), so I do not think my version of VB is the issue.

Quote:
Invalid SQL:

SELECT COUNT(*) AS count
FROM vbsocialgroup AS socialgroup
LEFT JOIN vbsocialgroupmember AS socialgroupmember ON
(socialgroupmember.userid = XXXX AND socialgroupmember.groupid = socialgroup.groupid)
WHERE vbsocialgroup.type != 'inviteonly';

MySQL Error : Unknown column 'vbsocialgroup.type' in 'where
I think the problem lies within this section of your mod.

Quote:
//WESLEY MOD
case 'grouplist':
{
if (!can_moderate(0, 'caneditsocialgroups')) {
$socialgroupsearch->generator->where['type'] = TABLE_PREFIX . "socialgroup.type != 'inviteonly'";
}
}
break;
//WESLEY MOD
in the group.php.

Here's the thing, it works fine for admins, but any other user will get a DB error when trying to access the Social Groups page. To make sure there was nothing else I changed or another mod perhaps conflicting. I replaced the group.php with my original 3.7.1 pl1 group.php and it works as normal.

Was this ever officially added to any newer versions or patches of VB? If not, any help to get this much desired feature working will be appreciated.
Reply With Quote
Reply


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 10:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04729 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_php
  • (2)bbcode_quote
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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