Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Difference between add_user and insert_user hooks?

Quote Reply
Difference between add_user and insert_user hooks?
Hi guys/gals,

Does anyone happen to know what the difference is between the add_user hook, and the insert_user one?

TIA

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Difference between add_user and insert_user hooks? In reply to
add_user is called when $user_table->add() is called, which in Gossamer Forum happens only when adding a user via the admin panel. insert_user is called whenever a user is inserted, including adding a user via the admin (as ->add calls ->insert).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Difference between add_user and insert_user hooks? In reply to
Thanks, I managed to dig up an old thread (for Wil), which gave me an idea on how to find the hooks. For anyone interested, these are the main ones I found;

admin/GForum/HTML/Forum.pm: 'display_forum'
admin/GForum/HTML/Forum.pm: 'form_user'
admin/GForum/HTML/Group.pm: 'display_group'
admin/GForum/HTML/Group.pm: 'group_form'
admin/GForum/HTML/User.pm: 'display_user'
admin/GForum/HTML/User.pm: 'form_user'
admin/GForum/HTML/Category.pm: 'display_category'
admin/GForum/HTML/Category.pm: 'form_user'
admin/GForum/Post/Write.pm: 'post_cant_attach'
admin/GForum/Forum.pm: 'forum_normalize'
admin/GForum/User.pm: 'user_normalize'
admin/GForum/Table/Forum.pm: 'add_forum'
admin/GForum/Table/Forum.pm: 'modify_forum'
admin/GForum/Table/Forum.pm: 'delete_forum'
admin/GForum/Table/Group.pm: 'add_group'
admin/GForum/Table/Group.pm: 'modify_group'
admin/GForum/Table/Group.pm: 'delete_group'
admin/GForum/Table/User.pm: 'add_user'
admin/GForum/Table/User.pm: 'insert_user'
admin/GForum/Table/User.pm: 'update_user'
admin/GForum/Table/User.pm: 'delete_user'
admin/GForum/Table/User.pm: 'modify_user'
admin/GForum/Table/Post.pm: 'insert_post'
admin/GForum/Table/Post.pm: 'update_post'
admin/GForum/Table/Post.pm: 'delete_post'
admin/GForum/Table/MessageAttachment.pm: 'delete_message_attachment'
admin/GForum/Table/TempAttachment.pm: 'delete_temp_attachment'
admin/GForum/Table/PostAttachment.pm: 'delete_post_attachment'
admin/GForum/Post.pm: 'post_normalize'
admin/GForum/Search.pm: 'search_results'
admin/GForum/Convert.pm:sub 'convert_signature'
admin/GForum/Convert.pm:sub 'convert_markup'
admin/GForum/Online.pm: 'online_normalize'
admin/GForum/Message.pm: 'message_cant_attach'
admin/GForum/Message.pm: 'message_normalize'
admin/GForum.pm: 'do_func'

Its not definative.. but the ones I needed were there ... and the plugin is pretty much finished off now <G> Should hopefully have a release tomorrow, after I've got some feedback on how its working / any bugs.

Thanks for the description though, the definatly clears things up in my head :)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Difference between add_user and insert_user hooks? In reply to
Also worth mentioning is that there is a 'do_*' on each and every do= action. For example, do=post_reply_write has a do_post_reply_write hook.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Difference between add_user and insert_user hooks? In reply to
Thanks ... added to my mental notepad Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates