This module will add some additional functionality in views. You can see the record count in views header/footer if you have chosen pager. You will see record count option as well when you edit the view.
Default message region is footer. You can change it as well

Project page and Git repository

You can find the module in my sandbox at http://drupal.org/sandbox/ankitchauhan/1427124. You can clone the repository with the following command:

git clone --branch 6.x -1.x ankitchauhan@git.drupal.org:sandbox/ankitchauhan/1427124. git views_record _count

Drupal Version - currently only for 6.x

Reviewed the modules and themes
http://drupal.org/node/1437646#comment-5593542
http://drupal.org/node/1432692#comment-5593564
http://drupal.org/node/1432042#comment-5593622

http://drupal.org/node/1439458#comment-5598204
http://drupal.org/node/1439458#comment-5598680
http://drupal.org/node/451000#comment-5396876

http://drupal.org/node/1444468#comment-5618950
http://drupal.org/node/1424990#comment-5619164
http://drupal.org/node/1390218#comment-5625406

CommentFileSizeAuthor
#18 view_record_count.txt1.45 KBJalandhar

Comments

ankitchauhan’s picture

Issue summary: View changes

updating description

misc’s picture

Status: Needs review » Needs work

Welcome with your application.

Why not do this as a patch of Views? Why is a module needed? Have you raised an issue on this in the issue queue of Views?

ankitchauhan’s picture

@MiSc - Thanks MiSc
for suggesting me this as patch.

misc’s picture

So, should we close this application?

ankitchauhan’s picture

No Misc
I am looking forward to add some more functionality in it

misc’s picture

So, what is the status of this application, postponed?

ankitchauhan’s picture

I am working on that. Probably tomorrow I'll be in condition to submit it again for review. So i think status could be needs work.

ankitchauhan’s picture

hi Misc
I've added another functionality named as Record Count Region (Header, Footer).

So now the module has 2 functionality..
1. Display Record count
2. Choose Region for Record Count message (default is footer).

ankitchauhan’s picture

Issue summary: View changes

updating description

ankitchauhan’s picture

Issue summary: View changes

reviewing modules

ankitchauhan’s picture

Issue tags: +PAreview: review bonus

Applying for PAReview bonus

klausi’s picture

Don't forget to set the status to "needs review" if you want to get a review.

ankitchauhan’s picture

Status: Needs work » Needs review

Thanks @klausi

tyler.frankenstein’s picture

Status: Needs review » Needs work

I ran your code through PAReview, it came back with the following results:

http://ventral.org/pareview/httpgitdrupalorgsandboxankitchauhan1427124git

Please fix the problems listed by PAReview.

As for a manual review of the module, I installed the module on a fresh Drupal 6.24 install on localhost and used Devel generate to make some dummy content and comments. I then setup a view to display a list of content, and another view to setup a list of comments. Both were configured to have full paging (and I see that is where the settings live for this module). I then played around with the 'Display Record Count' and 'Choose Region for Record Count Message' (by the way, there is a spelling error for the word 'record').

First, I would recommend that the 'Display Record Count' and 'Choose Region for Record Count Message' should have default values selected, i.e. the 'Display Record Count' should default to 'No' and the 'Choose Region for Record Count Message' should default to header or footer.

I created a Page display for each of the views with a path of /content and /comments to see how this would look on a page. The displayed record count worked as expected.

However, I noticed that if I setup some overridden values on the page display and revisit the page, the page uses the default settings for 'Display Record Count' and 'Choose Region for Record Count Message', it doesn't use the overridden values. I setup some extra overridden values on 'Items per page' and 'Fields' just to make sure it wasn't views that was bugging out, which it wasn't. So it looks like the module needs to pay attention to overridden values and not grab the view's default display settings.

I did not test for the following situation, but it deserves a test before this module could be released.... what about other themes? (I just tested with Garland) What if a theme doesn't have a header/footer region (I know most themes would, but just in case a theme doesn't have those regions)? Perhaps the regions radio button list should be dynamically generated, that way users could select whatever region they would like.

Other than the items mentioned, this is a nice simple module and it does exactly what the name says it does.

ankitchauhan’s picture

Status: Needs work » Needs review

all http://ventral.org/pareview test results resolved. No error/warning found by this automated script.

ankitchauhan’s picture

Issue summary: View changes

reviewed module

misc’s picture

Great. But, still, this project is too short to approve you as git vetted user. But you could still apply for have this promoted as a single project. Also you should document your functions. The comments does not say so much at this point. How about the issue that was in comment #11 about overridden values?

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus +PAreview: single application approval

manual review:

Otherwise RTBC to me for a single projet promote. Removing the review bonus tag, if there are still changes required you can add it again if you have done another 3 reviews of other projects.

ankitchauhan’s picture

Status: Reviewed & tested by the community » Needs review

hi tyler

as you have posted the comment #11, thanks for guiding me
I have made some changes in module

  1. correction of spelling error for the word 'record'
  2. 'Display Record Count' and 'Choose Region for Record Count Message' have default values No and footer respectively.

i am working on comment #11 about overridden values.
thank you guys for guiding and motivating me.

ankitchauhan’s picture

Hi guys

I've added overridden values functionality. Please check it, if there is any problem please let me know.

thanks.

ankitchauhan’s picture

Applying for PAReview bonus

ankitchauhan’s picture

Issue summary: View changes

updating description

Jalandhar’s picture

Status: Needs review » Needs work
StatusFileSize
new1.45 KB

Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards).

klausi’s picture

Status: Needs work » Needs review

That minor issues by automated review tools should not block a manual review.

ankitchauhan’s picture

Hi Jalandhar

thanks for you comment.

I've fixed the style issues

ankitchauhan’s picture

Hi klausi

i didn't get it. please guide me.

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus +PAreview: single application approval

Review of the 6.x-1.x branch:

  • Drupal Code Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: ...ites/all/modules/pareview_temp/test_candidate/views_record_count.module
    --------------------------------------------------------------------------------
    FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
    --------------------------------------------------------------------------------
     58 | ERROR | Missing parameter type at position 1
     61 | ERROR | Data type of return value is missing
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

manual review:

  • "format_plural($my_total, '@count record', '@count records') . ' found.": the word "found" should also be included in the translation.
  • views_record_count_form_alter(): why do you need a switch() here if you check only one case? Use if() instead.
  • Project page is still too short.

Otherwise this looks still RTBC to me for a single project promotion. Please don't remove the "single project promote" tag.

Also you did not review other project applications, so removing review bonus tag (please read #1410826: [META] Review bonus again).
What guidance do you need?

klausi’s picture

Issue summary: View changes

reviewing module

ankitchauhan’s picture

Issue summary: View changes

reviewing project

jthorson’s picture

klausi,

I think the comment in #21 was with regards to not understanding your comment in #19 (i.e. I suspect a language issue).

ankitchauhan,
The comment in #19 was for Jalandhar ... but fix the items in #22. :)

jthorson’s picture

Issue summary: View changes

reviewing project

ankitchauhan’s picture

Issue tags: +PAreview: review bonus

@klausi and @jthorson

hi guys

I have fixed issues arise in comment #22. Please reviews it if there is any issue please let me know;

jthorson’s picture

Issue tags: -PAreview: review bonus

Removing PAReview: review bonus tag.

This is reserved for people doing deep-dive 'manual reviews' of other projects, not simply commenting on singular issues. As directed before, please review #1410826: [META] Review bonus.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

The project Views Record Count has been promoted to a full project.

Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.

git remote set-url origin ankitchauhan@git.drupal.org:project/views_record_count.git

ankitchauhan’s picture

Hey tim

I've updated the URL of remote repository as per given instruction.

thanks

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

reviewing project