Hi,
I tried adding favorite_node.info file, but it is not enough (and I'm not a programmer)...
Cheers,
Amitai

CommentFileSizeAuthor
#4 favorite_nodes_5.patch21.67 KBbtmash
#2 favorite_nodes_5_0.patch23.56 KBAnonymous (not verified)

Comments

Anonymous’s picture

Priority: Normal » Critical

i now officially need this soon.. if no one else can step up to help.. i may whip it up.

Anonymous’s picture

StatusFileSize
new23.56 KB

ok..

here we go..

also, i discovered a few really bad bugs with one being the nodeapi was calling a function do delete entries from the favorite_nodes table that belonged to a uid but providing an nid.. (ouch)

I also renamed many function names to make them more proper.. i completely reorganized the file to be much more organized with all the drupal hooks being at the top of the file and theme functions at the bottom.

I added some api functions so external modules can add and delete favorite node entries..

I added an xmlrpc hook to allow for adding favorites that way as well.. (example, a flash widget could now save favorite nodes).

Last thing I'm going to mention.. I added the uninstall hook as well.. it as a // TODO: entry though to delete the variables in the variable table.

I haven't tested this yet.. just posting cause im calling it a night and was hoping someone would review and give some feedback.

cheers.

Anonymous’s picture

Status: Active » Needs review
btmash’s picture

Status: Needs review » Needs work
StatusFileSize
new21.67 KB

I was looking to start up the work on this module as well for a site we are going to be using. Thank you very much for beginning the work on this as I'm still new to the modules (I'm still not used to using cvs and thus my patch file looks very similar to yours ^_^;;). Your file required some editing (your call to get_node_types returns stdobjects so I just use types and then call on $type->type and $type->name; there were some link problems (one of your links led to 'remove' while you had calls for delete...I changed it to delete unless you feel remove makes more sense); and there were a few minor problems (there was an sql call with 'using' which I changed to a proper 'inner join on...') but overall, the file mostly seems there.

I've added my set of patches to yours (hopefully ppl more experienced than I am can contribute to this). Again, thank you for laying out some of the groundwork.

Anonymous’s picture

Status: Needs work » Needs review
kbahey’s picture

Priority: Critical » Normal
Status: Needs review » Fixed

Commited to HEAD and branched to 5.0

Thanks guys.

Anonymous’s picture

Status: Fixed » Closed (fixed)