vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   topics started in postbit (https://vborg.vbsupport.ru/showthread.php?t=33269)

heretic 12-16-2001 08:40 PM

I'm trying to get the topics started where the posts would be, although it's not showing up, I assume I'm not putting the query in the right place.

this isn't my code, it's off another hack, but I figured it'd be the same;

PHP Code:

// topics started hack
  
$startcount $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postusername='$userinfo[username]' AND open!='10'");
  
$starts $startcount[starts]; 

and the in postbit I put:

PHP Code:

<smallfont>Topics$starts</smallfont><br/> 


bira 12-17-2001 06:34 AM

the query should be in showthread.php

then, in admin/functions.php, find:

Code:

        // user
        global $bbuserinfo,$session,$ignore;

And change it to:

Code:

        // user
        global $bbuserinfo,$session,$ignore[high],$starts[/high];

The reason it's not working for you now is not because of the query, it's because $starts isn't declared as global in the getpostbit function.


All times are GMT. The time now is 05:55 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.00947 seconds
  • Memory Usage 1,714KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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