Email on EDIT - Another Web Company
ArcadeDownloadsNewslettersForum MenuNavigationWhat AWC OffersWiki ToolsLogin or Create Account

Log in

You must have cookies enabled to log in to Main Site - Local.

 

Email on EDIT

From Another Web Company

You are viewing a single post from the thread title above
Have a suggestion, improvement, change or non-beta Forum Entension bug ? Please add them to the todo list

Click here for full thread
Forum Vet
Wiki Edits: 2898
Threads 135
Posts 1397
Just added a hook for you.

Edit file: extensions/awc/forums/post.php
Find:
In the edit_post() function
$rDB = wfGetDB( DB_SLAVE );

Above that add:
wfRunHooks( 'awcsforum_edit_thread', &$this );   // 2.5.8



That will give you access to a bunch of info (and you could also change that info (if you wanted to) and the changes would be saved since the hook is being called just before the SQL save), and you can use that to do what you need to do.
Heres the object info which you will have access to.
awcsforum_post_cls Object
(
    [ann] => 0
    [sticky] => 0
    [lock] => 0
    [id] => 
    [tID] => 9
    [fID] => 1
    [pID] => 35
    [title] => Test "double" 'single'
    [p_title] => Test "double" 'single'
    [post] => Test "double" 'single'
    [ThreadTitle] => 
    [isThread] => yes
    [m_thread_subsrib] => Array
        (
            [9] => email
        )
 
    [m_forum_subsrib] => 
    [cur_memID] => 1
    [cur_memName] => Me
    [cur_m_posts] => 30
    [cur_m_topics] => 8
    [mId] => 1
    [mName] => Me
    [forum_Antispam] => 
    [ispoll] => 
    [polls_enabled] => 1
    [action] => post/todo_edit_post/
    [subscrib_what] => 
    [subscribe] => 
    [cf_add_post_text_to_wiki] => 
    [t_wiki_pageID] => 
    [f_name] => 
    [num_topics] => 
)


So in your extension code, use what you already have, but with out the hook call you added.
The below is a copy/paste and untested, but should work.

$wgHooks['awcsforum_edit_thread'][] = 'yourHookFunctionName';
 
function yourHookFunctionName($editInfo){
 
	require_once(awc_dir . 'includes/subscribe.php');
	$t_subscribe = new awcs_forum_subscribe();
	$t_subscribe->fID = $editInfo->fID;
	$t_subscribe->tID = $editInfo->tID;
	$t_subscribe->cur_memID = $editInfo->cur_memID;    
	$t_subscribe->subscribe = $editInfo->subscribe;
	$t_subscribe->title = $editInfo->title; //;$this->ThreadTitle;
	$t_subscribe->post = $editInfo->post;
	$t_subscribe->m_thread_subsrib = $editInfo->m_thread_subsrib; 
	$t_subscribe->m_forum_subsrib = $editInfo->m_forum_subsrib;
	$t_subscribe->check_user_thread_subscribe();
 
	return true;
 
}


Post back how you made out...

_
~ What was once an opinion, became a fact, to be later proven wrong ~
  • Forum Ver. 2.5.10 has been released (6/19/2010), Download here.



Whos here now: Members 0 Guests 0 Bots/Crawlers: 0


AWC's: 2.6.0 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC