Dempsey Wrote:What are the additional plugin hooks?
Archive Mode:- archive_start
Called at the top of archive/index.php.
- archive_announcement_start
Called at the start of display of an announcement.
- archive_announcement_end
Called at the end of display of an announcement.
- archive_thread_start
Called at the start of display of a thread.
- archive_thread_post
Called immediately before a post in a thread is sent to the browser.
- archive_thread_end
Called at the end of display of a thread.
- archive_forum_start
Called at the start of display of a forum.
- archive_forum_thread
Called immediately before a thread in a forum is sent to the browser.
- archive_forum_end
Called at the end of display of a forum.
- archive_index_start
Called at the start of display of the archive index.
- archive_index_end
Called at the end of display of the archive index.
- archive_end
Called at the end of archive/index.php
Moderation Class:
These hooks are particularly useful if yo want to perform an action whenever one of the below events occurs to a thread - regardless if it was via a moderator or internally by MyBB. Example use would be in a cash/points system where you want to subtract or adjust rewards for a particular thread or post. You should not output anything from these calls and the action will be performed regardless of the plugins returned result.
- class_moderation_close_threads (tids)
Called when a thread or threads are closed. Array of thread IDs is passed.
- class_moderation_open_threads (tids)
Called when a thred or threads are opened. Array of thread IDs is passed.
- class_moderation_stick_threads (tids)
Called when a thread or threads are stuck. Array of thread IDs is passed.
- class_moderation_unstick_threads (tids)
Called when a thread or threads are unstuck. Array of thread IDs is passed.
- class_moderation_remove_redirects (tid)
Called when the remove redirects function is called. Thread ID is passed - all redirects to this thread are being deleted.
- class_moderation_delete_thread (tid)
Called when a thread is deleted. Thread ID is passed.
- class_moderation_delete_poll (pid)
Called when a poll is deleted. Poll ID is passed.
- class_moderation_approve_threads (tids)
Called when a thread or threads are approved. Array of thread IDs is passed.
- class_moderation_unapprove_threads (tids)
Called when a thread or threads are unapproved. Array of thread IDs is passed.
- class_moderation_delete_post (pid)
Called when a post is deleted. Post ID is passed.
- class_moderation_merge_posts (array)
Called when posts are merged together. Array of info is passed:
pids - Array of post IDs being merged together
tid - The ID of the thread they are in
- class_moderation_move_thread_redirect (array)
Called when a thread is moved and redirect is left. Array of info is passed:
tid - Thread being moved
new_fid - The new forum ID
- class_moderation_copy_thread (array)
Called when a thread is copied to another forum. Array of info is passed:
tid - The thread being copied
new_fid - The forum ID the thread is being copied to
- class_moderation_move_simple (array)
Called when a standard move is performed. Array of info is passed:
tid - The thread being moved
new_fid - The new forum ID
- class_moderation_merge_threads (array)
Called when two threads are being merged together. Array of info is passed:
mergetid - The thread being merged in to the other
tid - The destination thread ID
subject - The new subject of the merged thread
- class_moderation_split_posts (array)
Called when one or more posts are split from a thread. Array of info is passed:
pids - Array of post IDs being split from a thread
tid - The thread the posts are being split from
moveto - The new forum for the resulting split posts
newsubject - The new thread subject for the split posts
destination_tid - The thread ID if we're splitting in to another thread
- class_moderation_move_threads (array)
Called when more than one thread is being moved to another forum. Array of info is passed:
tids - Array of thread IDs
moveto - The new forum the threads are being moved to
- class_moderation_approve_posts (pids)
Called when one or more posts are approved. Array of post IDs is passed.
- class_moderation_unapprove_posts (pids)
Called when one or more posts are unapproved. Array of post IDs is passed.
- class_moderation_change_thread_subject (array)
Called when a thread subject is changed using the custom moderation tools. Array of info is passed:
tids - Array of thread IDs
format - The format thread subjects are being changed to
- class_moderation_expire_threadarray (array)
Called when an expiry time is set on a thread. Array of info is passed:
tid - The thread ID to be expired
deletetime - Unix timestamp of when the thread should expire.
- class_moderation_remove_thread_subscriptions (array)
Called when subscriptions are removed by the use of a moderation tool. Array of info is passed:
tids - Array of thread IDs
all - Are we removing all subscriptions?
fid - Forum ID if not removing all
Moderator Tools
Several hooks previously existed in moderation.php however more have been added to cover all tools. These hooks are particularly useful if you want to perform extra checks whenever a moderation tool is being performed or display output to the browser. They should be pretty self explanatory.
Quote:get errors like Depreciated function call: update_forum_count and Depreciated function call: update_thread_count.. at the uploading i have activated just the SEO plugin. Now i have deactivated it but don't work either..
You upgraded from a release earlier than MyBB 1.2.7, right?
Please use the search function as this has been covered many many times before: One of your plugins has not been updated for changes we made in 1.2.7 and you need to obtain an updated version.