This module allows to create a content archive like Wordpress Archives Widget, but it works on custom date fields and not on node cration date.
You can choose the node type easily in the module's admin interface because News Archive module automatically detects the content types with a date field available and shows them in a dropdown list.
This module builds a block that shows the archive based on the widget selected through the module's admin interface.
It makes a page view that will show out selected content and makes a block with categorized informations links eg:
October 2013 (2)
September 2013 (10)
Project Page: https://drupal.org/sandbox/su8z3r0/2072793
Git Repository: http://drupalcode.org/sandbox/su8z3r0/2072793.git
git clone http://git.drupal.org/sandbox/su8z3r0/2072793.git news_archive
Comments
Comment #1
cyper983 commentedThis module allows to create a content archive like Wordpress Archives Widget, but it works on custom date fields and not on node cration date.
You can choose the node type easily in the module's admin interface because News Archive module automatically detects the content types with a date field available and shows them in a dropdown list.
This module builds a block that shows the archive based on the widget selected through the module's admin interface.
It makes a page view that will show out selected content and makes a block with categorized informations links eg:
October 2013 (2)
September 2013 (10)
Comment #2
PA robot commentedLink to the project page and git clone command are missing in the issue summary, please add them.
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 #2.0
cyper983 commentedNew revision
Comment #2.1
cyper983 commentedaggiornamento
Comment #3
cyper983 commentedComment #4
beljaako commentedHi There,
Thanks for committing your module, here's my review.
- Please add dependency of date module, as it doesn't work without it.
- Please check the Drupal coding standards. It doesn't seem like you followed them. http://pareview.sh/pareview/httpgitdrupalorgsandboxsu8z3r02072793git
- Use the correct prefix for functions. They should start with you module name.
- You're using a lot of queries. It is preferred to use Drupal's api's. Please use the date api or field api where possible.
- Think about sanitising text. https://drupal.org/node/28984. I don't see any sanitising before printing it to the screen, so please check that.
- Please check the function: _news_archive_get_content_type_fields. It's not showing any date fields in my case. I do have content types with date fields, but they are not showing.
- Why is you admin file in a seperate module folder? Am I missing something?
- Using the news_archive block creates an error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.field_data_' doesn't exist: SELECT DISTINCT Year(_value) FROM {field_data_} WHERE entity_id = 1 ORDER BY Year(_value) DESC; Array ( ) in _get_current_node_info() (line 212 of /sites/all/modules/news_archive/news_archive.module).
- Can you please explain what are the advantages of this module over just building a view. One could easily create a view (maybe export it as a feature) and obtain the same functionality. What is this module adding to a standard news archive view?
Good luck, keep up the good work!
Comment #5
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.