View Full Version : Mini Mods - Top Groups Module for vBadvanced
Kaelon
06-26-2008, 10:00 PM
What is "Top Groups"?
Top Groups (aka, "Largest Groups") is a module for vBadvanced CMPS (http://www.vbadvanced.com) that will display in a small box the largest social groups in your online community. This is a very simple add-on (hence, its designation as a "Mini-Mod"), and is designed for people who intentionally want to tinker with the source code to play with and optimize their results.
It's my first vBulletin modification in years, and I'm generally a neophyte at this sort of stuff, so please, be gentle. That said, I'm very interested in your feedback and suggestions on how we can improve upon this module in any way, and any advice or lessons you'd like to share from your own coding experiences would be much appreciated. On a final note, the module was inspired by the work that "Oneback" did on the "Recent vB Blogs" module for vBadvanced, and he is owed my deepest thanks.
Finally, if you like this hack and install it, please:
Mark this Add-on as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=183659)
Requirements
vBulletin 3.7.x Series
Social Groups enabled
vBadvanced 3.x SeriesInstallation
Installation is a breeze using vBadvanced's built-in "Download / Upload Module" function in the vBulletin Admin Control Panel. Simply upload/import the attached zipped topgroups.modile file, and you're all done. The .modules file will create the template and the PHP file that you require. You can then activate and position the module in any of your vBadvanced CMPS pages to your heart's content.
Customization
All actual customization is done through the "largestgroups.php" file, which was created during installation in your /forums/module directory. Simply open largestgroups.php in your favorite text editor. There are many ways in which you can customize the output of the module, and because this module is so simple, you can use it as a basic learning tool.
Changing the Number of Top Groups
The default is "5". You can edit the query by changing "LIMIT 5" to "LIMIT X", where X is the number of top groups you'd like to display in your block.
Changing the Forums Path
By default, all links are generated presuming you have installed vBulletin at "/forums" on your site. If you are using a different path, you should search-and-replace all instances of "/forums/" with the proper absolute path. For example, if you installed your forums at your site/domain-root, you would change all instances of "/forums/" to simply "/".
Demonstrations
"Top Guilds" at Aelyria.com (http://www.aelyria.com) (Author's Site)Version History
1.0.0: Initial Release (June 26, 2008)
UncoderMom
06-27-2008, 04:26 AM
Thank you thank you thank you!
INSTALLED
mariannet
06-27-2008, 11:35 AM
Installed and everything but the "Last post by" works.
It does not show the posters name/link
Kaelon
06-27-2008, 12:18 PM
Installed and everything but the "Last post by" works.
It does not show the posters name/link
Do you have actual posts in those social groups, in the actual Social Group Messaging area?
rooban12
06-27-2008, 03:27 PM
look nice man
welldone
tekram
06-27-2008, 04:30 PM
Installed and everything but the "Last post by" works.
It does not show the posters name/link
The same Problem here
Kaelon
06-27-2008, 04:42 PM
The same Problem here
Do you have actual posts in the social groups? If you're using an addon like "Social Forums", that last post will not be displayed, since that would require a separate query.
tekram
06-27-2008, 05:09 PM
Aha ok, all the post before the addon was installed was not showing. New post and allways is up to date :)
thx for this addon
is there a chance to show the date and time on the next line?
Kaelon
06-28-2008, 08:19 PM
Aha ok, all the post before the addon was installed was not showing. New post and allways is up to date :)
thx for this addon
is there a chance to show the date and time on the next line?
Great! Glad to hear it. :)
Captain Tycoon
06-29-2008, 01:17 PM
Works Perfectly! Installed and Marked! Thanks :)
mariannet
06-30-2008, 06:45 AM
I'm using the Socialgroup forum funktion and all socialgroups messages now is in the groups forum, så maybe thats why.
I have just removed the "Last post by" funktion - still find this hack usefull, thanks!
Kaelon
07-02-2008, 01:29 PM
I'm using the Socialgroup forum funktion and all socialgroups messages now is in the groups forum, s? maybe thats why.
I have just removed the "Last post by" funktion - still find this hack usefull, thanks!
The "Last post by" pulls messages only from the Social Group messaging center, not from other add-ons, like Social Forums. So, you'll want to make sure that, even if you have Social Forums up, you also use Social Group messaging.
uneek1
07-09-2008, 02:29 AM
Thanks works great. Although for some reason, I had to change the largestgroups.php from linking to forums to forum...don't know why it used forums.
Thanks for the mod.
Kaelon
07-09-2008, 01:00 PM
Thanks works great. Although for some reason, I had to change the largestgroups.php from linking to forums to forum...don't know why it used forums.
Thanks for the mod.
I'm glad this worked for you well. Yes, I hard-coded in the /forums path, so in the customization notes above, I suggested that people who use a different path change it:
Changing the Forums Path
By default, all links are generated presuming you have installed vBulletin at "/forums" on your site. If you are using a different path, you should search-and-replace all instances of "/forums/" with the proper absolute path. For example, if you installed your forums at your site/domain-root, you would change all instances of "/forums/" to simply "/".
S7rik3R
07-09-2008, 03:05 PM
Thanks works perfectly without any hazzard ...
Kaelon
07-14-2008, 01:11 PM
Thanks works perfectly without any hazzard ...
Excellent. Thanks for installing!
Jon4444
07-22-2008, 05:24 PM
I really like it. Anyway that each forum could have a small picture for it on the list which could be one of the pictures in the group?
ade5675
07-24-2008, 12:41 AM
What am I doing wrong? I get the below error.
I need some help here.
Database error in vBulletin 3.7.2:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO adv_modules
(`0`, `active`, `userperms`)
VALUES
('', '1', '4,6,8,7,2,5,1,3');
MySQL Error : Unknown column '0' in 'field list'
Error Number : 1054
Request Date : Wednesday, July 23rd 2008 @ 06:38:56 PM
Error Date : Wednesday, July 23rd 2008 @ 06:38:56 PM
Script : http://www.sitename/admincp/vba_cmps_admin.php?do=uploadmodule
Referrer : http://www.sitename/admincp/vba_cmps_admin.php?do=download
Username : ade5675
Classname : vb_database
MySQL Version : 5.0.51a-community
Is it possible to adapt this module to show the groups with most recent activity (like the Available Groups block on the social groups page)?
Kaelon
07-28-2008, 03:09 PM
ade5675 - It looks like you have an outdated/modified version of vBaCMPS. Please make sure that you are using the latest version of vBa CMPS; this module was designed to work with vBa CMPS 3.0's Module Import System.
pmkb - Absolutely, but I'm not sure if the proper way to do it would be to add a query (making it two queries), or modify the original query in such a way as to include that information. Any thoughts?
(Also, if you have installed this modification, please mark this add-on as installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=183659) so that I can properly support you.)
I was able to modify a different hack to get what I wanted, so I didn't install your hack here. FYI, this is what I did: https://vborg.vbsupport.ru/showpost.php?p=1586014&postcount=71
ade5675
07-30-2008, 04:33 PM
ade5675 - It looks like you have an outdated/modified version of vBaCMPS. Please make sure that you are using the latest version of vBa CMPS; this module was designed to work with vBa CMPS 3.0's Module Import System.
I am actually using CMPS v3.0.1 so it is kind of weird to see the error. Any ideas ?
Kaelon
08-08-2008, 05:32 PM
I am actually using CMPS v3.0.1 so it is kind of weird to see the error. Any ideas ?
That's really weird. Can you give me a step-by-step description of how you generated the error message you were getting? I'm not able to reproduce it on a clean installation of vB 3.7.2 PL1 and vBa CMPS 3. Thanks!
ade5675
08-10-2008, 03:05 AM
That's really weird. Can you give me a step-by-step description of how you generated the error message you were getting? I'm not able to reproduce it on a clean installation of vB 3.7.2 PL1 and vBa CMPS 3. Thanks!
Note that my forum is in a different directory from the vBadvanced portal.
vBa CMPS: www.mysitename.com
forum: www.mysitename.com/forums/
Just like your installation instructions outlines it. I download the zip file, extract and then went to my vB admincp.
vBa CMPS >> Download / Upload Module >> Browse (under Upload Module) >> selected topgroup module from extracted folder >> select active (Yes) and the style >> clicked submit >> error generated.
Hope it helps.
Kaelon
08-27-2008, 01:44 PM
vBa CMPS >> Download / Upload Module >> Browse (under Upload Module) >> selected topgroup module from extracted folder >> select active (Yes) and the style >> clicked submit >> error generated.
Did you select a specific style, a default style, or a child style? This looks like it may be an issue with the vBa CMPS Module Import System; we may want to check over at vBadvanced.com.
DstrucTIonS
08-28-2008, 12:43 PM
Would be good if the config file was used for the install path.
My vb is installed in "forum" not "forums" ...
had to tweak the file a bit.
Kaelon
08-28-2008, 07:36 PM
Would be good if the config file was used for the install path.
My vb is installed in "forum" not "forums" ...
had to tweak the file a bit.
Right, I mentioned that in the installation instructions in the original post above.
Changing the Forums Path
By default, all links are generated presuming you have installed vBulletin at "/forums" on your site. If you are using a different path, you should search-and-replace all instances of "/forums/" with the proper absolute path. For example, if you installed your forums at your site/domain-root, you would change all instances of "/forums/" to simply "/".
How do you think I could make it easier? Maybe insert a single $forumdir variable?
ade5675
08-30-2008, 01:56 AM
Did you select a specific style, a default style, or a child style? This looks like it may be an issue with the vBa CMPS Module Import System; we may want to check over at vBadvanced.com.
Yes, I specified the default style and still get the error. Infact I followed the instructions to the book.
djxcee
11-04-2008, 02:21 PM
Installed and working great :).
Will it be possible to show random groups instead of the top groups?
jl255
01-23-2009, 01:55 AM
nice one. wld install it if it showed the group logo too :)
htscpl
03-08-2009, 03:35 PM
I had downloaded this mod and forgot about it. Works great sorry about the slow response. Thanks for your work on this one.
** INSTALLS **
CSS59
12-14-2011, 02:06 AM
do we have this updated for vb4?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.