I currently have a blog with links that I post as well blog entries. I wanted both of these to be filterable in the archives, as it would be nice to see only all of the links I posted in February, not both the links and the blog posts. I also didn't want pages showing up in the archives.
This patch I have attached adds an admin settings page that allows the user to select what node types can be filtered in the archives. It places a dt/dd pair below the date to allow the user to select what node types they wish to see.
I have also added a setting to change the main path to the archives. I like mine at "archives," while the default is at "archive." I would think people may want to change this to other things, also, so that can be done.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | archive.inc_.patch | 14.87 KB | Susurrus |
| #5 | archive.module_0.patch | 3.39 KB | Susurrus |
| archive_5.patch | 19.5 KB | Susurrus |
Comments
Comment #1
somes commentedtired that though Im getting an error as follow
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND t.type IN ("image", "weblink", "blurb") n.status = 1' at line 1 query: SELECT MIN(n.created) AS min_date, MAX(n.created) AS max_date FROM node n JOIN node_type t ON t.type = n.type WHERE AND t.type IN ("image", "weblink", "blurb") n.status = 1 in C:\SERVER\xampp\htdocs\*********\database.mysql.inc on line 172.
though i am using a custom node type ie blurb
any ideas
Comment #2
somes commentedLooks more like an SQL calling error as I removed the custom type and still getting a similar syntax error
Comment #3
gábor hojtsy- This code includes generated pieces like t('Describes what the settings generally do.') as a description...
- The archive_page_path setting seems to be insane to me. Why duplicate path alias functionality?
- The patch does not conform to Drupal coding styles... Lines like the following violate code style rules in every possible place
}else if($date->days[$date->day] > 0){ // Otherwise redirect the user to the same day viewing all node types- Other parts of the code, like archive_node_types() and _archive_validate_type() even use tabs.
- You also have a lot of date related changes included in the patch, which are not related to type handling.
Comment #4
gábor hojtsyBy the way issue #75543 (http://drupal.org/node/75543) is an interesting prior art.
Comment #5
Susurrus commentedI've patched the latest version of my code against the 5.x-1.2 version of this module. I have also removed all changes that I've made to the module EXCEPT the node types changes.
Since my patch against this module, it's been split into two separate files. Attached here is the .module patch
Comment #6
Susurrus commentedThis patch is for archive.inc and is current against 5.x-1.2. It matches changes in my post above.
Comment #7
Susurrus commentedThe latest code revisions I attached in the last 2 posts are also live at: http://thrashtheswap.com/archive.
Comment #8
Susurrus commentedComment #9
Caleb G2 commentedA big +1 to these patches. I've add them to the site and it is very nice to be able to eliminate the 'admin' content-types from the archives (frankly the module is a bit useless for some sites without this feature).
A small nit - somewhere it needs to be documented that the path to the configuration page is /admin/settings/archive
Comment #10
Caleb G2 commentedSetting to rtbc to encourage things along...
Comment #11
Caleb G2 commentedNevermind about the forementioned nit - I see that the link to the archive settings does indeed appear on admin/settings.
Comment #12
cburschkaWhat's the status on it? Is it in fact ready to be committed (and has been for a month)? Has it been committed (so this should be set to fixed)? Or does it still need work (and should be set accordingly)? Just wondering because a RTBC patch has been untouched for more than a month...
Comment #13
gábor hojtsyUnfortunately the Archive module maintainer (namely myself) is very busy with final Drupal 6 core feature patches (being one of the Drupal 6 committers too). I tried to find people to take over (among other modules) the Archive module from me, so it can be properly maintained. Until this happens, unfortunately there is a big lag in responses to Archive module issues.
Comment #14
Susurrus commentedIf you're looking for some help with maintaining this module, I would definitely be willing to provide it.
Comment #15
gábor hojtsysusurrus, you don't seem like having a CVS account at all, so you effectively cannot get maintainership of this module just yet.
Comment #16
Susurrus commentedI now have a CVS account, if you're interested in letting me contribute to this module.
Comment #17
bfdexp commentedWould love to use this module with this patch. However I do not have shell access to run this on my server. Can someone send me the updated compiled files for this module?
Comment #18
Susurrus commentedI'm now the maintainer of this module and I will try to have a new version ready with this patch available tomorrow night after work.
Comment #19
bfdexp commentedThanks, I really appreciate you taking on this module. This module will allow a lot of power to allow users to easily archive nodes by date and in the next few days by date and/or node type. I also just posted a new request that hopefully we can work on, filtering by taxonomy term (and/or). Thanks again...
Comment #20
Susurrus commentedPatch applied and released in version 1.3
Comment #21
(not verified) commented