Full Project URL : http://drupal.org/project/sna_blocks
** Do not post issues here **
If you have an issue or feature request, add them to the issue queue: http://drupal.org/project/issues/1553702?categories=All
Simple Node Archive block is very lightweight and simple module which show node posted in chronological archive blocks.
This module provides archive blocks with following setting.
* Blocks for specific node type.
* Block for all node types.
* Block for collection of node types you specified.
For the archive blocks you can set the number of nodes will display under month.
The module is tested in MySQL, SQLite and PostgreSQL. This module depends on views (http://drupal.org/project/views) module. As views module is not supporting 100% to SQLite i have alter the views query for SQLite.
The module is available in both Drupal 6.x and 7.x
Link to the sandbox project : http://drupal.org/sandbox/asiq.khan/1553702
Project Reviews :-
http://drupal.org/node/1145198#comment-5915288
http://drupal.org/node/1536250#comment-5914378
http://drupal.org/node/1091360#comment-5909258
More project reviews:
http://drupal.org/node/1808408#comment-6587002
http://drupal.org/node/1808474#comment-6586836
http://drupal.org/node/1806046#comment-6571386
Comment | File | Size | Author |
---|---|---|---|
#40 | drupalcs-result.txt | 1.34 KB | klausi |
#30 | sna_setting.jpg | 91.59 KB | subu.purohit |
#20 | sna.png | 29 KB | D2ev |
#13 | simple_node_archive.zip | 2.03 KB | Karin |
#12 | simple_node_archive.zip | 2.02 KB | Karin |
Comments
Comment #1
rameshbabu.g CreditAttribution: rameshbabu.g commentedAwesome module...Good work..By the way drupal is rocking...
Comment #2
ccardea CreditAttribution: ccardea commentedI just took a quick look at your project.
Licensing: no issues.
Module duplication. Isn't there an archive view shipped with the views module? I think you need to explain how this does not duplicate that. Wouldn't it be relatively simple just to modify the default archive view to display in blocks? Why do we need a module for this when it can be easily done through the user interface?
Comment #3
D2ev CreditAttribution: D2ev commentedThank you for your review.
i have requirement for collapsible and chronological archive block for node types.
i have use default archive block present in views ( http://drupal.org/project/views ). It not a chronological archive block and if site contain more number of previous years posts then the Monthly Archive length is very long which occupy big space. I didn't found options to show node titles posted under month and year in blocks.
WP Blog - a WordPress-style blogging (http://drupal.org/project/wp_blog) module which is chronological archive block but not collapsible one which take more space compare to archive block present in views. This module works on default node type created by this module and no option for existing node type archives.
Archive (http://drupal.org/project/archive) module i have gone through this module but didn't find any options for simple collapsible chronological archive block.
Most of these module doesn't support other databases like SQLite. Simple Node Archive provide greater flexibility to create node archive blocks with more settings and i am looking forward to extent this module.
Comment #4
ccardea CreditAttribution: ccardea commentedI actually did this very thing on a demo site I was working on. I've attached screenshots to show you. In archive.png you can see the block in the right sidebar. In block_view.png you can see my views settings page. Does your project produce something more than this?
Comment #5
ramu_bharu CreditAttribution: ramu_bharu commentedHi rock man(Ramesh babu.g)......
Have you check this module....?
This functionality will be getting by views module also......You know?
Please check the difference between the two modules.
Comment #6
D2ev CreditAttribution: D2ev commentedThank you for screenshots and it is clear to me now. Simple Node archive blocks are different from the archive block present in screenshots.
Simple archive blocks are not creating using views block display and it only use a page display of "simple node archive" view to show the result of archive.
Please review my screenshots where Simple Node archive blocks are collapsible by default and in year-month-nodes chronological order which will take less space and won't change with contents or contents going to added in future. If we have posts from previous year like 2009 then length of " archive block from views " will expands to 30 or 40 lines which occupy full sidebar region and same will happen if contents are being added in next months and years.
Simple nod archive blocks show the nodes which are being posted under year and month and provide easy navigation.
Comment #7
ramu_bharu CreditAttribution: ramu_bharu commentedIt is clear to me now also and it is a good module.
I have done block archive using views module.It is working fine.please find it below attached image name (archivewithviews.png).
But when I am posting more contents in every month,there a problem will be occurred while displaying the archive block.It will take lot of space in my webpage at left sidebar.
But now i have found Simple Node Archive module and i have used it in my website.It is working perfectly as per my requirement.This module has one important advantage is displaying the items in archive block as collapsible manner.please find the below attached images regarding displaying the archive block using the simple node archive module.Thanks to this module developers..........
Comment #8
D2ev CreditAttribution: D2ev commentedNow a days we drupaler are busy and those who want to use or test the Simple Node Archive module can find the attached branch of this module. test this module and let me know any issue.
Comment #9
sashi.kiran CreditAttribution: sashi.kiran commentedHi,
The module is very simple and is doing very good job..I find no problem using this module as a simple block and the output in the page body, but when i try to use this block in panels then comes the problem.
In the panel content list from where we select content for the panels, i can find only the block not the page, like if i have my page divided into 6 sections and if i want the block to be displayed in the 1st section and the output in the 5th section.. then how can i specify section or region for the output..Is it possible or am i missing any option which is already there...
Comment #10
brianV CreditAttribution: brianV commentedHi D2ev - this is a wonderful little module; I look forward to seeing it in contrib.
I think the duplication issue has been settled successfully.
I've picked out a few items that will need to be addressed before the project application can be approved. Note that this review isn't conclusive; once you've implemented the below recommendations, further review will be required.
Please let me know when you have updated your sandbox to include the below changes!
should be something more like
As a personal 'nice to have', it would be nice if you could add a way to also generate blocks per term in a given vocabulary. As an example, we have several blogs on a client site which all use the 'blog entry' content type. Each blog is tagged with a term indicating which blog it belongs to. It would be very helpful if you could select a vocabulary as well, and have a block generated for each content type / taxonomy term combination in the selected content types and vocabulary.
Comment #11
D2ev CreditAttribution: D2ev commented@Brian thank you for your review and point out the changes required. I will go through these steps and try to implement new functionality " generate blocks per term in a given vocabulary ".
Comment #12
Karin CreditAttribution: Karin commentedI was looking for something like this to create a blogger style archive block.
I have adjusted this module to work with the jQuery Menu API to create an archive block that can be expanded without page refreshes.
I have implemented this using the attached code on my site.
The changes can be found starting at line 115 to 166 in the theme_simple_node_archive function.
It may not be up to scratch to Drupal coding standards at the moment, I didn't have time to check, but it is functional. Hope it helps.
Comment #13
Karin CreditAttribution: Karin commentedSorry, left an error in the code and I can't seem to remove the attachment. Here's the correct version.
See above for details.
Comment #14
bufa06 CreditAttribution: bufa06 commentedKarin
I m trying to use your code, but when I replace the simple_node_archive.module by yours the block just disappeared. Is there something to do in addition ?
Fixed : Forgot to install the JQuery Menu API Module
Comment #15
Shemsedin CreditAttribution: Shemsedin commentedExcellent module. very good work and much needed for drupal. It would be great though to be able to change the url i.e. instead of saying simple_node_archive/some-link to your custom one eg new/some-link. As at the moment it is not possible to do it through admin settings.
Shemsedin
Comment #15.0
Shemsedin CreditAttribution: Shemsedin commentedadded project reviews
Comment #16
subu.purohit CreditAttribution: subu.purohit commentedHi D2ev,
Thanks for your excellent job. Can I create separate archive blocks for different content type. Actually I have different page.tpl for all content types and each page has it separate blocks for that content type.
One more thing can I use this module in my production site?
If possible please attach latest module here, I am not able to get code from git.
Thanks in advance.
Comment #17
patrickd CreditAttribution: patrickd commentedDownload the latest snapshot here: http://drupalcode.org/sandbox/asiq.khan/1213302.git
Comment #18
subu.purohit CreditAttribution: subu.purohit commentedThanks patrickd,
Have you any idea about my first 2 requirement ?
Comment #19
D2ev CreditAttribution: D2ev commentedThank you guys for your valuable reviews.
I had a very tough time but now.... back to work with your reviews.
Comment #20
D2ev CreditAttribution: D2ev commentedi have committed code for Drupal 7.x branch with new feature called taxonomy archive for give taxonomy term or given vocabulary. Going to work on Drupal 6.x branch.
Issues are welcome.
Comment #21
MrMaksimize CreditAttribution: MrMaksimize commentedHi D2ev,
Check out the documentation here for the master branch - you need to clean it out and put a README.txt in there:)
http://drupal.org/node/1127732
You also have some errors in ventral:
http://ventral.org/pareview/httpgitdrupalorgsandboxasiqkhan1213302git
Try to wrap your lines at 80 chars - http://drupalcode.org/sandbox/asiq.khan/1213302.git/blob/refs/heads/6.x-...
According to http://drupal.org/coding-standards#indenting - be sure to use an indent of 2 spaces when you nest. There's a lot of indent errors in the 6.x branch
6.x-1.0 and 7.x-1.0 are not the proper way to name branches. 1.0 and such are release tags. Your branches should be named 7.x-1.x and 6.x-1.x (actually ventral isn't picking them up because of this). Check out this for more info: http://drupal.org/node/1015226.
http://drupalcode.org/sandbox/asiq.khan/1213302.git/blob/refs/heads/6.x-... I would recommend an empty() check instead of $value != '0'; It'll catch more stuff and be more reliable. - http://php.net/manual/en/function.empty.php
Comment #22
subu.purohit CreditAttribution: subu.purohit commentedHi D2ev,
Can I create multiple archive blocks using your module ?
Comment #23
D2ev CreditAttribution: D2ev commented@Subhash ..if you looking for D7 then you can create. But for D6 branch i am doing changes.
@Maksim... Thank you for links these are very helpful to me and i am changing accordingly.
Comment #24
subu.purohit CreditAttribution: subu.purohit commented@D2ev: I am looking for D6 branch. Are you working on creating multiple blocks for D6 branch?
Comment #25
D2ev CreditAttribution: D2ev commented@Subhash... For D6 branch you checkout and create multiple archive blocks for different node types. But D6 branch will not contain features like Vocabulary or Term archive blocks.
Comment #26
subu.purohit CreditAttribution: subu.purohit commentedHi D2ev,
I couldn't find any way to create multiple blocks. I checked my view list but there is no default view created for simple node archive. Please let me know if I am missing something, I have checked out latest code from #17.
* There is a view named "simple_node_archive " in views list. but Still I cant figure out how to create a new Simple Archive block for new content type.
Comment #27
D2ev CreditAttribution: D2ev commentedI have updated both D6 and D7 branch....
@Subhash... you can checkout the D6 branch and you can find settings under Administer › Site configuration › Simple Node Archive
let me know any issues.
Comment #28
subu.purohit CreditAttribution: subu.purohit commentedThanks for update D2ev,
latest code is working perfect. But my requirement is not to use texonomy. I need 2 separate blocks for blog content type and story content type. I am using a temporary method to achieve this functionality using your module. What I have done is :
1: Created another module file inside your module folder named story_archive.module.
2: Used only 2 functions inside it story_archive_block() and theme_story_archive().
3: Hard coded blog type instead of variable_get('simple_node_archive_node_type', array('page'));
4: For story content type I am using your default block from simple_node_archive.module
Now I have 2 separate blocks. It is not a best approach but I have no alternative solution for time being.
Thanks.
Comment #29
D2ev CreditAttribution: D2ev commented@Subhash... you can attached a screenshot of setting page ( Administer › Site configuration › Simple Node Archive)
Comment #30
subu.purohit CreditAttribution: subu.purohit commentedHi D2ev,
Sorry for delay. pfa screen shot.
Comment #31
D2ev CreditAttribution: D2ev commented@Subhash... thank you for screen-shot, i can see your setting that you have only select a 'Page' node type archive. In this setting page select 'Story' and/or 'Blog entry' type then you can see in "Administer › Site building › Blocks" page where two new archive block will be available.
I am going to update setting page and README.txt file which will describe the module settings.
let me know any issues.
Comment #32
subu.purohit CreditAttribution: subu.purohit commentedThank you D2ev.
Now I can see 2 archive blocks in block listing. I could not find the way you mentioned here.
I would like to suggest one more thing if possible, You should create blocks using views like you are creating archives page (simple_node_archive) views. It would be best if we can create these blocks from views directly, because we can add more filters to archive blocks then.
I had to create 2 more separate blocks for blog content type (I added a cck field Featured blog). One block for featured blog and other one for simple blog.
Anyway it is an awesome module and you have resolved a very obvious requirement in Drupal archive blocks.Also I am using http://drupal.org/comment/reply/1222472/5875888#comment-5338112 to add jquery styles to listing, You can add this in this module also.
Thanks very much.
Comment #33
jack_tux CreditAttribution: jack_tux commentedHi
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #34
patrickd CreditAttribution: patrickd commentedPlease don't switch to needs work if there are only minor coding style issues
Comment #35
D2ev CreditAttribution: D2ev commentedthank you for reviews...
Now i have added a option in setting for theming archive blocks using Jqeury Menu Module for both D6 & D7 branches.
issues are welcome.
Comment #35.0
D2ev CreditAttribution: D2ev commentedThis thread is not for issues - it is for the application to become a project. It has become a spot for people to put there issues, so I have included a notice to point people to the issue queue
Comment #36
frobSomething from the automated review:
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Manual Review:
I recommend reading a bit from the Documentation Guidelines. To resolve these minor code style issues. Also I find it helpfull to run ventral.org's automated code review script PAReview.
Also I noticed your short-name doesn't match the module machine name. It should either be sna or simple_node_archive.
I am getting this error:
After looking at the code, I noticed that $use_jquerymenu is only being set inside a conditional. I would recommend setting $use_jquerymenu before the conditional so that there is no way that it can pass by unset.
I could not get the module to run without errors; setting back as Needs Work.
Comment #37
D2ev CreditAttribution: D2ev commentederror on comment #36 is fixed. I renamed the project name from "simple_name_archive" to "sna". I tried to rename the git project folder but it seems not feasible to rename project name in Drupal Git.
issues are welcome.
Comment #38
D2ev CreditAttribution: D2ev commentedBugs detected by @PurpleAlien are fixed.
Comment #39
D2ev CreditAttribution: D2ev commentedany one ?
Comment #40
klausiSorry for the delay. Make sure to review more project application and get a new review bonus to get this finished faster (and add the "PAReview: review bonus" tag if you have done so).
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review:
Comment #41
masudfz77 CreditAttribution: masudfz77 commentedHow can I get the latest update of the project files (D7)? I really need this one. Thanks in advance,
Comment #42
frob@masudez77
You need to goto the version controle tab of the modules project page http://drupal.org/project/1553702/git-instructions and download via git.
Also, this is the project application issue que. Questions such as this should be left to the project's own issue que. Asking a question such as this here can possibly make the project reviewers think that there is activity happening in this issue and as such they could take longer in getting back to reviewing this project.
Comment #43
D2ev CreditAttribution: D2ev commentedThank you for your valuable reviews.
i have committed the these changes for both 6x and 7x branches:
"sna_admin_settings(): this will not work for large vocabularies with many terms. The select list will not be usable anymore. You should probably use an autocomplete for taxonomy terms." - for better user interface i have given multi-select list where user can select the "vocabularies" and "terms".
those who are using this module please checkout the latest code.
-thanks
Comment #44
webdorado CreditAttribution: webdorado commentedWe have found some bugs in the Drupal 6 version
Comment #45
D2ev CreditAttribution: D2ev commentedchanged and committed.....thanx
Comment #45.0
D2ev CreditAttribution: D2ev commentedchange sandbox url.
Comment #46
masudfz77 CreditAttribution: masudfz77 commentedIt worked in my site perfectly. But when I enabled language (i18n and related modules), the block shows nothing. Can you fix this?
Comment #47
frob@masudfz77,
This is the issue queue for Project Applications. Please leave feature requests in the Project's own Issue Queue. Any feature requests left here are likely to get lost in the mix.
Also, by posting non-reviews here you reset the "Last Updated" date and make it seem like the project is already getting reviewed. Reviewers might pass over a project that looks like it was recently reviewed.
Comment #48
D2ev CreditAttribution: D2ev commented@masudfz77... I have checked it with my multilingual site and it's working fine beside translation of admin settings interface and view page title. Can you check with your language settings options.
Here is code you can see how i am selecting the language:
Yes, Please add feature requests in the Project Issue Queue.
Comment #48.0
D2ev CreditAttribution: D2ev commentedadded new project reviews.
Comment #49
D2ev CreditAttribution: D2ev commentedNew Reviews:-
http://drupal.org/node/1783376#comment-6512904
http://drupal.org/node/1784144#comment-6512994
http://drupal.org/node/1783722#comment-6513774
http://drupal.org/node/1791640#comment-6513868
http://drupal.org/node/1777990#comment-6514094
http://drupal.org/node/1806046#comment-6571386
Comment #49.0
D2ev CreditAttribution: D2ev commentedreview bonus
Comment #50
klausiPlease add all your reviews to the issue summary. Please don't remove the security tag, we keep that for statistical purposes and to show examples of security problems.
Comment #51
mpdonadioYou still have a master branch in git. You should delete this.
The 6.x version has a lot of style issues: http://ventral.org/pareview/httpgitdrupalorgsandboxasiqkhan1553702git-6x-1x
The 7.x has a few minor style issues: http://ventral.org/pareview/httpgitdrupalorgsandboxasiqkhan1553702git-7x-1x
In the 7.x version,
-- You should really define your own admin permission so users can have more fine grained control over who does what.
-- You are pulling in year/month via arg() in sna_block_view(), but I don't see any error checking on these values.
-- In _sna_archivehtml(), you are relying on arg(). Investigate menu_get_object() instead.
-- Stylistically, in _sna_nodeterms(), I think the more common convention is to reserve ALLCAPS for SQL reserved keywords.
-- It isn't totally clear after you enable the module that the block is "SNA" and nor "Simple Node Archive"
-- You need to display a better message if Jquerymenu isn't installed/enabled.
In the 6.x version
-- Mostly the same applies, as the code looks nearly identical.
Comment #52
D2ev CreditAttribution: D2ev commentedThank you @matthew.donadio
I have done the above modification to both 6.x and 7.x branches and committed. Regarding the master branch, i have a cleaned master branch.
Comment #53
klausiRemoving review bonus tag, you have not done any manual review, you just posted the output of an automated review tool. Make sure to read through the source code of the other projects.
Comment #54
D2ev CreditAttribution: D2ev commented"you have not done any manual review" ... Sorry i had some manual reviews i agree that i have most automated reviews.
More Manual Reviews:
http://drupal.org/node/1808408#comment-6601994
http://drupal.org/node/1068972#comment-6607252
http://drupal.org/node/1813630#comment-6607286
Comment #55
klausiThere is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
Although the code uses quite some hard-coded arg() ugliness I think this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #56
D2ev CreditAttribution: D2ev commented1. "the code uses quite some hard-coded arg()" .. i even feel so and removed arg() in both branches and committed.
2. Removed master branch.
Comment #57
D2ev CreditAttribution: D2ev commentedApplying for review bonus:
Manual reviews:
http://drupal.org/node/1696494#comment-6612316
http://drupal.org/node/1784544#comment-6612852
http://drupal.org/node/1427016#comment-6612966
Comment #58
klausino objections for more than a week, so ...
Thanks for your contribution, D2ev!
I updated your account to let you 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 get 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.
Comment #59
D2ev CreditAttribution: D2ev commentedI committed this module with some stupid code, but from the reviews I learned a lot.
Thank you for your valuable feedback and is quite a learning process for me.
I will continue to spend time in the Drupal community to review other projects that are pending.
Comment #59.0
D2ev CreditAttribution: D2ev commentedapplying review bonus
Comment #59.1
D2ev CreditAttribution: D2ev commentedadded full project URL.
Comment #60.0
(not verified) CreditAttribution: commentedupdated full project path.