vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Forum Home Enhancements - User's Social Groups on Forum Home (like forumlist, fully templated) (https://vborg.vbsupport.ru/showthread.php?t=203721)

RvG2 02-01-2009 05:38 PM

cellarius, i think you can make it an option in admincp to select whether we want to show group messages as member or subscribed only.

Phoenix81377 02-01-2009 05:59 PM

Works great for me! Thank you!

glorify 02-01-2009 07:39 PM

Quote:

Originally Posted by cellarius (Post 1731097)
@glorify: Ah, ok, I see where you make the difference, of course: member of vs. subscribed.

Try replacing the database query at the top of the plugin with this:
Code:

    $result = $db->query_read("
        SELECT
            socialgroup.groupid, socialgroup.name, socialgroup.description, socialgroup.dateline, socialgroup.lastpost, socialgroup.lastposter, socialgroup.lastposterid, socialgroup.lastgmid, socialgroup.visible, socialgroup.lastdiscussion, socialgroup.discussions, socialgroup.members,
            discussionread.readtime
        FROM " . TABLE_PREFIX . "socialgroup as socialgroup
        LEFT JOIN " . TABLE_PREFIX . "discussionread as discussionread
        ON socialgroup.lastdiscussionid = discussionread.discussionid
        INNER JOIN " . TABLE_PREFIX . "socialgroupmember as socialgroupmember
        ON socialgroup.groupid = socialgroupmember.groupid
        INNER JOIN " . TABLE_PREFIX . "subscribegroup as subscribegroup
        ON socialgroup.groupid = subscribegroup.groupid
        WHERE socialgroupmember.userid = " . $vbulletin->userinfo['userid'] . " AND subscribegroup.userid = " . $vbulletin->userinfo['userid'] . "
        GROUP BY name
        ORDER BY name ASC, lastpost DESC
        ");

Untested, let me know if it works.

Will let you know. Thanks :)

One question---if there are no subscribed or memberships, does the box not show at all?
Quote:

Originally Posted by RvG2 (Post 1731111)
cellarius, i think you can make it an option in admincp to select whether we want to show group messages as member or subscribed only.

I like it.

cellarius 02-02-2009 06:33 AM

From mod description:
Quote:

What does it do?
[...]
If a user is not a member of a social group, it will display a text referring to the groups.

cellarius 02-02-2009 11:37 AM

============== Important upgrade notes ==============
For upgrading from v1.0, please uninstall old version first!
If you changed templates manually, please note that the variable to insert has changed.

v 1.1
+ improved database query
+ limitations somewhat lessened
+ added settings page to AdminCP
+ choose whether to show groups the user is a member of or subscribed to
+ limit number of groups shown, then link to appropriate page
+ restrict use by usergroup
+ some minor bugfixes

glorify 02-03-2009 12:04 AM

Man--I was almost where I wanted this but the only problem I have is the $cel_sgfh_output. I wanna be able to mod the look a tad easier to reflect my style---any way of making the output a template? I hate having to modify the plugin.

I really love the mod, and I believe it's something vb should use as stock.

glorify 02-03-2009 03:48 AM

Found a bug---

When it displays (yes I have thread marking enabled correctly), It shows the last group thread, and the latest thread reply linked to the username.

Problem is, the last group thread and the latest group reply can be different. An example---

The last group thread was started 3 days ago (which is what the mod shows on forumhome). The latest reply was from a different thread tonight (which is linked to with the username on the forumhome.

Example of what it shows:

Thread Title 5 (started yesterday) shows it because it's the latest thread (still links to the latest reply though)
by Username (linked to Thread Title 1) linked to it because it's the latest reply

Keyser Soze 02-03-2009 09:04 AM

Great mod. You forgot to phrase the string "No messages yet". Please add a vbulletin-phrase for this string.

cellarius 02-03-2009 12:12 PM

Sorry, I corrected that. Product file updated.

Diana Notacat 02-03-2009 02:18 PM

This is working out WONDERFULLY for my boards so far! We needed this so much!

I would love to see an option where it will list your groups by "Newest messages". That way the most recently update groups are on the main page and people can click "Show More" to see the rest of their groups. (I'm not sure if this is already a feature, cause right now it's listing the groups in a random looking order.)


All times are GMT. The time now is 01:40 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.01382 seconds
  • Memory Usage 1,741KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete