Hello, Dustin. Thanks you for this awesome module:)
I've found some problems and attached patch fixes them:
1. Fixes table on main admin page (admin/settings/linkweights). In some cases function module_invoke_all('node_info') DOES NOT return all custom node types function node_get_types() used in ths case. It returns absolutly all. Also added some usefull info columns in overview table:)
TO SEE THIS BUG:
— Create custom content type
— Go to /admin/settings/linkweights
— This type will not appear on this page:)
2. One string single-quoted now. Single-quotes is bit faster then double-quotes
3. Fixes table columns when node type has no links
TO SEE THIS BUG:
— Create custom content type with on link (disable comments and etc.)
— Go to /admin/settings/linkweights/
— You will see two columns «Links» and «2»:)
That's all(:
| Comment | File | Size | Author |
|---|---|---|---|
| linkweights-6.x-1.0-beta1.patch | 2.54 KB | a.a.egoroff |
Comments
Comment #1
userok commentedGreat work! Nice job, the patch works perfectly as far as I can tell.
[edit] but I don't think comment count part is configurable yet-- ie 'Add new comment' is working', but '2 comments' does not remain its position.
(btw I had to patch manually--didn't know how to patch from command line for linkweights.admin.inc)
Comment #2
mstrelan commentedAdd new comment and 2 comments don't work consistantly because the code just goes and finds a sample node of the node type. Different nodes have different links and the only way around this would be to include a hook that other modules could implement. You would need to provide default implementations for all the major modules, eg comment.
Comment #3
mstrelan commentedOr you could also gradually build up a list of all the existing links each time hook_links is invoked. For big blogs this would probably cause a bit of chaos as each blog entry has a link to the blog authors blog, eg mstrelans blog. If a site had lots of authors there would be lots of links
Comment #4
Dustin Currie commentedThanks! I'll get these in.
Comment #5
Dustin Currie commentedFixed and committed. Thanks