vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Whats wrong? (https://vborg.vbsupport.ru/showthread.php?t=202130)

CAMS 01-17-2009 04:04 PM

Whats wrong?
 
how do i show the number of current subscribers?

tryed to make an old simple hack work to show the numbers but cant work it out...

heres the code i have... any help would be great?

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
        <plugin active="1" product="vbulletin">
                <title>Subscriber Count</title>
                <hookname>global_start</hookname>
                <phpcode><query_read("SELECT * FROM subscriptionlog WHERE status = 1");
$totalsub = mysql_num_rows($query1);]]></phpcode>
        </plugin>
</plugins>


doesnt work tho... just shows blank...

Lynne 01-17-2009 04:19 PM

So many things...... you aren't using the correct query syntax - take a look at any vbulletin page. Do you really want to do this query on every single page? That is what will happen if you use the global_start hook. You do a num_rows on $query1 which isn't even defined.

CAMS 01-17-2009 06:50 PM

Quote:

Originally Posted by Lynne (Post 1715894)
So many things...... you aren't using the correct query syntax - take a look at any vbulletin page. Do you really want to do this query on every single page? That is what will happen if you use the global_start hook. You do a num_rows on $query1 which isn't even defined.


LOL that will be why then :P

am not a coder.. just was going by what the other plugin xml had inside it.


looked simple enough and small but guess its more complicated than i thought :)


Cheers anyway :)
Chris

Dismounted 01-18-2009 03:30 AM

Your XML is incorrectly formed in the first place. You should not edit files by hand, but rather, add/edit plugins through the Admin CP and export them when done.


All times are GMT. The time now is 01:02 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.02074 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_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