Content Type Search: The Drupal 7 Content Type Search module
--------------------------------------------------------------------
This module allows you to search content type in node add(node/add) page.
This version of the module only works with Drupal 7.x.
Suppose you are an authenticated content creator or administrator. Now for your web application you have more than 50+ content types. Now in time of adding a content or node page in a particular content type you have to first find out that content type, which may become a annoying task. Now with this search module you will get your expected or exact content type very easily.
Features
------------------------------------------------------------------------------
The primary features include:
* Admin end search in node/add page to search content type in which we have to add content.
* Have auto-fill as well as filtered list facility
* User can directly go to node add page by clicking on desire searched content type
Installing content type search module (first time installation)
------------------------------------------------------------------------------
1. Copy the module as normal.
2. Enable the "Content Type search Enhancement" module from the module administration page
(Administer >> Site configuration >> Modules).
3. Configure the module from admin configuration section.
Credits / Contact
------------------------------------------------------------------------------
The current maintainer is Kunal Maity.
The original author of this module is Kunal Maity.
Drupal Direct Link
-----------------------------------------------------------------------
https://www.drupal.org/sandbox/kunal.maity.gmail/2485283
Direct git repository
-----------------------------------------------------
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/kunal.maity.gmail/2485283.git content_type_search
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | no-error-in-code-review.png | 52.25 KB | kunal.maity.gmail |
| #20 | d7review.png | 111.08 KB | rashid_786 |
| #8 | automatic-results(coder).txt | 9.15 KB | darol100 |
| #2 | content-type-search.png | 9.55 KB | kunal.maity.gmail |
Comments
Comment #1
kunal.maity.gmail commentedComment #2
kunal.maity.gmail commentedComment #3
kunal.maity.gmail commentedMain description is above
Comment #4
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 #5
th_tushar commentedHi @kunal.maity.gmail,
Please commit the proper files to the git repository. More information is required in module_name.info file. There is no module_name.module file and why is the stp-search.tar.gz file required?
Comment #6
kunal.maity.gmail commentedHi @th_tushar
stp-search.tar.gz is the original package with all required files such as .info, .module and others.
Thanks,
Kunal
Comment #7
kunal.maity.gmail commentedComment #8
darol100 commentedThank you for your contribution, this can be done with a few contrib modules admin_views search_api and search_api_autocomplete; however, this is an out-box solution.
Comment #9
ajitsThis isn't a bug report ;-)
Comment #10
Vimala vinisha commentedHi @kunal.maity.gmail,
You did good work. It will very useful for Large size of Projects. But I have a doubt. I have seen this custom_function() in your .module file. Am not sure where it is used. Kindly check this. If not necessary, please remove it . One more suggestion, Please check your code through coder module and http://pareview.sh/pareview/ tool. It will very helpful to enhance your coding styles.
Thanks,
Vimala.A
Comment #11
kunal.maity.gmail commented1. custom_function() :: Has been removed from .module file
2. CSS and JS file now have proper name
3. Due to my editor some spacing warning is coming in coder, beside that there is no high severity issue
4. zip file removed and project folder has been added without any zip version
Comment #12
babusaheb.vikas commented1) All your files should be in the root of your project.
Remove content_type_search_in_add_content_node_add__page.info file.
2) Incorrect hook comments throughout the file. Correct hook comment is: Implements hook_HOOK().
3) Add configure link in *.info file, so that a user can quickly reach at module configuration page from modules list.
4) You should provide the hook_help to allow site builders to find information about your module using Drupal UI.
5) /content_type/autocomplete page showing blank. Screenshot:-- http://prntscr.com/7sydo9
6) Install coder module, check your module with coder and fix those issues.
7) README.txt is missing in your module. Follows guidelines for in-project documentation and/or the README Template and create a file README.txt for your module.
Comment #13
Vimala vinisha commentedHi @kunal.maity.gmail,
Nice Work. Thank you for your response.
Comment #14
kunal.maity.gmail commented1)content_type_search_in_add_content_node_add__page.info file removed.
2) Hook comments corrected
3) Configuration link is not required as there is no such configuration required from admin end. This is a plug n play module
4) hook_help implemented.
5) here "/content_type/autocomplete" Drupal autocomplete function menu which will called on keyup.
6) In coder there is only space indentation related warnings, no issues are there
7) README.txt provided
Comment #15
kunal.maity.gmail commentedComment #16
rigoucrHi there,
Reviewing your project I found some issues:
* When I cloned; I get a folder named 'stp_search-7.x'; and inside that folder; another named 'content_type_search'; I think the right is clone directly in content_type_search (without the upper folder).
* Since the repo contains the dev version of the project; you shouldn't add stable version number (without final .x) in .info file.
* I'm still seeing a lot of errors due to coding standards (mainly about comments, tabs instead of spaces, whitespaces and indentantion errors)
* You're adding your js and css files in hook_init to every page using drupal_add_js/drupal_add_css; it's the same effect than adding them in .info file; and adding them in .info file is recommended (cache and other stuff); so; you definitely should move them to .info file.
* You're using exit in some places; since Drupal has a wrapper around that function; you should change exit by drupal_exit().
* Your css file also have some indentation errors.
* Your js file also have tabs that should be changed by spaces; and maybe some indentation errors.
I totally recommend you to reading drupal coding standards (https://www.drupal.org/coding-standards);due to they are really important when working on Drupal.
Comment #17
kunal.maity.gmail commentedComment #18
kunal.maity.gmail commentedBelow is my resolution ........
* Since the repo contains the dev version of the project; you shouldn't add stable version number (without final .x) in .info file.
-- In info file version changed as 7.x-1.x
* I'm still seeing a lot of errors due to coding standards (mainly about comments, tabs instead of spaces, whitespaces and indentantion errors)
-- Comments modified, tabs & whitespaces removed
* You're adding your js and css files in hook_init to every page using drupal_add_js/drupal_add_css; it's the same effect than adding them in .info file; and adding them in .info file is recommended (cache and other stuff); so; you definitely should move them to .info file.
-- JS and CSS files are added in .info file and hook_init() removed
* You're using exit in some places; since Drupal has a wrapper around that function; you should change exit by drupal_exit().
-- exit() removed and drupal_exit() added
* Your css file also have some indentation errors.
-- fixed accordingly
* Your js file also have tabs that should be changed by spaces; and maybe some indentation errors.
-- tabs changed by spaces
Comment #19
kunal.maity.gmail commentedComment #20
rashid_786 commentedHi Kunal,
Thanks for contribution,
I come across with few issues:
* When i search any content type e.g. basic page, it does not show me the filtered content type but all content types kindly refer attached file.
* There are still lots of issues as per the drupal coding standards found on automated reviews http://pareview.sh/pareview/httpgitdrupalorgsandboxkunalmaitygmail2485283git. Kindly refer https://www.drupal.org/coding-standards doc.
Regards,
Rashid
Comment #21
rashid_786 commentedComment #22
kunal.maity.gmail commentedHi Rashid_786,
Thanks for feedback,
Below is the status ::
* When i search any content type e.g. basic page, it does not show me the filtered content type but all content types kindly refer attached file.
-- Fixed
* There are still lots of issues as per the drupal coding standards found on automated
-- I ran code review and can't see any issue. Please see the attached.
Thanks,
Kunal
Comment #23
rashid_786 commentedPlease click on the following link to check the automated PA review.
http://pareview.sh/pareview/httpgitdrupalorgsandboxkunalmaitygmail2485283git.
Comment #24
kunal.maity.gmail commentedYes I have fixed all spaces, tabs and indentation issues.
Comment #25
rashid_786 commentedAs you used below syntax to add js file
drupal_add_js("var jstring='" . addslashes($com_str) . "';", 'inline');but it is recommended to use the following syntax to attach js/css files in the form.
Comment #26
rashid_786 commentedComment #27
kunal.maity.gmail commentedHi Rashid,
Whatever I added is an inline JS variable not a JS file. and I have added as per drupal's format. Please check.
Thanks,
Kunal
Comment #28
kunal.maity.gmail commentedComment #29
rashid_786 commentedKindly refer below link and on method #3
https://www.drupal.org/node/756722.
Comment #30
kunal.maity.gmail commentedHi Rashid,
I agree with you but as mentioned it is not a file. It is just a JS variable needs to be put directly in page. Also this page is not a block, so we can use inline add JS function of Drupal7.
"Note that when possible, this method is preferred over drupal_add_js(), as the reference to the file is cached, whereas drupal_add_js() requires a function call to add the script to the page. In some instances, such as hook_block_view(), drupal_add_js() will not be called if the block is cached, and therefore #attached must be used to ensure your code is loaded with the block."
Thanks,
Kunal
Comment #31
kunal.maity.gmail commentedComment #32
kunal.maity.gmail commentedComment #33
kunal.maity.gmail commentedComment #34
th_tushar commentedChanging the status to "Needs Review", as the RTBC is to be done by the reviewers.
Comment #35
rashid_786 commentedKunal,
For the functionality point of view this module is working fine as i tested on my machine. But you see in JS file, lots html content is being used however you can create the template to render the form data and apply JS accordingly.
I would recommend to create the template to render form data and follow the best practice.
Regards,
Rashid
Comment #36
kunal.maity.gmail commentedYes Rashid,
For best practice it is always better to build a theme, but here as per functionality in run time or browser operation I have to filter some HTML data, that is why I have added some minimal HTML in JS. Also as it will work as per admin selected theme that is why I think no extra theme is required.
Thanks,
Kunal
Comment #37
rashid_786 commentedComment #38
kunal.maity.gmail commentedHello,
Need permission to promote sandbox to full project.
Thanks,
Kunal