It'd be great to extend the functionality of this module to comments (which I'm starting to do) and as a first step to that the use of 'node' has to be abstracted. The attached patch alters most of the functions to refer to a generic object and to check what is set as updown_type, an attribute added to the node object in updown_nodeapi().
Updown behaves exactly the same as before with patch applied.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | updown-avoid-hard-code.patch | 5.18 KB | coltrane |
| updown-avoid-hard-code.patch | 5.16 KB | coltrane |
Comments
Comment #1
coltrane$comment->nid is set, so my isset() check is incorrect. Will reroll soon.
Comment #2
coltraneComment #3
dmitrig01 commentedYou're taking the limit off of just nodes and moving it to just comments. What about making it work for anything, like users, taxonomy terms, or fish?
The offending lines are:
What about adding an $object->updown_id and doing this?
Comment #4
dmitrig01 commentedIt'll be in the next version - thanks!