Marcher Technologies Posted August 6, 2012 Share Posted August 6, 2012 File name: RealStatsSubmitter: Marcher TechnologiesSubmitted: 08/06/2012Category: User and Social EngagementDemo : http://www.marchertech.com/board/stats/Discussion URL : Supported Versions: 2,6,14,17,21Support Info : Support TopicThis Is A Fully-Featured Statistics Application offering At-A-Glance Quick Statistics, In-Depth Statistics By Installed and Enabled Application with an extensible interface to add more applications, and A Clean Ajax-powered Frontend.Control who may view the aplication with groups configuration, including secondaries.The Ability to Cache the results sets processed but *not* the HTML is provided.Disable Plugins at whim.Mobile Skin Support.Control how many items are shown in all 'top' 'feeds' from the 'minimal' 1, to the fairly heavy(without caching) 25.Control Truncation of these statistic 'content' item lengths shown for the application(members blocks are not affected).Translate Tabs Separately from the Application Title, if desired.Translate the H1 tag of 'Tab' pages Separately, if desired.The Application Tab's Dynamic Updating of the title, h1 tag and breadcrumbs without page refresh will be honored in these casesAt this time, Forums, Downloads, Content, Blogs, and Members Statistics Extensions are provided.Stats Include:Forums: Total Posts Total Replies Total Topics Average Posts Per Day Average Replies Per Day Average Topics Per Day Total Categories Total Boards Top Boards By Topics(Respects Permissions)* Top Boards By Replies(Respects Permissions)* Top Topics By Replies(Respects Permissions)* Top Topics By Views(Respects Permissions)* Top Topics By Rating(Respects Permissions)* Top Posters(Respects Permissions)* Members: Most Online Time Most Online Count Total Members Latest Member Average Registrations Per Day Downloads: Total Files Total Categories Total Downloads Average Files Per Day Average Downloads Per Day Latest Author Latest File Top Categories By Files(Respects Permissions)* Top Categories By Views(Respects Permissions)* Top Categories By Downloads(Respects Permissions)* Top Files By Views(Respects Permissions)* Top Files By Downloads(Respects Permissions)* Top Files By Rating(Respects Permissions)* Top Authors By Download(Respects Permissions)* Content: Counts of Database Categories and Records(Respects Permissions)* Top Databases By Submission(Respects Permissions)* Top Categories By Submission(Respects Permissions)* Top Submissions By Views(Respects Permissions)* Top Submissions By Comments(Respects Permissions)* Top Submissions By Rating(Respects Permissions)* Top Authors By Submissions(Respects Permissions)* Blogs: Total Blogs Total Entries Total Comments Average Blogs Per Day Average Entries Per Day Average Comments Per Day Latest Blogger Latest Blog Top Blogs By View(Respects Permissions)* Top Blogs By Comments(Respects Permissions)* Top Blogs By Rating(Respects Permissions)* Top Entries By View(Respects Permissions)* Top Entries By Comments(Respects Permissions)* Top Entries By Rating(Respects Permissions)* Top Bloggers By Entries Gallery 5.0.2+** Total Categories Total Albums Total Images Total Comments Total Views Total Gallery Size Average Albums Per Day Average Images Per Day Average Comments Per Day Average Views Per Day Average Space Used Per Day Top Categories By Albums(Respects Permissions)* Top Categories By Images(Respects Permissions)* Top Categories By Comments(Respects Permissions)* Top Albums By Images(Respects Permissions)* Top Albums By Comments(Respects Permissions)* Top Images By Views(Respects Permissions)* Top Images By Comments(Respects Permissions)* Top Images By Rating(Respects Permissions)* Top Uploaders **You may use this application with a lower Gallery version installed, due to a furl bug, this statistics extension only supports Gallery 5.0.2+ and thus the tab and plug-in file will be disabled on a lower version.* If you do not disable application caching, these will respect the permissions of the user to trigger the cache when pulling result sets for application tabs for the time specified in settings.This does not affect any custom checks or parsing done in templates, merely a minimal necessary data used in the templates from the generated results are stored to be passed back to the templates from cache. View File Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 7, 2012 Author Share Posted August 7, 2012 Wanted to note, given time from customs/other mods, I will add further extensions, that being said, a wee bit of Dev info./extensions/realstats/stats_{app}.php[/CODE] this will check the given application directory first, then this app as fall-back for 'stock' extensions. The class structure is as follows: <?php /** * Real Stats Module for APP * */ class stats_{app} implements iRealStats { protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; protected $memberData; protected $cache; protected $caches; public function __construct( ipsRegistry $registry, $app='core') { if ( ! $this->registry ) { /* Make registry objects */ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); } /* Load extra classes/lang for your app */ } /** * Returns the data for the app landing items * Data should be an array of stats to show * * @return array(stats) */ public function fetchGeneralStats() { } /** * Returns the data for the application tab * Data should be html of stats to show * * @return html stats */ public function fetchDetailedStats() { } } fetchGeneralStats adds statistics to the dashboard and should return a multidimensional array of stats to show, with the keys being the language key(if applicable, you can also use the key to build the full string returned as I do with content databases on the landing) and the values being the statistic. fetchDetailedStats adds an application tab, and must return the entire generated html to be shown as the tab contents when viewing said tab. use one method, both.or Link to comment Share on other sites More sharing options...
Aussie Cable Posted August 7, 2012 Share Posted August 7, 2012 I have a question regarding this app. Can you hide the statistics tab from groups/members? For my community, I would only like to allow super mods and admins to see stats. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 7, 2012 Author Share Posted August 7, 2012 I have a question regarding this app. Can you hide the statistics tab from groups/members? For my community, I would only like to allow super mods and admins to see stats. you can hide the link as that is a stock function of IPB interaction with applications. if you are asking of factually not being allowed to view the page(as in show an error to specific groups instead of the page) I will be adding that shortly. Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 7, 2012 Share Posted August 7, 2012 I bought a modification. Is it possible to shorten the list Top Boards(By Topics) and Top Boards(By Replies) the x position (10 or 20)? Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 7, 2012 Author Share Posted August 7, 2012 I bought a modification. Is it possible to shorten the list Top Boards(By Topics) and Top Boards(By Replies) the x position (10 or 20)? it should be limited to 10, if not i need to tweak that app's plugin further(and would indeed be labelled a bug unnoticed by myself), I am using custom sorting functions on the visible forums array and slicing off the top 10... an ACP configuration area for the various stats is to be implemented in 1.0.1 Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 7, 2012 Author Share Posted August 7, 2012 I bought a modification. Is it possible to shorten the list Top Boards(By Topics) and Top Boards(By Replies) the x position (10 or 20)? Acknowledged, confirmed, fixing(note to self, array_slice is buggy on multi-dimensional arrays). Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 7, 2012 Author Share Posted August 7, 2012 I bought a modification. Is it possible to shorten the list Top Boards(By Topics) and Top Boards(By Replies) the x position (10 or 20)? Fixed, it was in my usage of the function that was flawed, as this adds no new features but is merely a maintenance of the extensions files to WAI, I have elected to simply re-upload the patched files as I plan to hold on the statement of 1.0.1 but could NOT let that deadly of a bug resource-wise stand while I add features, re-upload the files and this bug should be resolved. Link to comment Share on other sites More sharing options...
Matt Rutherford Posted August 7, 2012 Share Posted August 7, 2012 Excellent looking app - any thoughts about analysing users x posts (would love to know the 'dormant members', 'most active members', 'lurkiest members' etc) Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 7, 2012 Share Posted August 7, 2012 Fixed, it was in my usage of the function that was flawed, as this adds no new features but is merely a maintenance of the extensions files to WAI, I have elected to simply re-upload the patched files as I plan to hold on the statement of 1.0.1 but could NOT let that deadly of a bug resource-wise stand while I add features, re-upload the files and this bug should be resolved. Good job, now is ok! This is a great modification! Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 8, 2012 Author Share Posted August 8, 2012 Excellent looking app - any thoughts about analysing users x posts (would love to know the 'dormant members', 'most active members', 'lurkiest members' etc) Yes, but i had to complete a total rewrite of the engine before adding any more statistics :smile: These get QUITE heavy to calculate... as such. Version 1.0.1 Released! Changelog:Rewrote the core extension engine to support caching the result sets for detailed statistics tabs calculated for 30 minutes due to the severe nature of calculating many of these totals. Added Configuration of who may view the application, enabling/disabling said caching mechanisms, reasonable configuration for how many items to pull for the 'top' sections, and global truncation for item titles shown in links. What does this mean to you? you can cache the result sets of these rather... gnarly(looking at you content!!) sorting and counting functions. What does this mean to a developer? <?php /** * Real Stats Module for APP * */ class stats_{app} implements iRealStats { protected $registry; protected $DB; protected $settings; protected $request; protected $lang; protected $member; protected $memberData; protected $cache; protected $caches; public function __construct( ipsRegistry $registry, $app='core') { if ( ! $this->registry ) { /* Make registry objects */ $this->registry = $registry; $this->DB = $this->registry->DB(); $this->settings =& $this->registry->fetchSettings(); $this->request =& $this->registry->fetchRequest(); $this->lang = $this->registry->getClass('class_localization'); $this->member = $this->registry->member(); $this->memberData =& $this->registry->member()->fetchMemberData(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); } /* do NOT Load extra classes/lang for your app here do in methods below */ } /** * Returns the data for the app landing items * Data should be an array of stats to show * * @return array(stats) */ public function fetchGeneralStats() { } /** * Gets the data for the application tab * Data should be array of stats data variables to pass to the html * * @return array(stats) */ public function fetchDetailedStats($limit) { //do stuff heavy, clean the arrays down to only what you use, and always store members with just id and a count if generated, honor the limit unless you add your own setting. return array('databasesbyRecord' => $_topDatabasesbyRecord, 'categoriesbyRecord' => $_topCategoriesbyRecord, 'recordsByView' => $_topRecordsByView, 'recordsByReply' => $_topRecordsByReply, 'recordsByRating' => $_topRecordsByRating, 'topSubmitters' => $topSubmitters); } /** * Returns the html for the application tab * Data should be HTML of stats to show passed either a fresh or cached result set. * * @return html(stats) */ public function returnDetailedStats($data) { return $this->registry->output->getTemplate('realstats_global')->realStatsApp_ccs($data['databasesbyRecord'], $data['categoriesbyRecord'], $data['recordsByView'], $data['recordsByReply'], $data['recordsByRating'], $data['topSubmitters'], $data['truncate']); } } :ph34r: Huge difference resource-wise, not sacking too much in exchange, I hope. Link to comment Share on other sites More sharing options...
Aussie Cable Posted August 8, 2012 Share Posted August 8, 2012 you can hide the link as that is a stock function of IPB interaction with applications. if you are asking of factually not being allowed to view the page(as in show an error to specific groups instead of the page) I will be adding that shortly. Thanks Marcher Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 8, 2012 Share Posted August 8, 2012 I founded small bug ver. 1.0.1: in ACP Dead ACP Link - after approval of changes Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 8, 2012 Author Share Posted August 8, 2012 I founded small bug ver. 1.0.1: in ACP Dead ACP Link - after approval of changes You are saying upon saving the settings, it throws you elsewhere? What IPB version? Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 8, 2012 Share Posted August 8, 2012 You are saying upon saving the settings, it throws you elsewhere? YesWhen I returned ACP>>RealStats all changes are approvedWhat IPB version? 3.3.3 Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 8, 2012 Author Share Posted August 8, 2012 [color=#ff0000]Yes[/color] [color=#ff0000]When I returned ACP>>RealStats all changes are approved[/color] [color=#ff0000]3.3.3[/color] Thanks, typo in the admin module was causing this, should be fixed now in the download. Link to comment Share on other sites More sharing options...
AVSIM.com Posted August 8, 2012 Share Posted August 8, 2012 Robert, great add on as always and it works for us without problems. However, is there a way that I can remove the IP Downloads from the stats system? We have IP Downloads, but it is not something we want to show stats on. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 8, 2012 Author Share Posted August 8, 2012 yes, simply delete /admin/applications_addon/other/realstats/extensions/realstats/stats_downloads.php (note to self, grant ACP controls for that) Link to comment Share on other sites More sharing options...
AVSIM.com Posted August 8, 2012 Share Posted August 8, 2012 (note to self, grant ACP controls for that) You read my mind. Thanks for the fast response. Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 9, 2012 Share Posted August 9, 2012 I installed RealStats 1.0.2. Everything works fine. New features are very useful. I'm waiting for new version and new features :smile:. I want more and more ...... :smile: Congratulations!! Great modification. PS I have a suggestion. Is it possible to do something like this: For 1 - a separate string in the skin for that tab (for example: Overview ) Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 9, 2012 Author Share Posted August 9, 2012 I don't understand 2, I absolutely do understand 1, also I did just realize a need to swap the h1 there on the normal skin to be prepended with the currently viewed tab name, and update mobile to match >_< Working on that, and further statistics now that I have a basis fully rolled out. Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 9, 2012 Share Posted August 9, 2012 For 2 - Leave it as is - no change Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 9, 2012 Author Share Posted August 9, 2012 for 2 i kind of have to do what I said, its not right for those pages to all have the same header tag, you can change this if desired in templates, but stock I do have to implement that. Link to comment Share on other sites More sharing options...
matma4u.pl Posted August 9, 2012 Share Posted August 9, 2012 Next suggestion: data set in that order:tab Forum >> Top Boards(By.....), Top Topics(By .......) new tab Members >> Top Posters (By .....), Top Author (By ......), Top Blogger (By .....) tab Downloads >> Top Files (By ......) etc. tab Blog >> Top Blog (By ....), Top Entry (By ....) It is clearly. What do you think about it? Link to comment Share on other sites More sharing options...
Marcher Technologies Posted August 10, 2012 Author Share Posted August 10, 2012 Would love to add a members tab, in fact, this was attempted before this applcation's initial Release... not happening on this IPB version: http://community.invisionpower.com/resources/bugs.html/_/ip-board/members-list-furl-hungry-r38474 /stats/members/ just goes to the members list. >.< Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.