News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

trackStats

Started by endomorph, November 30, 2010, 11:22:42 AM

Previous topic - Next topic

endomorph

I am using trackStats(array('topics' => '+', 'posts' => '+')); in ome code but it does not seem to be working.

Any ideas ??

Masterd

Can you give as an example of your code?

endomorph

OK the problem is to do with he RSS Feed poster MOD. The owner does not have time to fix this but I really need it fixed. So the code in the feed page is -


                                                               $msgOptions = array(
'id' => 0,
'subject' => $feed['topicprefix'] . $msg_title,
'body' => '[b]' . $msg_title . "[/b]\n\n" . $msg_body,
'icon' => 'xx',
'smileys_enabled' => 1,
'attachments' => array(),
);
$topicOptions = array(
'id' => 0,
'board' => $feed['ID_BOARD'],
'poll' => null,
'lock_mode' => $feed['locked'],
'sticky_mode' => null,
'mark_as_read' => false,
);
$posterOptions = array(
'id' => $feed['ID_MEMBER'],
'name' => $feed['postername'],
'email' => '',
'ip' => '127.0.0.1',
'update_post_count' => (($feed['ID_MEMBER'] == 0) ? 0 : 1),
);


createPost($msgOptions, $topicOptions, $posterOptions);



and in subs-post.php you have

trackStats(array('topics' => '+', 'posts' => '+'));

Normal forum posts increase the count, RSS feed posts do not and I cant understand why

endomorph


Masterd

What is not working? The whole mod or just one option?

endomorph

When the RSS mod makes a post, it sends the post through to  createPost($msgOptions, $topicOptions, $posterOptions); to write the post to the DB ... etc however it does not update smf_log_activity by 1 topic and 1 post

Making a normal post or creating a topic does.

So it is not executing trackStats(array('topics' => '+', 'posts' => '+')); in subs_post.php

Deaks

endomorph do you still require assistance, as you have not bumped this topic I am going to assume that you dont and mark it as such, if this is incorrect please say and update us on what you have tried.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: