View Full Version : second postcount
White_Snake
09-06-2005, 10:53 PM
well, i been trying to code a plugin for vb 3.5 that makes a second postcount for a single forum, i have already inserted a query into my database, "post2" in "user" table, and i have codded this so far by looking into plugins that works on the hooks i think are the correct:
Hook : Forumdata_start
$this->validfield['post2'] = array(TYPE_STR, REQ_NO);
And
hook: Newpost_process:
$post2 = fetch_field(post2)
if ($vbulletin->foruminfo['forumid']=='5')
{
$finalpost2count = ++$post2;
$this -> set('post2',"$finalpost2count");
}
so, help is apreciated :)
Tony G
09-07-2005, 05:14 AM
Better suited for mod discussion forum.
I dont understand what your question is.
White_Snake
09-07-2005, 06:20 PM
0k, frist im sorry for posting on the wrong forum x_x
now i hope to make myself clear with this explanation
i want to have a special postcount for post done on a ceirtan forum. to have a "special post" count
i have installed a new field on the table user named "post2" and i have developed the code so far:
the forumdata_start remains the same, and its working, i have the $vbulletin->userinfo['post2'] aside with the normal userinfo that shows the current $vblletin->userinfo['posts']
what i have changed now and seems that works better is the plugin on newpost_process:
$specialpost = $this->fetch_field('post2');
if ($vbulletin->input->shortvars['f']=='5')
{
++$specialpost;
$this->set('post2', "$specialpost");
}
so now, im having the problem : Fatal error: Call to a member function on a non-object in /home/whitesnake/public_html/myvbulletintestsite/includes/functions_newpost.php(285) : eval()'d code on line 41
line 41 seems to be the frist line on the code, so my own conlusion is that 'post2' into the fetch_array doesnt exist for the array and doesnt recognise it as an objet, so, anybody can help me please with this problem? :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.