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 - Social Group Statistics in Categories Listing (https://vborg.vbsupport.ru/showthread.php?t=204581)

vbboarder 02-06-2009 10:00 PM

Social Group Statistics in Categories Listing
 
1 Attachment(s)
Group Statistics in Categories Listing
This mod adds 10 features to social groups.

The categories listing page is probably the most bland VB page, only showing the category name and # of groups. This mod will make that page much more interesting and visited by adding statistics per category and overall. You can specify how many groups will be shown in each category. This mod is fully phrased. 10 features are added:
  • Show statistics for newest groups (last created).
  • Show statistics for active groups (last updated).
  • Show statistics for popular groups (most members).
  • Show statistics for photogenic groups (most pics).
  • Show statistics for talkative groups (most messages).
  • Show statistics for talkative groups (most discussions).
  • Show group icon next to unread groups. You can also specify to never show, always show, or alternate show the group icon.
  • Group search input field provided for convenient searching.
  • Show the overall group statistics in forumhome at 3 different places.
  • Show the overall group statistics in VBA blocks; links will work for both VBA installed inside and outside forum directory.
Important Notes:
  • The group statistics in VBA blocks will not show statistics for most discussions to allow cleaner presentation in 3-columns layout.
  • 2-3 queries are required for the group statistics (3 if you enable marking unread groups with icons). If you installed version 1.0, the 2 manual edits are no longer required in version 1.1 in order to achieve 2-3 queries total.
  • This mod requires VB 3.8+ and MySql 4.1+.
Installation:
  • Upload the files to their respective folders in your forum directory.
  • Import the product at Manage Products page and allow overwrite.
  • Go to VB Options > Categories? Group Statistics to set your settings.
  • Optional: to display the tag cloud in vbAdvanced, go to VBA CMPS > Download / Upload Modules > in ?Module to Upload?, select ?groupstats_vba.xml? (in the zip file), and click ?Submit?. Then go to VBA CMPS > Default Settings > Main Options > add to ?Portal Output Global Variables?:
Quote:

groupstats
.
Version History:
1.0.0 - Initial Release.
1.0.1 - fixed table prefix bug.
1.1.0 - upgraded mod to not require file edits to reduce queries.
1.1.5 - fixed a minor bug. Added RTL language support.

Notes:
1. I read all posts for this mod so feel free to post any comments or suggestions.
2. You will be notified by e-mail for future updates if you click ?Marked as Installed.? If you find this mod useful, remember to click ?Nominate for MOTM.?


vbboarder 02-07-2009 07:15 PM

Fixed the TABLE_PREFIX bug in v1.0.0. Reupload all files and reimport the 1.0.1 product xml file with allow overwrite.

Huy Ho?ng 02-08-2009 06:41 AM

Import the file groupstats_vba.xml, you place?

alehawk 02-08-2009 04:02 PM

It doesnt work

Database error in vBulletin 3.8.0:

Invalid SQL:
SELECT COUNT(*) AS groups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.visible DESC, club.name) AS CHAR(255)) AS postgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.discussions DESC, club.name) AS CHAR(255)) AS topicgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.picturecount DESC, club.name) AS CHAR(255)) AS picsgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.members DESC, club.name) AS CHAR(255)) AS hotgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.dateline DESC, club.name) AS CHAR(255)) AS newgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.lastupdate DESC, club.name) AS CHAR(255)) AS activegroups
FROM socialgroup AS club WHERE club.groupid IS NOT NULL;

MySQL Error : Table 'adforop_000032.socialgroup' doesn't exist
Error Number : 1146
Request Date : Sunday, February 8th 2009 @ 02:56:10 PM
Error Date : Sunday, February 8th 2009 @ 02:56:10 PM
Classname : vB_Database
MySQL Version : 5.0.32-Debian_7etch8-log

For some reason didnt add the table prefix to the query, it will query from table socialgroup instead of myprefix_socialgroup.

Can that be fixed?

RvG2 02-08-2009 04:42 PM

very very nice mod! :)

thanks for sharing

kleinschwanz 02-08-2009 08:58 PM

However... when I enable this hack it shows me following:

Code:

Database error in vBulletin 3.8.1:

Invalid SQL:
SELECT groupid, name, visible, discussions, picturecount, members, lastpost, lastupdate,
dateline AS createtime FROM socialgroup WHERE groupid IN ();

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2
Error Number  : 1064

It is not the edit, as I haver undone it with the editor... but the failure still showed up. I can only browse index.php when the mod is disabled... I guess this is not what you wanted...

PakFuse 02-09-2009 12:10 AM

I am getting a very similar error ... except that my MySQL version is 5.0.51a-log

I first installed noedit version and had to uninstall it due to this error.

I then, installed 2edit version and edited the group.php as advised; same error...

I have disabled the MOD but if this can be fixed or pointed out why such an error is occuring, that would be a great help.


Quote:

Originally Posted by alehawk (Post 1737835)
It doesnt work

Database error in vBulletin 3.8.0:

Invalid SQL:
SELECT COUNT(*) AS groups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.visible DESC, club.name) AS CHAR(255)) AS postgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.discussions DESC, club.name) AS CHAR(255)) AS topicgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.picturecount DESC, club.name) AS CHAR(255)) AS picsgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.members DESC, club.name) AS CHAR(255)) AS hotgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.dateline DESC, club.name) AS CHAR(255)) AS newgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.lastupdate DESC, club.name) AS CHAR(255)) AS activegroups
FROM socialgroup AS club WHERE club.groupid IS NOT NULL;

MySQL Error : Table 'adforop_000032.socialgroup' doesn't exist
Error Number : 1146
Request Date : Sunday, February 8th 2009 @ 02:56:10 PM
Error Date : Sunday, February 8th 2009 @ 02:56:10 PM
Classname : vB_Database
MySQL Version : 5.0.32-Debian_7etch8-log

For some reason didnt add the table prefix to the query, it will query from table socialgroup instead of myprefix_socialgroup.

Can that be fixed?


kleinschwanz 02-09-2009 12:18 AM

I guess it can... if oyu have a new install create at least one group and then enable the product again... it worked for me

PakFuse 02-09-2009 12:38 AM

^ tried that, got the following error:

Database error in vBulletin 3.8.1:

Invalid SQL:
SELECT COUNT(*) AS groups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.visible DESC, club.name) AS CHAR(255)) AS postgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.discussions DESC, club.name) AS CHAR(255)) AS topicgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.picturecount DESC, club.name) AS CHAR(255)) AS picsgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.members DESC, club.name) AS CHAR(255)) AS hotgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.dateline DESC, club.name) AS CHAR(255)) AS newgroups,
CAST(GROUP_CONCAT(club.groupid ORDER BY club.lastupdate DESC, club.name) AS CHAR(255)) AS activegroups
FROM socialgroup AS club WHERE club.groupid IS NOT NULL;

MySQL Error : Table 'pakfuse_vbulletin_011409.socialgroup' doesn't exist
Error Number : 1146
Request Date : Sunday, February 8th 2009 @ 09:38:12 PM
Error Date : Sunday, February 8th 2009 @ 09:38:12 PM
Script : [url of my forum]
Referrer : [URL of the group I created]
IP Address :
Username :
Classname : vB_Database
MySQL Version : 5.0.51a-log

vbboarder 02-09-2009 01:42 AM

Sorry guys about the Sql error. There were 3 queries where I forgot to prefix the name of the table with TABLE_PREFIX. This error does not affect users who don't use table prefixes. I think I caught all the prefix problems now. The zip files were updated.

To Update: For both versions of this mod, reupload all files to your forum directory AND reimport the product xml file with allow overwrite.


All times are GMT. The time now is 06:47 AM.

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.01025 seconds
  • Memory Usage 1,751KB
  • 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_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
  • (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