Social Groups for XenForo [Paid] [Deleted]

Sure, I would appreciate it. Sorry yo had to do that.

No Problem:

Add to function getSteps()

PHP:
'rebuildgroups' => array(
'title' => new XenForo_Phrase('Rebuild Group Information'),
'depends' => array( /*'groups', 'threads', 'posts'*/ )
)

and finally:

PHP:
/**
* This will rebuild Group Information
*
* @param int $startIndex at which to start the import
* @param array $optionsAny options that were set for the step
* @return array
*/
public function stepRebuildGroups($start, array $options)
{       
                $options = array_merge(array(
'limit' => 5,
'max' => false
), $options);
 
$db = XenForo_Application::getDb();
if ($options['max'] === false)
{
$options['max'] = $db->fetchOne("SELECT MAX(group_id) FROM xfa_group");
}
 
// pull threads
$groups = $db->fetchAll($db->limit('
SELECT * FROM xfa_group thread
WHERE group_id > ' . $db->quote($start) . '
ORDER BY group_id
', $options['limit']
));
if (!$groups)
{
return true;
}
 
XenForo_Db::beginTransaction();
 
$next = 0;
$total = 0;
 
foreach ($groups AS $group)
{
$next = $group['group_id'];
 
$threads = $db->fetchOne("SELECT COUNT(thread_id) FROM xfa_group_thread WHERE group_id = ?", $group['group_id']);
 
$replies = $db->fetchOne("SELECT COUNT(post_id)
                                                  FROM xfa_group_thread t,
                                                      xfa_group_post p
                                                  WHERE t.group_id = ?
                                                  AND t.thread_id = p.thread_id", $group['group_id']);
 
$last_thread_id = $db->fetchOne("SELECT MAX(thread_id)
                                                        FROM xfa_group_thread
                                                        WHERE group_id = ?", $group['group_id']);                       
 
                        $postinfo = $db->fetchRow("SELECT p.post_id, p.user_id, u.username
                                                  FROM xfa_group_post p
                                                  LEFT JOIN xf_user u ON u.user_id = p.user_id
                                                  WHERE p.thread_id = ? ORDER BY post_id DESC", $last_thread_id);         
 
$members = $db->fetchOne("SELECT COUNT(member_id)
                                                  FROM xfa_group_member
                                                  WHERE group_id = ?", $group['group_id']);
                           
$db->query("UPDATE xfa_group
                                    SET group_thread_count = '" . $threads . "',
                                        group_reply_count  = '" . $replies . "',
                                        last_post_date    = '" . ($last_thread_id != null ? $last_thread_id : 0) . "',
                                        last_post_id      = '" . (isset($postinfo['post_id']) ? $postinfo['post_id'] : 0) . "',
                                        last_post_user_id  = '" . (isset($postinfo['user_id']) ? $postinfo['user_id'] : 0) . "',
                                        last_post_username = '" . (isset($postinfo['username']) ? $postinfo['username'] : '') . "',
                                        members_total      = '" . $members . "'
                                    WHERE group_id = ?", $group['group_id']);
                       
$total++;
}
 
XenForo_Db::commit();
 
$this->_session->incrementStepImportTotal($total);
return array($next, $options, $this->_getProgressOutput($next, $options['max']));               
        }

I'll add the group icons to the list, I need to revisit vBulletin to remember whether they were stored in filesystem/database.

Images are stored in this filepath at my forum (this is not the original vBulletin filepath):

I already have a script for the icons but it is definitely not for public consumption (hardcoded server paths, etc)
Can I have it anyway? Will modify it for my needs. So I do not have to write it completely by myself.

Regards

Thomas
 
It's good a addon but I don't like this thread style =/ is it possible switches to classic forum thread in group?

1.webp
 
It would be good to have some sort of method to invite members to a group via email / facebook (for public and invite only groups)
People that create groups often might want to invite users to join. Either existing members on the forum, or members they know via email / facebook
Chris Deeming has an inviter add-on, it doesn't need to be as fully functional as that... it could even integrate with it.

An option to turn off the group icons in the avatar would be good too
It looks a bit garish when users have extra graphics in their avatar. It might be nicer if they just had a text link in their avatar... it would be good to have the option link/graphic

Belongs to groups:
* Business Start Ups
* Uni Students
* Web designers
etc... (with a limit on the number that are listed)
+ <4 other groups>

An Option To Private Message Everyone in the group
It would be good if there was a permissions based option for group owners to start a conversation with everyone in the group (not just threads). This would be quite simple to do, basically the functionality is almost there, as long as the user has permissions, send the users to the conversation link:

http://xenforo.com/community/conversations/add?to=Rigel Kentaurus

But you'll need to look at XenForo_ControllerPublic_Conversation::actionAdd to send an array of users for everyone in that group (except your self), and it should be permissions (for group owners?), to prevent spammers making use of this.
 
It would be good to have some sort of method to invite members to a group via email / facebook (for public and invite only groups)

There is already an invite on the site, that sends an alert. Via Facebook is tricky because it requires better FB integration than what XF has, but via email should be doable. I don't consider this on top of my list, though.


An option to turn off the group icons in the avatar would be good too

You can edit the template. I think I might change the default to only icons since from vBulletin days it no longer looks good, but nothing prevents you from going and editing the xfa_groups_usertitle template

An Option To Private Message Everyone in the group

You would still run on the limit imposed by XenForo about how many people you can start a conversation with.
Not impossible to do, though.



I took a note of your suggestions, my backlog of suggestions is big, though, so I might not get to these in a while (as to set the expectations straight), even so I appreciate the suggestions, and I am sure it is also an opportunity for other people to even do it themselves (even better if they contribute it back).
 
Hi RK,

I am getting a lot of crawl errors in Google Webmaster Tools, all of them are a particular thread with the "copy-to-group-overlay" directory at the end. I would write something in my robots.txt file, but because the /copy-to-group-overlay/ is nested in an area that I don't want to block, I am not sure how to do so without blocking all my content.

Here is an example, they are all similar to this:

http://www.hackslashrepeat.com/threads/what-did-you-achieve-in-game-today.1874/copy-to-group-overlay
 
Hi RK,

I am getting a lot of crawl errors in Google Webmaster Tools, all of them are a particular thread with the "copy-to-group-overlay" directory at the end. I would write something in my robots.txt file, but because the /copy-to-group-overlay/ is nested in an area that I don't want to block, I am not sure how to do so without blocking all my content.

Here is an example, they are all similar to this:

http://www.hackslashrepeat.com/threads/what-did-you-achieve-in-game-today.1874/copy-to-group-overlay
Funny, I just fixed this yesterday, but I am not yet ready to release an update for groups.
If you want to fix it manually for now, on the template "xfa_groups_thread_tools"

Set it to this:
Code:
<xen:if is="{$visitor.user_id} > 0">
    <div id="cz-move-to-group" style="display: none">
        <a href="{xen:link 'threads/copy-to-group-overlay', $thread}" class="OverlayTrigger">{xen:phrase cz_groups_copy_thread_to_group}</a>
    </div>
</xen:if>

That will hide it from the Google Crawler bot.
 
Funny, I just fixed this yesterday, but I am not yet ready to release an update for groups.
If you want to fix it manually for now, on the template "xfa_groups_thread_tools"

Set it to this:
Code:
<xen:if is="{$visitor.user_id} > 0">
    <div id="cz-move-to-group" style="display: none">
        <a href="{xen:link 'threads/copy-to-group-overlay', $thread}" class="OverlayTrigger">{xen:phrase cz_groups_copy_thread_to_group}</a>
    </div>
</xen:if>

That will hide it from the Google Crawler bot.
Cheers!
 
I'm having a few issues with it on my site.

One,

There seems to be no box to type a description as seen in this picture.

Screen Shot 2013-04-23 at 7.57.12 AM.webp

Two,

Whenever I click on upload an avatar or tile or just try to save, it just loads forever & nothing ever comes up.
 
This is the second time somebody mentions this issue. I am using the default XenForo Editor, I really wonder if it is conflicting with something else.
Please re-upload all the PHP files into library. There is a "feature" in XenForo in which if the view is not found (a file missing in the ViewPublic directory) it will still work but with weird errors like this
 
This is the second time somebody mentions this issue. I am using the default XenForo Editor, I really wonder if it is conflicting with something else.
Please re-upload all the PHP files into library. There is a "feature" in XenForo in which if the view is not found (a file missing in the ViewPublic directory) it will still work but with weird errors like this

Just reuploaded everything & it didn't fix itself.
 
anything come from this? still having the issue.
I haven't been able to reproduce it locally, sadly
I have not given up, but I only had a couple hours to work with add-ons over the weekend

I really wonder if this is the tinymce not initializing. I'll keep this posted as soon as I find something.
 
Aside from manually changing each instance of the word 'Groups' to 'Guilds', is there an easier way to accomplish this?
I'd like to use the plugin (it's already installed) for guilds for my server.
 
Aside from manually changing each instance of the word 'Groups' to 'Guilds', is there an easier way to accomplish this?
I'd like to use the plugin (it's already installed) for guilds for my server.
Untested, but this would theoretically work ...

You can do an export of the language, just for the phrases on the add-on
Open the xml file in our favorite text editor and replace "group" for "guild"
re-import
 
Top Bottom