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)

cellarius 01-30-2009 10:00 PM

User's Social Groups on Forum Home (like forumlist, fully templated)
 
1 Attachment(s)

What does it do?
  • Shows all social groups the actual user is a member of or is subscribed to, just below the forumlist (or anywhere else on forumhome). If there are new messages, the corresponding forum statusicon is highlighted - just like in forumlist.
  • If there are no groups to show, you can choose to show a teaser message.


Things to set in AdminCP/Options
:
  • show member of / subscribed to /nothing
  • sort by name or last message date
  • limit max number of groups shown, then link to appropriate page (grouplist for members, usercp for subscribers)
  • restrict use by usergroup
  • show a teaser message if there are no groups to show
  • show buttons to open new discussion etc.
  • apply custom css to grouptitle
  • trim group description to max length or disable
  • parse bbcode in group descriptions
  • use a different set of statusicons for groups than for forums
  • use .png for statusicons instead of .gif (global in AdminCP, per style in groupsbit template)
  • show groupicon instead of statusicon


Looks
  • Out of the box: I tried to copy the standard look of the forumlist on forumhome.
  • As requested, it is now fully templated (following the forumbit-scheme) for easy adjustment to custom styles.
    See the screenshot of a modified example in this post.


Install/upgrade
  1. Upload folder "images" to your forum root (can be omitted if you do not want to use the buttons).
  2. Import the product file.
  3. Check settings in AdminCP->Options->Social Groups on Forumhome.


Template edit
Will be automatically inserted below your forums list if you are using TMS, which I highly recommend to do. If not:

Find:
HTML Code:

<!-- /main -->
Above add:
HTML Code:

$cel_social_groups
If you don't like it there, you can insert $cel_social_groups anywhere you like on forumhome.


Technical stuff
1 product file that adds
+ 3 templates (following the forumbit-scheme)
+ 3 plugins
+ adds 2 queries to forumhome (only if groups are shown, of course).
+ a bunch of phrases (prefix: cel_sgfh_).
+ 4 png-buttons, taken from the silk icon set.


Limitations
  • Marking of new messages only works with database, not with cookie based marking of read threads (-> AdminCP setting)
    Explanation: This mod relys on the information in the database when a discussion was last read by the actual user. If you rely on cookies for this, you can use this mod anyway, but there will be no marking if there are unread messages by changed statusicons.
  • 3.7 Discussion groups will show up as "no messages yet" as long as there was no message written under 3.8
    Explanation: When converting the old 3.7 message board into a discussion, Jelsoft was a little bit slack. While normally all the information about the last updated discussion is stored in the socialgroups table, this information is not entered for the auto-created discussion. For example: The discussion ID for the last updated discussion simply is 0 instead of the actual id of the auto created discussion. Therefore, this mod can not retrieve the information it needs since the discussion is not linked to the social group. This only changes when the first message under 3.8 is written.
  • Not a bug note: In vB 3.8 there was an issue where the last discussion title was not correctly updated by vB in the socialgroup table. This would lead this mod to show a wrong last discussion title under some circumstances. This was resolved in 3.8.1.
    See Bugtracker: http://www.vbulletin.com/forum/proje...?issueid=27176
Version history

v 1.4
+ some bugfixes
+ option to turn teaser message off
+ option to show several buttons: to start a new discussion - see the group's members list - see the group' photos (only shown if there are any attached pictures) - unsubscribe (only if subscribed groups are shown) (Thanks to glorify)
1.4.1: Template/Style error in Google Chrome fixed


v 1.3
+ now fully templated. New templates: forumhome_cel_social_groups_groupsbit and forumhome_cel_social_groups_lastmsgby.
1.3.1: Link to user profile error fixed

v 1.2
+ added option to sort groups by date of last message
+ added missing phrase

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



Planned features (no promises made!)

none atm

[s]option to use a set of different statusicons for the groups [/s]
[s]option to use the social group's icon instead of the statusicon[/s]
[s]and to go with that, for additional/substitunional unread marking, possibility to add css markup to the social group's title[/s]


Translations
Screenshots:
  • AdminCP
  • Forumhome (with groupicon and css formatted groupname, bbcode in description parsed)
  • Forumhome (with forum statusicons and trimmed description -> bbcode not parsed)
### Don't forget to click install! ###
(No support if you don't)


cellarius 01-31-2009 03:22 PM

Reserved

digicom 01-31-2009 03:23 PM

Quote:

Install
Just import product file.
there is no product file attached??

cellarius 01-31-2009 03:34 PM

Quote:

Originally Posted by digicom (Post 1730012)
there is no product file attached??

Well, just give a man a few seconds to prepare ;)

Subah 01-31-2009 03:48 PM

Thank you

Quote:

Originally Posted by cellarius (Post 1730025)
Well, just give a man a few seconds to prepare ;)

looooooool

RvG2 01-31-2009 03:58 PM

FINALLY! :) gosh you are heaven sent here.

I have installed it, I am a member on one of my groups there were new posts but still i did not see it forumhome.

Have I done wro ng?

cellarius 01-31-2009 04:15 PM

Did you do the template edit?

RvG2 01-31-2009 04:17 PM

yes it shows only You are currently not a member of a social group.
See what you are missing

although there are new posts in the group.

RvG2 01-31-2009 04:22 PM

what is this? reisekalender.php

cellarius 01-31-2009 06:16 PM

Quote:

Originally Posted by RvG2 (Post 1730069)
what is this? reisekalender.php

Sorry, a relict from another of my mods where I took this snippet from :o

Please re-download and re-import the product file. Should be fixed.

Concerning your other problem: Are you a member of these social groups and have you read the limitations in the fist post?

Mark.B 01-31-2009 06:56 PM

Needs a bit of tidying up of the html but works fine.

Would be nice if it could pull a thumbnail of the group icon somehow, I did have a play but I get all in a tizz with database queries after a while.

cellarius 01-31-2009 08:33 PM

Uploaded a new version of the product with a corrected xml. If you downloaded before, please reinstall.

RvG2 02-01-2009 01:52 PM

yes this works perfectly. :)

TalkTemplate 02-01-2009 02:22 PM

looks nice i will try it!

glorify 02-01-2009 04:17 PM

Any way you could have it so only the subscribed groups show?

cellarius 02-01-2009 04:44 PM

:erm: Hm, that's the way it's designed and it works - at least for me...

glorify 02-01-2009 04:51 PM

Naw--I have all groups showing I am a member of

RvG2 02-01-2009 05:11 PM

request: option to control how many groups to show in forumhome with a link to "show all group messages" or the likes...

Phaedrus 02-01-2009 05:18 PM

Excellent. With TMS it was just a product import!

Sweet!

cellarius 02-01-2009 05:26 PM

@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 removed, it's a feature now ***

Untested, let me know if it works.

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.)

cellarius 02-03-2009 02:30 PM

Hm, might it be that right now it's listing the groups in an alphabetical looking order ;)

Yep, that should be doable. I'll look into it.

cellarius 02-03-2009 02:56 PM

Quote:

Originally Posted by Diana Notacat (Post 1733079)
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.)

Quote:

Originally Posted by cellarius (Post 1733092)
Hm, might it be that right now it's listing the groups in an alphabetical looking order ;)

Yep, that should be doable. I'll look into it.

Check out version 1.2, with special regards to Diana, apparantly not one of the felidae ;)

Diana Notacat 02-03-2009 02:57 PM

Quote:

Originally Posted by cellarius (Post 1733092)
Hm, might it be that right now it's listing the groups in an alphabetical looking order ;)

Yep, that should be doable. I'll look into it.

YAY~! Thank you, you wonderful coder you! <3

RvG2 02-03-2009 04:18 PM

cell, you are one of remarkable coders here in vb.org!

thank you so much :)

glorify 02-03-2009 04:49 PM

Thanks a ton bro. I'll post a screen of my modded look later tonight when I get home.

Kudos.

glorify 02-04-2009 12:11 AM

Quote:

Originally Posted by glorify (Post 1732640)
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

Quote:

Originally Posted by cellarius (Post 1733000)
Sorry, I corrected that. Product file updated.

Same problem :(

cellarius 02-04-2009 04:32 AM

Yeah, I see where that might be a bug. I somehow overlooked that bug report, sorry.
I'll look into it.

cellarius 02-04-2009 05:25 AM

Quote:

Originally Posted by glorify (Post 1732640)
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

I tested this on two test boards and my live board, and I don't have this issue. That made me look into the bug tracker: This is not a bug of this mod, but was a bug in vB 3.8.0 that was fixed in 3.8.1, so please update your forums - that will resolve the issue.

http://www.vbulletin.com/forum/proje...?issueid=27176

Keyser Soze 02-04-2009 06:13 AM

1 Attachment(s)
Can someone please explain why this mod says "no messages yet" for almost every group, although there are aready some messages in these groups (see attached screenshot)?

cellarius 02-04-2009 07:06 AM

Just read the mod description, please.
Quote:

Limitations
  • 3.7 Discussion groups will show up as "no massages yet" as long as there was no message written under 3.8
    Explanation: When converting the old 3.7 message board into a discussion, Jelsoft was a little bit slack. While normally all the information about the last updated discussion is stored in the socialgroups table, this information is not entered for the auto-created discussion. For example: The discussion ID for the last updated discussion simply is 0 instead of the actual id of the auto created discussion. Therefore, this mod can not retrieve the information it needs since the discussion is not linked to the social group. This only changes when the first message under 3.8 is written.



All times are GMT. The time now is 07:14 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.01453 seconds
  • Memory Usage 1,850KB
  • 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
  • (2)bbcode_html_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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