vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   second postcount (https://vborg.vbsupport.ru/showthread.php?t=95775)

White_Snake 09-06-2005 10:53 PM

second postcount
 
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
PHP Code:

$this->validfield['post2'] = array(TYPE_STRREQ_NO); 

And

hook: Newpost_process:

PHP Code:

$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.

merk 09-07-2005 05:57 AM

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:
PHP Code:

$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? :)


All times are GMT. The time now is 01:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00975 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete