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

Reply
 
Thread Tools
Social Group Forum List Details »»
Social Group Forum List
Version: 2.1, by Twilkey Twilkey is offline
Developer Last Online: Jan 2019 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.7.2 Rating:
Released: 08-26-2008 Last Update: 09-01-2008 Installs: 41
Uses Plugins Template Edits
 
No support by the author.

This is a more enriched version of this mod that I made.


If you have Version 1.0 of this mod installed, please uninstall it and run through these instructions again, as I have fixed a couple crucial bugs and added some more settings.


Description:
This mod lists all your Social Groups in a table on the forum home, which makes it look like more forums.

Instructions:

First Import the product.
Second Edit your FORUMHOME template.
If you want the table to show above the forums,
Find:
Code:
<!-- / guest welcome message -->
<br />
</if>
Add Below:
Code:
<if condition="$vboptions[sgfl_enable] == 1">
<form action="group.php?$session[sessionurl]do=grouplist" method="post">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
    <td class="tcat" width="100%" colspan="5">
        <div style="float:$stylevar[right]" class="normal">$vbphrase[search_groups] <input type="text" class="bginput" name="filtertext" value="$filters[text]" style="font-size: 11px;" />&nbsp;<input type="submit" class="button" value="$vbphrase[go]" /></div>
        $vboptions[sgfl_st]
    </td>
</tr>
    <tr>
        <td class="thead" width="100%">
            
<if condition="$vboptions[sgfl_createdate] == 1">
<span style="float:$stylevar[right]">$vbphrase[sgfl_group_created]</span>
</if>
            $vbphrase[sgfl_group_name]</td>
<if condition="$vboptions[sgfl_membercount] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[sgfl_group_members]
        </td>
</if>
<if condition="$vboptions[sgfl_messagecount] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[messages]
        </td>
</if>
<if condition="$vboptions[sgfl_piccount] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[sgfl_pictures]
        </td>
</if>
<if condition="$vboptions[sgfl_last_post] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[last_post]
        </td>
</if>
    </tr>
    $sgforumlist
<tr>
    <td colspan="5" align="center" class="tfoot smallfont">
        <if condition="$show['creategroup']">
            <strong><a href="group.php?$session[sessionurl]do=create">$vbphrase[sgfl_create_a_new_group]</a></strong> &nbsp;
        </if>
        &nbsp; <strong><a href="group.php?$session[sessionurl]do=search">$vbphrase[sgfl_search_groups]</a></strong>
    </td>
</tr>
</table>

<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="dofilter" value="1" />
</form>
</if>


If you want the table to show under the forums,

Find:
Code:
$forumhome_markread_script
<!-- /main -->

<br />
Add Below:
Code:
<if condition="$vboptions[sgfl_enable] == 1">
<form action="group.php?$session[sessionurl]do=grouplist" method="post">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
    <td class="tcat" width="100%" colspan="5">
        <div style="float:$stylevar[right]" class="normal">$vbphrase[search_groups] <input type="text" class="bginput" name="filtertext" value="$filters[text]" style="font-size: 11px;" />&nbsp;<input type="submit" class="button" value="$vbphrase[go]" /></div>
        $vboptions[sgfl_st]
    </td>
</tr>
    <tr>
        <td class="thead" width="100%">
            
<if condition="$vboptions[sgfl_createdate] == 1">
<span style="float:$stylevar[right]">$vbphrase[sgfl_group_created]</span>
</if>
            $vbphrase[sgfl_group_name]</td>
<if condition="$vboptions[sgfl_membercount] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[sgfl_group_members]
        </td>
</if>
<if condition="$vboptions[sgfl_messagecount] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[messages]
        </td>
</if>
<if condition="$vboptions[sgfl_piccount] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[sgfl_pictures]
        </td>
</if>
<if condition="$vboptions[sgfl_last_post] == 1">
        <td class="thead" align="center" nowrap="nowrap">
            $vbphrase[last_post]
        </td>
</if>
    </tr>
    $sgforumlist
<tr>
    <td colspan="5" align="center" class="tfoot smallfont">
        <if condition="$show['creategroup']">
            <strong><a href="group.php?$session[sessionurl]do=create">$vbphrase[sgfl_create_a_new_group]</a></strong> &nbsp;
        </if>
        &nbsp; <strong><a href="group.php?$session[sessionurl]do=search">$vbphrase[sgfl_search_groups]</a></strong>
    </td>
</tr>
</table>

<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="dofilter" value="1" />
</form>
</if>
Now, by default this mod is disabled. So go into your settings and enable it, and Pick the Title of the Section you would like.

LIVE DEMO
_____________________________

Version FAQ

Version 1
  1. Initial Release
Version 2
  1. Fixed Member Count Bug
  2. Fixed Latest Post Bug
  3. Added Ability to Limit Groups Listed
  4. Allow Random Groups to Display (Limit must be greater then 0 for this to work.)
  5. Allow admin to show or not show any of the info.
Version 2.1
  1. Added if statement to disable the table on the forumhome if the mod is disabled.
  2. Fixed the class for the last post box.
  3. Fixed special characters problem.

Show Your Support

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

Comments
  #32  
Old 10-02-2008, 08:23 PM
R-D's Avatar
R-D R-D is offline
 
Join Date: Jan 2008
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a few changes to cache the template and also stop the plugin running when the mod is disabled. This saves 5 queries on forumhome when you've disabled the mod in the options.

This is the changed forumhome_start plugin:

PHP Code:
if ($vbulletin->options['sgfl_enable']){
$show['creategroup'] = ($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['cancreategroups']);

$sgfl_limit $vbulletin->options['sgfl_limit'];

if (
$sgfl_limit 0)
{
    if (
$vbulletin->options['sglist_rand'] == 1)
    {
        
$sgfl_lim "ORDER BY RAND() LIMIT $sgfl_limit";
    }
    else
    {
        
$sgfl_lim "LIMIT $sgfl_limit";
    }
}
else
{
    
$sgfl_lim "";
}

$sgfl_query $db->query("SELECT * FROM " TABLE_PREFIX "socialgroup $sgfl_lim");
        while (
$sgfl $db->fetch_array($sgfl_query))
        {
         
exec_switch_bg();
                
$sgfl[groupid] = htmlspecialchars_uni($sgfl['groupid']);
                
$sgfl[name] = $sgfl['name'];
                
$sgfl[description] = $sgfl['description'];
                
$sgfl[picturecount] = htmlspecialchars_uni($sgfl['picturecount']);
                
$sgfl[lastposter] = htmlspecialchars_uni($sgfl['lastposter']);
                
$sgfl[lastposterid] = htmlspecialchars_uni($sgfl['lastposterid']);
        
$sgfl[dateline] = vbdate($vbulletin->options['dateformat'], $sgfl['dateline'], true);



$countmembers $vbulletin->db->query_first("SELECT COUNT(*) AS count_member FROM " TABLE_PREFIX "socialgroupmember WHERE groupid='$sgfl[groupid]'");
$countmember $countmembers['count_member'];

$countmessage $vbulletin->db->query_first("SELECT COUNT(*) AS countmessages FROM " TABLE_PREFIX "groupmessage WHERE groupid='$sgfl[groupid]'");
$countmessages $countmessage['countmessages'];


            
$sgfl_comments_query $db->query("SELECT * FROM " TABLE_PREFIX "groupmessage WHERE groupid='$sgfl[groupid]'");
                  
$sgfl_comments $db->fetch_array($sgfl_comments_query);

                             
$sgfl_comments[gmid] = htmlspecialchars_uni($sgfl_comments['gmid']);
                             
$sgfl_comments[postuserid] = htmlspecialchars_uni($sgfl_comments['postuserid']);
                             
$sgfl_comments[postusername] = htmlspecialchars_uni($sgfl_comments['postusername']);
                     
$sgfl_comments[dateline] = vbdate($vbulletin->options['dateformat'], $sgfl_comments['dateline'], true);



        eval(
'$sgforumlist .= "' fetch_template('sgfl_bit') . '";');
        }


And a new plugin to cache the template (hook: cache_templates)

PHP Code:
if ($vbulletin->options['sgfl_enable'] AND THIS_SCRIPT == 'index')
{
$globaltemplates[] = 'sgfl_bit';



And to remove invite-only groups from the list:

In the forumhome_start plugin, change:
PHP Code:
$sgfl_query $db->query("SELECT * FROM " TABLE_PREFIX "socialgroup $sgfl_lim"); 
to:
PHP Code:
$sgfl_query $db->query("SELECT * FROM " TABLE_PREFIX "socialgroup WHERE type != 'inviteonly' $sgfl_lim"); 
Reply With Quote
  #33  
Old 10-26-2008, 02:21 PM
Thug Thug is offline
 
Join Date: Feb 2004
Location: Sheffield : uk
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

isit possible to make it so when the group leader creates a group forum it will go into a sub section on my main forum called "group forums"
Reply With Quote
  #34  
Old 11-07-2008, 12:05 PM
trigatch4 trigatch4 is offline
 
Join Date: Feb 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about showing Random, Popular, Joined, etc... Social Groups?

How about in a Sidebar?
Reply With Quote
  #35  
Old 11-13-2008, 05:56 PM
fadmedia fadmedia is offline
 
Join Date: Oct 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is exactly what my users were requesting, but we have so many groups, I have to limit how many appear. It would be really useful if I could do something like the 10 most recently active groups. For the moment I'm using the random setting, but I know people will be asking for the group with the most recent post to be at the top of the list.
Reply With Quote
  #36  
Old 12-02-2008, 06:21 PM
Chance4Today Chance4Today is offline
 
Join Date: Aug 2007
Location: NE
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this be available for 3.8?
Reply With Quote
  #37  
Old 12-25-2008, 10:39 PM
Charles_1 Charles_1 is offline
 
Join Date: Jun 2006
Location: Czech Republic, Brno
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fadmedia View Post
This is exactly what my users were requesting, but we have so many groups, I have to limit how many appear. It would be really useful if I could do something like the 10 most recently active groups. For the moment I'm using the random setting, but I know people will be asking for the group with the most recent post to be at the top of the list.
Agree. I have especially one active group that I would like to have still visible in forumhome, but with more and more groups from users it will be visible less and less over time becouse of random setting :-(. Or possibility to sticky some group (to be still visible at the top) would be great.

Nevertheless thanks for this hack :up:
Reply With Quote
  #38  
Old 01-13-2009, 10:24 AM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't work for 3.8.0

After upgrade it gave me MySQL error. Probably some tables are different from previows version 3.7 to 3.8

I hope someone Twilkey can upgrade this mod to 3.8 or someone here can find a solution for.

Edit: Found a solution ! You're trying to use this on 3.8.0 the file attached can solve the problem of MySQL errors. As I suspected one table has been changed on for 3.8.0. Do not install this file if you are running later versions than 3.8.0

Just import the product through your admin control panel allowing orverwrite. Template edits remains the same as first post.

Enjoy.
Reply With Quote
  #39  
Old 03-04-2009, 10:15 AM
htscpl's Avatar
htscpl htscpl is offline
 
Join Date: Sep 2003
Location: Houston
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the update Leo, just upgraded to 3.8.1 and I was cursing the loss of my social groups on the forum home page. Upgraded and now works just fine! Thanks again!
Reply With Quote
  #40  
Old 03-18-2009, 04:46 AM
Moyses's Avatar
Moyses Moyses is offline
 
Join Date: Mar 2002
Location: El Salvador
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Leo Brazil View Post
It doesn't work for 3.8.0

After upgrade it gave me MySQL error. Probably some tables are different from previows version 3.7 to 3.8

I hope someone Twilkey can upgrade this mod to 3.8 or someone here can find a solution for.

Edit: Found a solution ! You're trying to use this on 3.8.0 the file attached can solve the problem of MySQL errors. As I suspected one table has been changed on for 3.8.0. Do not install this file if you are running later versions than 3.8.0

Just import the product through your admin control panel allowing orverwrite. Template edits remains the same as first post.

Enjoy.
Thanks Man! :up:
Reply With Quote
  #41  
Old 04-04-2009, 09:20 AM
Keesa Keesa is offline
 
Join Date: Oct 2007
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks promising, but I am not seeing anything on the Demo page that shows me what this does?

http://features.gamingtv.us/forum/index.php

Does anyone have it working on 3.8.1 that I can see?
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 01:57 PM.


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.04998 seconds
  • Memory Usage 2,358KB
  • Queries Executed 27 (?)
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_code
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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