CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership dashboard and new members vs. renewals
Pages: [1]

Author Topic: Membership dashboard and new members vs. renewals  (Read 853 times)

sjthespian

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 3
    • The League of Professional System Administrators
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Membership dashboard and new members vs. renewals
December 08, 2010, 05:04:14 pm
We really need to be able to track new and renewed members separately, and I think the easiest way for me to do this would be to have a custom memberbership dashboard.  Is this even possible without modifying the CiviCRM code base?  (i.e. is it possible to create custom dashboards like I can create custom reports?)  I am assuming I can modify CRM/Member/Page/DashBoard.php and templates/CRM/Member/Page/DashBoard.tpl, but of course then I would have to modify them all over again any time I upgrade.

I could also build a custom report for this (I think), but it would be nice to have it as a dashboard instead of a report.  Does anyone have any other suggestions?

Basically what I am trying to end up with is something that looks a lot like the current dashboard, I was thinking something like:

Members by TypeNovember – New/Renew (Last Month)December – New/Renew (MTD)2010 – New/Renew (YTD)Current #
Individual45/20050/180578/28733427
Student18/4612/32189/397453
Totals (all types)63/24662/212767/32703280

Thoughts?
Dan Rich <drich@lopsa.org>
    Director, LOPSA - http://lopsa.org/

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Membership dashboard and new members vs. renewals
December 09, 2010, 03:04:07 am
Displaying any report instance data within CiviCRM is very easy, I would like give an little example

Following snippet will display membership summary instance data ( instance id: 9 ) on membeship dashboard page.
Code: [Select]
Index: templates/CRM/Member/Page/DashBoard.tpl
===================================================================
--- templates/CRM/Member/Page/DashBoard.tpl (revision 31142)
+++ templates/CRM/Member/Page/DashBoard.tpl (working copy)
@@ -24,6 +24,7 @@
  +--------------------------------------------------------------------+
 *}
 {* CiviMember DashBoard (launch page) *}
+<div id='reportdata' class='hiddenElement'></div>
 <h3>{ts}Membership Summary{/ts} {help id="id-member-intro"}</h3>
 <table class="report">
     <tr class="columnheader-dark">
@@ -93,3 +94,16 @@
     </div>
 {* /if *}
 {/if}
+
+{literal}
+<script type="text/javascript">
+ var dataURL = {/literal}"{crmURL p='civicrm/report/instance/9' q='reset=1&snippet=4&section=2' h=0 }"{literal};
+  cj.ajax({
+         url: dataURL,
+         success: function( content ) {
+    cj('#reportdata').show( ).html( content );
+ } 
+ });
+
+</script>
+{/literal}

like this, using few line of code  you can put any instance data anywhere within CiviCRM.
Just need to get report instance data by calling url, civicrm/report/instance/<instance id>?reset=1&&snippet=4&section=2.

If u want flashchart format of result, u can add  parameter in url, charts=<chart type>, (chart type= barChart, piaChart ) but for this report should support that chart type.

Cheers,
Rajan


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership dashboard and new members vs. renewals

This forum was archived on 2017-11-26.