The module will allow Developers and Site builders to specify callback function in Views to generate titles dynamically for display types like Page, Block, Content Pane.
My project page can be found here: https://www.drupal.org/sandbox/nikunjkotecha/2693817
The git clone command would be:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/nikunjkotecha/2693817.git views_title_callback
This is my first project that I am actually submitting to the Drupal world so I have no references. Any comments, suggestions, or advice is welcome.
Comments
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxnikunjkotecha2693817git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
nikunjkotechaRefactored code, only class name errors left in pareview.sh report which I am assuming are not valid since it is asking for Camel case in D7.
Removed LICENSE.txt, it will be added by drupal.org packaging automatically.
Comment #4
th_tushar commented@nikunjkotecha, first of all thanks for contribution!
Here is my assumptions on your code after manual review:
The code looks fine. Will check the functionality of the module after installation.
Adding Pareview: Single Project Promote tag.
Thanks again!!
Comment #5
klausi@th_tushar: I think you forgot to change the status. Is there any blocker left after your review or is this now RTBC?
Comment #6
nikunjkotechaThanks Tushar for the review and suggestion, I have added hook_help now to display the help on module overview page.
Also, about the size and limitation, I understand communities decision to have some minimum amount of code and I'm fine to have this promoted alone without the permission to do it myself. The functionality as you can see doesn't require too much of code and I found this really helpful as I have faced this problem in multiple projects, which triggered me to create a separate project for it.
Thanks again for your time reviewing this.
Comment #7
th_tushar commented@klausi,
I didn't change to RTBC, as I need to install and check the module functionality.
Comment #8
klausi@th_tushar: that's nice if you want to do that, but not absolutely necessary. If you are confident from your code review that the applicant knows what they are doing and there are no security issues jumping out, then an RTBC is fine.
Comment #9
th_tushar commentedHI @nikunjkotecha,
I have installed your module to check the functionality, the module got installed without any errors.
But the functionality of the module was not working. In views configuration, I have given the custom callback function written in my custom module, saved the view. But when accessed the view, the custom title callback wasn't being called. Also when the callback didn't exists, there may be a PHP Fatal error which will break the site. This should also be handled.
While manual code review, I found that the
$emptyvariable is being assigned a value and immediately being overridden by the boolean value. Please check the below code.Changing the status to "Needs work". Please check above issues and mark the status back to "Needs review".
Comment #10
nikunjkotechaHi Tushar,
Can we chat or something to check the issue?
I've made a commit after removing $empty part, let me know best possible way to discuss about why it's not working for you. I'll try and create a demo of this and post URL in module page and here tonight.
Comment #11
nikunjkotecha@Tushar,
I have created a custom module and hosted on Github
l have created a demo site and used this module on the site to demonstrate use of the function.
Change the filter of Tag on the site to see change in the title.
Let me know.
Comment #12
th_tushar commentedHi @nikunjkotecha,
Its working in your demo site. But not working in my drupal installation. Its a new drupal instance with just views module and your module installed. Will check once again!
And also there is a documentation https://www.drupal.org/node/1176080 demonstrating the views custom title.
Please have a look. Your module also require a additional custom module in case of any custom module not available for a custom callback function. We can use a Drupal Views hook function which will eliminate the use of your module.
Comment #13
nikunjkotechaHi Tushar,
Thanks for your time and going to the very depth. As mentioned in the project description on https://www.drupal.org/sandbox/nikunjkotecha/2693817, this module is to reduce the number of implementations of hook_views_pre_render() and increase performance. Imagine a site with 40 different view blocks and 20 odd modules to achieve this (I'm having this scenario and I'm sure many big sites will have this). I have used the same logic as mentioned in the reference link you have shared, in fact using this logic since many of my projects. But in my current one, designer had made the titles dynamic on most of the cases and I had to add many conditions + implement the hook in multiple modules. To reduce that and taking inspiration from views_access_callback and cpv modules, I decided to create a utility module and contribute it back to Drupal.
About requiring another custom module, yes we will need to have this + a custom module to define the callback function but in majority of the cases we will have at-least one custom module, correct? If it's just a small site, for sure we can avoid this module and have the one custom module to implement the hook.
Hope the logic and intention are clear now. Let me know if there is any more query and I'll be happy to add more detail to it.
Again, I really appreciate the efforts that you are spending in the community and ensuring that community keeps growing.
Thanks,
Nikunj
Comment #14
nikunjkotechaComment #15
th_tushar commented@nikunjkotecha,
The intention is not to block the application but to suggest the workarounds for the module. If you still want to promote it to full project, we can do that for you.
Changing the status to RTBC.
Thanks for your contribution again!!
Comment #16
nikunjkotechaThanks Tushar, that will be great. Also, did it work for you? Will it be possible to push the code in github or somewhere for me to check? I might have missed some scenario.
Again, this is a utility module and as mentioned in the description it is based on the workaround and enhances the usability of the workaround.
Few things to add on top of description:
Hope this helps.
Comment #17
PA robot commentedProject 1: https://www.drupal.org/node/2701025
Project 2: https://www.drupal.org/node/2693841
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #18
nikunjkotechaUpdating it back to RTBC since this is having a
PAReview: Single project promoteand I'm hoping someone will be able to promote this soon.Comment #19
PA robot commentedProject 1: https://www.drupal.org/node/2701025
Project 2: https://www.drupal.org/node/2693841
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #20
avpaderno