vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - GRPS: Groups Commune 2.0.x (https://vborg.vbsupport.ru/showthread.php?t=127303)

Warlord 12-10-2008 01:10 PM

EDIT: Apparently I spoke too soon. The modification below does not work correctly. Will update this post when I get it working right.

To display groups information on the memberinfo template (the members profile) perform the following:

1. Create a new plug-in called Groups Activity in Memberinfo (15 Newest).

Plug-in information
Product: GRPS: Groups Commune
Hook Location: member_complete
Plugin PHP Code:
Code:

// ###################### extracts my groups groups for main grps page
//require_once("./includes/functions_grps.php");
$grps_ids = explode(' ', trim($vbulletin->userinfo['grps']));

$baselocation = ($vbulletin->options['grps_locationswitch'] == TRUE) ? $vbulletin->options['homeurl'] : $vbulletin->options['bburl'];

if (!empty($vbulletin->userinfo['grps']))
{
        $grps_ids_imploded = implode(",", $grps_ids);

        $grps_mygroups = $db->query("
                SELECT grps.groupid, grps.title, grps.description, grps.approved, grps.leaderid, grps_setting.image_name, MAX(grps_thread.lastpostdateline) AS dateline
                FROM grps
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                LEFT JOIN grps_thread ON (grps_thread.groupid = grps.groupid)
                LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = grps.leaderid)
                WHERE grps.approved = '1' AND grps.groupid IN($grps_ids_imploded)
                GROUP BY grps.groupid
                ORDER BY dateline DESC
                LIMIT 15
        ");

        while ($grps_mygroupsinfo = $db->fetch_array($grps_mygroups))
        // foreach($grps_ids AS $grps_key_id => $grps_mygroups)
        {
                if(!$grps_mygroupsinfo['image_name'])
                {
                        $grps_mygroupsinfo['image_name'] = "<img src=\"" . $vbulletin->options['bburl'] . "/" . $stylevar['imgdir_grps'] . "/grps_mygroups_noimage.gif\" alt=\"" . $grps_mygroupsinfo[title] . "\" border=\"0\" /><br />";
                }
                else
                {
                        $grps_mygroupsinfo['image_name'] = "<img src=\"../groups/grps_imgs/defaults/" . $grps_mygroupsinfo['image_name'] . "\" width=\"100\" alt=\"" . $grps_mygroupsinfo[title] . "\" border=\"0\" /><br />";
                }

                if ($grps_mygroupsinfo['leaderid'] == $vbulletin->userinfo['userid'])
                {
                        $grps_mygroupsinfo['leader'] = "<img src=\"" . $vbulletin->options['bburl'] . "/" . $stylevar['imgdir_grps'] . "/grps_leader.gif\" alt=\"" . $grps_mygroupsinfo['title'] . " Leader\" border=\"0\" /><br />";
                }
                else
                {
                        $grps_mygroupsinfo['leader'] = FALSE;
                }

                if ($grps_mygroupsinfo['dateline'] > $vbulletin->userinfo['lastvisit'])
                {
                        $grps_mygroupsinfo['newposts'] = "<span class=\"highlight smallfont\">" . $vbphrase['grps_new_posts'] . "</span>";
                }
                else
                {
                        $grps_mygroupsinfo['newposts'] = FALSE;
                }

                $mygroups .= "
                        <li id=\"grpsgroupsbullets\">
                                <a href=\"" . $baselocation . "/groups/groups.php?" . $vbulletin->session->vars['sessionurl'] . "g=" . $grps_mygroupsinfo['groupid'] . "\" title=\"" . $grps_mygroupsinfo['title'] . "\"><b>" . fetch_trimmed_title($grps_mygroupsinfo['title'], 15) . "</b></a><br />
                                " . $grps_mygroupsinfo['image_name'] . "
                                " . $grps_mygroupsinfo['leader'] . "
                                " . $grps_mygroupsinfo['newposts'] . "
                        </li>
                ";
        }
        eval('$grps_mygroupsbits .= "' . fetch_template("groups_usercp_groupsbits") . '";');
}

2. Now simply place the variable $grps_mygroupsbits anywhere you like in the memberinfo template.

Optional step: If you wish to change the width of the member's group information you can do so by finding and changing the following CSS code.

In template groups_usercp_groupsbits find:

Code:

width: 50em;
And change it to:

Code:

width: 100%
Or whatever percentage you'd like to use.

japancars 12-14-2008 11:54 AM

Will this mod run on VB 3.7.4???

Warlord 12-16-2008 04:01 AM

I'm not sure, but I doubt it. I don't have 3.7, but from what I understand, a lot has changed between 3.6 and 3.7.

tomotron 01-10-2009 04:24 PM

just installed and it's a great product!

allowing users to upload a group image would be huge though, some sort of banner or something to make the group pages more unique.

even better would be a basic group image gallery or something along those lines.

Phalynx 01-23-2009 09:43 AM

If someone is searching for a converter GRPS -> SocialGroups, PM me.

Abizaga 10-27-2009 02:09 AM

sorry for the bump, but I can't get images to work or the links to edit so i can go from it to the main forum. I need help

Safice 06-09-2010 09:01 AM

Quote:

Originally Posted by Abizaga (Post 1906730)
sorry for the bump, but I can't get images to work or the links to edit so i can go from it to the main forum. I need help

Same here...
There doesn't seem to be any way to navigate to the groups page from the main forum, and the images don't work.

Would appreciate any help given!

Abizaga 06-21-2010 06:01 PM

Ok, it doesn't seem to read the forum, so the images won't show and the links go to the /groups directory instead of /forums. How do I fix that?


All times are GMT. The time now is 11:49 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.03066 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete