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)
-   -   Social Group and Album Enhancements - View all your social group messages (https://vborg.vbsupport.ru/showthread.php?t=205163)

Lynne 02-11-2009 10:00 PM

View all your social group messages
 
1 Attachment(s)
A page to display all the messages in all the groups a user has joined.

I have found on my forums, that it is hard to keep up with new messages in your social groups. You have to go to each individual group and see if there is anything new. So, I created this page to list all the messages in your social groups in date descending order.

[s]You will need to create two new templates and upload one file.[/s] edit: The two templates and the phrases for this modification are now included in a product.

The users may either view All My Groups and see the messages from all their groups in the list, or they may select one of the groups they belong to and see just the messages in that group. I used the option vboptions > Message Searching Options > Maximum Search Results to Return to set maximum results shown.

Version History:
1.0 2009-02-12:
- initial release by Lynne at vbulletin.org

1.2 2009-03-12:
- fully phrased, templates now in product to import.
- added option to view only messages from single group
- used vboptions > Message Searching Options > Maximum Search Results to Return to set maximum results shown
- cached all bbcode templates
- AFTER INSTALL OF PRODUCT, YOU WILL HAVE TO REVERT THE TWO TEMPLATES (socialgroups_messagelist and socialgroups_messagelistbits) IF YOU HAD INSTALLED THIS PREVIOUSLY (or else you will still be using the original templates)


Please mark INSTALL if you find this useful.

pein87 02-12-2009 08:38 PM

How many quieries does it add for this?

Lynne 02-12-2009 08:44 PM

Add? Since it's a totally new page, you don't get added queries to the page. But, it currently has the potential of one small query per message to get the Discussion Name. If you don't want the Discussion name listed, you may comment out the following code in messagelist.php:
PHP Code:

        if (!$message['discussiontitle'])
        {
        
$title $vbulletin->db->query_first("
            SELECT groupmessage.title as discussiontitle
            FROM " 
TABLE_PREFIX "groupmessage as groupmessage
            JOIN " 
TABLE_PREFIX "discussion AS discussion 
        ON (discussion.firstpostid = groupmessage.gmid)
            WHERE groupmessage.discussionid = " 
$message['discussionid'] ."
            LIMIT 1
            "
);
            
$message['discussiontitle']=$title['discussiontitle'];
        } 

And then take out these lines in 'socialgroups_messagelistbits':
HTML Code:

                <div>
                    <span><phrase 1="group.php?$session[sessionurl]gmid=$message[gmid]#gmessage$message[gmid]" 2="$message[discussiontitle]">$vbphrase[discussion_x]</phrase></span>
                </div>


pein87 02-12-2009 08:49 PM

Thanks mate your leading the social group revoloution. Installed.

redlabour 02-12-2009 09:24 PM

Very nice idea! :)

rn-nr.com 02-13-2009 06:25 AM

thanks a lot

starman? 02-13-2009 09:01 AM

This sounds exactly like what I need, however the instructions in the download zip are unclear for me.

You say we have to create 2 templates but your txt file says only 1 as far as I can see. Maybe I'm missing it. However my greater concern is; How do you actually go about creating a template. I haven't the first idea. Where do I upload the template to? Please give me a little help. Thanks.

Lynne 02-13-2009 01:51 PM

The text file has instructions to create a template called "socialgroups_messagelist" and a template called "socialgroups_messagelistbit". So, two templates.

To create a template, go to your Style Manager, find the style you want this to be used in (could be multiple styles which means you may have to create them in a couple places depending on how you have your styles set up) and select Add New Template from the dropdown.

miyuki 02-13-2009 02:12 PM

To get all message is good, but I think it would be better to get all new unread messages. Would it be possible to change it that way ?

By the way, thanks for this work :D

Lynne 02-13-2009 02:26 PM

Sorry, I doubt I'll be adding that. The problem on our forum was that users would read the forum, select Mark As Read and then never know if they had social group messages. So, I made this list for them to be able to see all the messages.

Big-K 02-14-2009 04:57 PM

Hi Lynne,

I've become a huge fan of your social group hacks. This one works seamlessly too but the question is how do members link to this? Should there be a link somewhere on the Social Groups landing page?

An unrelated question:
Is there a way to make social groups members list look like the three-columned friends list on the profile page i.e - profile.php?do=buddylist?

Lynne 02-14-2009 05:06 PM

I added the link under the Community Links dropdown. This is what I have in place of just the Social Groups link in that dropdown:

HTML Code:

        <if condition="$show['quick_links_groups']">
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php?$session[sessionurl]do=grouplist">- View All Groups</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/messagelist.php?$session[sessionurl]do=list">- Your Group Messages</a></td></tr>
        </if>

The "Your Group Messages" is the link for this page.

drsli 02-14-2009 09:11 PM

Thank you for this handy function!

Merriweather 03-09-2009 03:11 PM

It appears that the messages are not grouped by which group they are in, just by order of posting? So if I am in 5 groups with 3 discussions each, I am going to have 15 different discussion threads showing their posts all mixed up?

What I was hoping is that it groups by group and then discussion, perhaps with a link to collapse each discussion/group. i.e.:

Group 1 (Collapsible)
-- Discussion 1 (Collapsible)
---- Post
---- Post
---- Post
-- Discussion 2 (Collapsible)
---- Post
---- Post
---- Post

Group 2 (Collapsible)
-- Discussion 1 (Collapsible)
---- Post
---- Post
---- Post
---- Post
---- Post
-- Discussion 2 (Collapsible)
---- Post
---- Post

Group 3 (Collapsible)
-- Discussion 1 (Collapsible)
---- Post
---- Post
-- Discussion 2 (Collapsible)
---- Post
---- Post
---- Post
---- Post
---- Post

etc... Can you describe to me how the mod lists the posts?

Thank you!

ragtek 03-09-2009 03:15 PM

Why you hadn't create a product where the 2 templates are in?*g*

Lynne 03-09-2009 03:20 PM

This was written to simply show the latest posts in all the discussions in all the groups you are a member in. So, it is ordered by date.

Merriweather 03-12-2009 04:59 AM

Can you set the number of latest posts it shows?

Lynne 03-12-2009 02:30 PM

I actually modified this on my site so you may select to see messages from just one group also. And I added in the $vboptions['maxresults'] to use to show only x amount of results (that is the variable set in vboptions > message searching options > max search results to return). I'll post the new version within the next couple of days.

Lynne 03-12-2009 09:27 PM

OK, I uploaded version 1.2 of this:
Quote:

1.2 2009-03-12:
- fully phrased, templates now in product to import.
- added option to view only messages from single group
- used vboptions > Message Searching Options > Maximum Search Results to Return to set maximum results shown
- cached all bbcode templates
- AFTER INSTALL OF PRODUCT, YOU WILL HAVE TO REVERT THE TWO TEMPLATES (socialgroups_messagelist and socialgroups_messagelistbits) IF YOU HAD INSTALLED THIS PREVIOUSLY (or else you will still be using the original templates)
Quote:

Originally Posted by ragtek (Post 1764116)
Why you hadn't create a product where the 2 templates are in?*g*

It is now. I don't know why I didn't before. :cool:

Keesa 03-30-2009 08:48 AM

I am not seeing where they should be able to see this once it is installed?

I also have this hack installed...
https://vborg.vbsupport.ru/showthread.php?t=204335

Could that be the problem?

Lynne 03-30-2009 02:18 PM

It's a new page you will use. You would go to www.yoursite.com/messagelist.php to see the list. If you are wondering where to put a link to it, you can put it anywhere you want. I edited my navbar and put it under the Community Links dropdown.

TheLastSuperman 03-30-2009 02:30 PM

omdl... I cannot believe I never thought to click your profile Lynne :rolleyes: as I saw the "Moderator" title and no Coder/Designer so DUUUUHHHHH on my part and nice mod... will be checking out this week along w/ some of your others... now lol.

S-MAN

Charles_1 04-02-2009 02:20 PM

This mod is really useful, thanks Lynne.

Just one notice - "Message List" is not phrased, it is hardcoded in messagelist.php

Lynne 04-02-2009 02:54 PM

Quote:

Originally Posted by Charles_1 (Post 1782399)
This mod is really useful, thanks Lynne.

Just one notice - "Message List" is not phrased, it is hardcoded in messagelist.php

Whoops! If I do another release on this, I'll be sure to fix that.

bjhuang 04-07-2009 05:07 AM

works fine. but the sql queries have to be improved. it makes a query each time when a message do not have a title.

Lynne 04-07-2009 02:38 PM

Quote:

Originally Posted by bjhuang (Post 1785544)
works fine. but the sql queries have to be improved. it makes a query each time when a message do not have a title.

Yes, I know. I addressed that in this post - https://vborg.vbsupport.ru/showpost....65&postcount=3 I am more than open to a suggestion on how to change it.

Xencored 09-27-2009 03:16 AM

Omg cant belive i missed this mod!!
Installed!
Quote:

Originally Posted by Lynne (Post 1744035)
I added the link under the Community Links dropdown. This is what I have in place of just the Social Groups link in that dropdown:

HTML Code:

        <if condition="$show['quick_links_groups']">
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php?$session[sessionurl]do=grouplist">- View All Groups</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/messagelist.php?$session[sessionurl]do=list">- Your Group Messages</a></td></tr>
        </if>

The "Your Group Messages" is the link for this page.

Hey when i add this to my navbar it sends it crazy and there is no drop down box like you have Lynne

It didnt add it auto for me
Thanks

Lynne 09-27-2009 03:49 AM

That is from the actually dropdown part, not from the actual navbar. In the navbar is the Community Link, and then there are items under that dropdown and those are the lines I added under that dropdown.

Xencored 09-27-2009 02:38 PM

Quote:

Originally Posted by Lynne (Post 1891148)
That is from the actually dropdown part, not from the actual navbar. In the navbar is the Community Link, and then there are items under that dropdown and those are the lines I added under that dropdown.

Ahh right sorry
Ive added the Code and its still not showing

Code:

        <if condition="$show['communitylink'] AND $show['popups']">
        <td class="vbmenu_control"><a id="community" href="$show[nojs_link]#community" rel="nofollow" accesskey="6">$vbphrase[community]</a> <script type="text/javascript"> vbmenu_register("community"); </script></td>
        <else />
          <if condition="$show['memberslist']">
                        <td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
            </if>
    <if condition="$show['quick_links_groups']">
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php?$session[sessionurl]do=grouplist">- View All Groups</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/messagelist.php?$session[sessionurl]do=list">- Your Group Messages</a></td></tr>
        </if>
        </if>

did i add it in the wrong place?
Thanks

Lynne 09-27-2009 03:33 PM

Quote:

Originally Posted by Animemike (Post 1891336)
did i add it in the wrong place?
Thanks

Yeah, that is the wrong place. That isn't where the dropdown items are defined.

Find this:
HTML Code:

    <if condition="$show['communitylink']">
    <!-- community link menu -->

And you should see a div and then a table right there and that is where you would add it.

This is from mine... your's may be different cuz I don't remember if I changed classes or spacing or anything:
HTML Code:

    <div class="vbmenu_popup" id="community_menu" style="display:none;margin-top:3px" align="$stylevar[left]">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr><td class="thead">$vbphrase[community_links]</td></tr>
        <if condition="$show['quick_links_groups']">
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/group.php?$session[sessionurl]do=grouplist">- View All Groups</a></td></tr>
                    <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/messagelist.php?$session[sessionurl]do=list">- Your Group Messages</a></td></tr>
        </if>
more rows...
        </table>
    </div>


Xencored 09-27-2009 03:47 PM

Thansk Lynne all working now :D

unfv 03-08-2010 10:32 AM

Hi Lynne, it would be great to have this as a widget for VB CMS :)

MrRem 03-10-2010 01:39 PM

Installed. Thanks :)

bjhuang 04-11-2010 06:25 PM

to reduce queries:
PHP Code:

        if (!$message['discussiontitle']&&!$discussiontitlecache[$message['discussionid']]) 
        {
            
$title $vbulletin->db->query_first("
                SELECT groupmessage.title as discussiontitle
                FROM " 
TABLE_PREFIX "groupmessage as groupmessage
                JOIN " 
TABLE_PREFIX "discussion AS discussion 
                    ON (discussion.firstpostid = groupmessage.gmid)
                WHERE groupmessage.discussionid = " 
$message['discussionid'] ."
                LIMIT 1
            "
);
            
$message['discussiontitle']=$title['discussiontitle'];
            
$discussiontitlecache[$message['discussionid']] = $title['discussiontitle'];
        }
        else 
$message['discussiontitle']=$discussiontitlecache[$message['discussionid']]; 

Quote:

Originally Posted by Lynne (Post 1742265)
Add? Since it's a totally new page, you don't get added queries to the page. But, it currently has the potential of one small query per message to get the Discussion Name. If you don't want the Discussion name listed, you may comment out the following code in messagelist.php:
PHP Code:

        if (!$message['discussiontitle'])
        {
        
$title $vbulletin->db->query_first("
            SELECT groupmessage.title as discussiontitle
            FROM " 
TABLE_PREFIX "groupmessage as groupmessage
            JOIN " 
TABLE_PREFIX "discussion AS discussion 
        ON (discussion.firstpostid = groupmessage.gmid)
            WHERE groupmessage.discussionid = " 
$message['discussionid'] ."
            LIMIT 1
            "
);
            
$message['discussiontitle']=$title['discussiontitle'];
        } 

And then take out these lines in 'socialgroups_messagelistbits':
HTML Code:

                <div>
                    <span><phrase 1="group.php?$session[sessionurl]gmid=$message[gmid]#gmessage$message[gmid]" 2="$message[discussiontitle]">$vbphrase[discussion_x]</phrase></span>
                </div>



sross 02-12-2011 08:10 PM

Hi, I could really use this for vbull 4.x any plans to port it? Thanks!

Lynne 02-12-2011 10:09 PM

Quote:

Originally Posted by sross (Post 2161898)
Hi, I could really use this for vbull 4.x any plans to port it? Thanks!

No, not until I actually have my live site moved over to 4.x and I am able to test it before releasing it..


All times are GMT. The time now is 07:13 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.01474 seconds
  • Memory Usage 1,863KB
  • 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
  • (6)bbcode_html_printable
  • (3)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete