CVS edit link for vidhatanand

Drupal community, most inspiring open source community and passion for web development.
I have my first module "custom_slogan" ready to be contributed.
CommentFileSizeAuthor
#5 custom_slogan.zip5.64 KBopensense
#1 custom_slogan.zip6.06 KBopensense

Comments

opensense’s picture

StatusFileSize
new6.06 KB

I have developed a module "custom_slogan". This module allows you to use tokens to set pattern for custom slogans. You can set on level of node types, vocabulary, default, and front. You can also over-ride them on node, term level as it gives you a field on node and term edit page.

opensense’s picture

Status: Postponed (maintainer needs more info) » Needs review

please review my code. thanks

avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thank you for applying for a CVS account.

As per requirements, the motivation needs to include a description of the module features (more than two sentences), and a comparison with the existing solutions.

mark trapp’s picture

Just to provide some additional feedback you're going to need to address after providing a better description and comparison:

  • Your code does not conform to the Drupal Coding Standards. You can use the Coder module to get some help in auditing your code. (already mentioned in IRC)
  • It's not clear what custom_slogan-admin-settings-form.tpl.php is for: it's not a template file (which is what .tpl.php files are for), and it's not the proper way to declare a form. It also seems to be duplicating custom_slogan_admin_settings(). (already mentioned in IRC)
  • You use a mixture of persistent variables and schema to store the data your module provides. Is it possible to combine the storage and use one method?
opensense’s picture

Status: Needs work » Needs review
StatusFileSize
new5.64 KB

Thanks for the review. The module code has been cleaned and tested with coder at minor level now. The form theme has been brought to standard taking inspiration from taxonomy module.
For the use of mixture of persistent variables and schema to store data, the data which are going to be very limited in number always(one for each content type and vocabulary) have been kept in persistent variables and others are in schema.
Please find the updated module attached and a description of features below. Review it please.

The module allows to have a custom slogan on a drupal website, there is no module to handle it with this much flexibility as per i can research on drupal.org. The modules admin form allows you to set slogans using tokens for each content type, each vocabulary, front and a default slogan. It overrides the slogan from theme variable. In addition to it the module also provides a text field in all nodes/terms for content types/vocabulary for which custom slogans are enabled from admin page of the module. The slogans at module and term level will override the pattern set for the content type/vocabulary.

Thanks

opensense’s picture

Priority: Normal » Major
avpaderno’s picture

Priority: Major » Normal
opensense’s picture

any updates in reviewing??

zzolo’s picture

Component: Miscellaneous » miscellaneous
Status: Needs review » Postponed

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
opensense’s picture

Project: Drupal.org CVS applications » Drupal.org security advisory coverage applications
Component: miscellaneous » new project application
Priority: Normal » Major
Status: Postponed » Needs review

The code is ready, please review.
http://drupal.org/sandbox/vidhatanand/1122346

opensense’s picture

Title: vidhatanand [vidhatanand] » Custom Slogan

Changing issue title.

opensense’s picture

Priority: Major » Normal
dave reid’s picture

I found a couple of major things that prevented the module from working correctly:

  1. I get errors when enabling the module because of "name = Custom Slogan" in custom_slogan.info. It should be name = Custom slogan without the quotes.
  2. I get the following PHP notice on every page:
    Notice: Array to string conversion in token_replace_multiple() (line 278 of /home/dave/Dropbox/Projects/drupal6dev/sites/all/modules/token/token.module).. This is because token.module already defines a global token of [site-slogan]. When you add your own token with the same exact name, it makes an array value of the replacement token rather than a string. So you'll need to change your module's token name.
  3. On install, it seems that the module makes the site's slogan set from admin/settings/site-information disappear. Maybe custom_slogan_preprocess_page() should check if custom_slogan_page_get_slogan() returns empty output, or variable_get('custom_slogan_default', '') should be variable_get('custom_slogan_default', '[site-slogan]') as that would use Token.module's site default slogan value, so that nothing would actually 'change' on install. The same goes for the custom_slogan_front variable - should likely default to [site-slogan].
  4. The settings form at admin/content/custom_slogan has no 'submit' button for me to save the settings. I would assume you'd want to be using system_settings_form() there.
  5. There were lots of coding style issues, but nothing that really prevented me from understanding what was going on. Please make sure to always run your code through Coder module as using the standards helps other developers easily read your code and create patches for you.
dave reid’s picture

Status: Needs review » Needs work

Also I just realized the settings form at admin/content/custom_slogan has no 'submit' button for me to save the settings. :)

Edit: incorporated feedback into above comment.

opensense’s picture

Component: new project application » module
Status: Needs work » Needs review

The recommended points from http://drupal.org/node/976890#comment-4338128 have been taken care. The code is now tested with coder module. Please review and make it a full project. I have already received a D7 port of it from a fellow drupaler. Once it is a full project i will correct and add D7 version.
http://drupal.org/sandbox/vidhatanand/1122346

Anonymous’s picture

was pinged in IRC about this application.

most of the changes from #13 seem to have been incorporated, though i didn't test that install worked without notices.

there are a bunch of whitespace issues remaining (indent is all wrong in many places), but i don't see that as a blocker to accepting the module.

opensense’s picture

I am waiting for 40 weeks now.. for this module.. PLease anyone take care of it. Thanks :)

greggles’s picture

Status: Needs review » Fixed

Thanks for your contribution, vidhatanand! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

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.

I can understand that the process feels horrible, especially since you've been in it for 40 weeks. Just one note that beejeebus pointed out whitespace issues over a month before your most recent comment and you failed to fix them. #1268154: remove trailing whitespace.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

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

avpaderno’s picture

Issue summary: View changes
Issue tags: -Module review