vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Small Hack (https://vborg.vbsupport.ru/showthread.php?t=59138)

Logitech-2004 12-13-2003 03:49 AM

Small Hack
 
How Do I List Diff Users Count On Main Page

Platinum Members: ?
Platinum+ Members: ?
Moderators: ?
Super Moderator: ?
Administrators: ?

How Do I Fill In The "?"'s

i know it's a templat edit, but what coding is required for it to work?

Dean C 12-13-2003 09:11 AM

This requires more of a template edit. It requires code modications also.

Something like this in your index.php:

PHP Code:

$platinum_usergroupid 7
$platinum_users $DB_site->query_first("SELECT COUNT(*) AS total FROM user WHERE usergroupid='".invtal($platinum_usergroupid)."'"); 

A bit of modifcation of that code will do the trick :)

Logitech-2004 12-13-2003 03:57 PM

Fatal error: Call to undefined function: invtal() in /var/www/html/platinum/index.php on line 16

Lesane 12-13-2003 04:35 PM

Typo from mist, change invtal into intval

Logitech-2004 12-13-2003 05:11 PM

Platinum+ Members: Array
ummm?

Neo 12-13-2003 05:15 PM

$platinum_users[total]
$platinumplus_users[total]
$moderators[total]
etc

make sure you add the array name after the variable.

Logitech-2004 12-13-2003 05:18 PM

Thanx Neo!!! Hey, U Want To Make That Hack For Me?

Logitech-2004 12-13-2003 05:25 PM

$3M1=$DB_site->query_first("SELECT FROM 3MStatus WHERE 3M1");
$3M2=$DB_site->query_first("SELECT FROM 3MStatus WHERE 3M2");
$3M3=$DB_site->query_first("SELECT FROM 3MStatus WHERE 3M3");
$3M4=$DB_site->query_first("SELECT FROM 3MStatus WHERE 3M4");

Do You See Problem With This?

assassingod 12-13-2003 05:32 PM

Yes, in the WHERE clause you arent setting a column. You need to use WHERE colname = '3m1' etc

(You have to change colname though)

Also, you aren't selecting anything. (If you want to select everything, use SELECT * )

Logitech-2004 12-13-2003 05:39 PM

i have in my database

Table: 3MStstus
And Col's 3M1 3M2 3M3 3M4


All times are GMT. The time now is 09:25 AM.

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.01033 seconds
  • Memory Usage 1,725KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete