Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2015 at 09:55 UTC
Updated:
19 Jan 2016 at 14:54 UTC
Jump to comment: Most recent
Comments
Comment #2
hmdnawaz commentedComment #3
PA robot commentedWe 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 #4
boromino commentedAutomated Review
Pareview: The last commit message is just one word, you should provide a meaningful short summary what you changed.
Coder: No problems found.
Manual Review
Individual user account
Yes
No duplication
Yes: There is https://www.drupal.org/project/read_more for Drupal 7. But it only seems to allow for system wide customization.
Master Branch
Yes
Licensing
Yes
3rd party assets/code
Yes: No 3rd party items used.
README.txt/README.md
No: Does not follow the guidelines for the README Template.
The project page does not contain any documentation at all.
You could recommend the use of token module.
Code long/complex enough for review
Yes
Secure code
Yes
Coding style & Drupal API usage
No issues found.
Comment #5
hmdnawaz commented@boromino Thanks for your comments.
I have changed the README.txt according to the template (https://www.drupal.org/node/2181737).
Comment #6
babusaheb.vikas commentedHi hmdnawaz,
1) No need to use quotes in *.info file.
Your *.info file should looks like
name = Read more per node
description = Adds functionality to change read more link text per node
core = 7.x
package = Other
2) You should provide the hook_help to allow site builders to find information about your module using Drupal UI.
3) Check this link http://pareview.sh/pareview/httpgitdrupalorgsandboxhmdnawaz2569551git and fix that error of README.txt file.
Comment #7
lhuria94 commentedYour module needs to have 1 newline at end of file for Readme.txt
Please make that change as well.
Comment #8
hmdnawaz commented@babusaheb.vikas, @lhuria94
thanks for your comments.
1. Removed quotes from the module name and description in .info file.
2. hook_help added.
3. Add new line at the end of README.txt
Comment #9
gbyteHi Ahmad, thanks for your contribution. Let me go through some things I noticed when testing your module.
1) Can you please explain why using this module is preferable to using a regular text field attached to a content type which would then be displayed as a read more link in views lists? Obviously in this case one would have to use views to create a custom teaser list.
If you find good reasons in favour of this module, views integration would be a nice to have for a stable version.
2) I appreciate the token support, but it seems not too usable as one would have to set it for every new node. A default token setting on the content type page would make this feature cool, as one could override the token setting on certain nodes.
3) The code is clean, the only thing I found is a $data() variable set and not used later (line 87 of the .module file).
The module works by the way. ;)
I will set the application to 'needs work', however if you disagree with point 1) feel free to change the status back.
Comment #10
hmdnawaz commented@gbyte.co thanks for your comments.
Here are the answers of your points.
1. That solution will only work if we select views Format>Show>fields. It will not work if we select views Format>Show>Content and then select teaser view mode. So this module will work in that case.
2. This can be a future feature request.
3. Removed that variable.
I'm changing the status back to needs review. If you have still questions, feel free to comment here.
Thanks
Comment #11
hmdnawaz commentedComment #12
prashant.cI tested this module and it is working fine, also the code seems to be clean.
Comment #13
lhuria94 commentedTested. Worked as per expectations.
Comment #14
ivanzhu commentedIn a word, the module is good enough with some limitations.
Now the altered read more button only works well in teaser view mode.
I think it should be fix this small problem.
Thanks.
Comment #15
joachim commentedOverally looks good. Just a few tweaks and UI glitches:
> if (isset($form['#node']->readmore_text) && $form['#node']->readmore_text != '') {
Just a code readability thing: the two conditions here can be replaced with !empty().
> $enabled = variable_get('readmore_per_node_' . $type, 0);
Again, mostly readability, but it's better to use FALSE rather than 0 here.
You use 'read more' with a space in the module title. I'd say with a space it looks better.
That's surely redundant here? Checkboxes do that OOTB.
This looks wrong -- the other vertical tabs on the node type form don't have it.
> '#title' => t('Enable'),
What you DO need though is a better title than this for the check box! Eg:
#title: Read more text per node
#description: Allows the read more text to be set separately for each node.
> $form['#submit'][] = 'readmore_per_node_type_submit';
I don't think you need this -- IIRC, the node type form does this for you. For instance, look at comment_form_node_type_form_alter() -- it doesn't add a submit handler.
> $variables['content']['links']['node']['#links']['node-readmore']['title'] = t('@text', array('@text' => $text));
I'm not sure there's any point to having a translatable string that's entirely placeholder!
Which does bring me to two big limitations of the module:
1. The readmore text won't work with node revisions.
2. The readmore text won't work with Entity Translation.
I don't think either of those should block this application, but you should probably address them at some point -- translation in particular will affect your data storage. One idea would be to use a text field just for the storage, since that handles revisions and translation OOTB -- and output it yourself in the teaser, and control its creation and removal via the option in the node type form.
Comment #16
hmdnawaz commented@joachim, Thanks for your deep review.
I have done all of your changes:
1. changed
if (isset($form['#node']->readmore_text) && $form['#node']->readmore_text != '')toif(!empty())2. Changed
'#title' => t('Readmore text'),to'#title' => t('Read more text'),3. Changed
$enabled = variable_get('readmore_per_node_' . $type, 0);to$enabled = variable_get('readmore_per_node_' . $type, FALSE);4. Removed
5. Removed
6. Replace
'#title' => t('Enable'),with some meaningful title and descripton7. Removed the custom submit handler from
node_type_form_alterWith node revisions it will not work. The custom text will be used for all revisions. In future we can handle it with some other way to work with node revision. So it may be a future feature request. Currently it will not work with node revision.
It is working with i18n module and since it is a node property therefore it will not work with entity translation. To make it work with entity translation, this can also be a future feature request.
Comment #17
rakesh.gectcrChange the name to ==> [D7] Readmore per node
Comment #18
klausi@rakesh.gectcr: Anyone can change the issue title, this is surely not an application blocker. Please do a manual review of the code.
Comment #19
ttronslien commentedI echo the limitations of the module (Translate, views, tokens), but I guess the limitations are opportunities. Keep it up.
The code is very clean and easy to follow (some additional commenting may not hurt, particularly of the module will grow both in functionality and co-maintainers)
I also like Joachim's suggestion of referring to "Read More" rather than "Readmore" ln 23, 50, 89 of .module file
Some comments from reading your readme file
Why is Token a recommended module? How is it used?
"Override the ds readmore tex"t - what is ds
May I suggest some changes to the Read me Instructions
* After enabling the module, activate "Readmore per node" on the content type's edit tab.
* A vertical tab (bottom of form) "Readmore text" will appear on the individual node form (Edit or add node for given content type)
* You can add a custom text of your own which will be use instead of the default "readmore" text in teaser view of the node.
Manual Review
Individual user account: Follows
No duplication: See #4
Master Branch: Follows
Licensing: Follows
3rd party assets/code: N/A
README.txt/README.md: Follows
Code long/complex enough for review: Follows
Secure code: Meets the security requirements.
Coding style & Drupal API usage:
Automated review tossed an error for line 56
* '#description' => 'Allows the read more text to be set separately for each node.', according to the review it should likely be '#description' => t('Allows the read more text to be set separately for each node.')
Comment #20
hmdnawaz commented@ttronslien thanks for your comments.
You can use tokens in the readmore text for example [node:title], so that you can use dynamic text like the title of the node.
ds => ds means display suit module.
Comment #21
heykarthikwithuhttp://pareview.sh/pareview/httpgitdrupalorgsandboxhmdnawaz2569551git
Comment #22
hmdnawaz commented@heykarthikwithu, #description now uses t() function.
Thanks
Comment #23
chandrasekhar539 commentedHi hmdnawaz,
please provide the parreview link:http://git.drupal.org/sandbox/hmdnawaz/2569551.git
By Default a node will show the full mode but not the teaser mode of node. We have to use views to show the teaser view of the node. So please provide some clarification to how to show the readmore text after installing the module in readme.txt file
Manual Review:
Individual user account: Follows
No duplication: See #4
Master Branch: Follows
Licensing: Follows
3rd party assets/code: N/A
README.txt/README.md: Follows
Code long/complex enough for review: Follows
Secure code: Meets the security requirements.
Coding style & Drupal API usage:
Automated review: No errors
Comment #24
cbuvaneswaran commentedI reviewd this module and it is working fine. Please add check_plain() for variables you used. This validates strings as UTF-8 to prevent cross site scripting attacks on Internet Explorer 6.
Example:
$variables['nid'] and etc.
Comment #25
klausi@Buvaneswaran Chandrasekaran: The node ID is not user provided text and therefore it is not necessary to run it through check_plain(). Make sure to read https://www.drupal.org/node/28984 again.
Comment #26
cbuvaneswaran commented@klausi Thats really helps.
Thanks.
Comment #27
klausiProject page at https://www.drupal.org/sandbox/hmdnawaz/2569551 is empty. Please provide a description according to https://www.drupal.org/node/997024
Comment #28
hmdnawaz commentedDescription added in project page https://www.drupal.org/sandbox/hmdnawaz/2569551
Comment #29
klausimanual review:
But otherwise looks good to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to heddn as he might have time to take a final look at this.
Comment #30
heddn$variables['content']['node_link'][0]['#markup'] = l(t('@text', array('@text' => $text)), 'node/' . $nid);None of these are blockers. Thanks for your contribution, Ahmad!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.