vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - Live Statistics Image 1.0.0 Light (https://vborg.vbsupport.ru/showthread.php?t=192512)

flup 01-19-2009 05:08 PM

Simple & Nice, installed.

Shamil. 02-07-2009 08:47 AM

Brilliant...Would you be able to post some tutorials on how to modify this. For example on how to change the background to an image or gradient. And mabey create some modules to create signatures for specific users rather than the whole forum.

GCSkye 03-02-2009 01:08 PM

Quote:

Originally Posted by TerryMason (Post 1702438)
Take a look at this image
http://www.pchangout.com/forum/sig5.php

I just used my own background with it:

PHP Code:

// Gather info
$total_posts number_format($total_posts);  
$total_threads number_format($total_threads);  
$total_members vb_number_format($vbulletin->userstats['numbermembers']); 

$my_img imagecreatefrompng("http://www.pchangout.com/images/sig/5.png");
$background imagecolorallocate$my_img255255255 );
$text_colour imagecolorallocate$my_img000000);
$line_colour imagecolorallocate$my_img203203203 ); 


I got the following:

PHP Code:

<?php
//###############################################
////////////////////// Satistics Image Light 1.0.0 Add-On /////////////////
//////-----------------------                by Gio~Logist                --------------------\\\\\\\\\\
/////------------------------   http://www.giologist.com/vb    ---------------------\\\\\\\\\\
///////////////////////////////////////////////////////////////////////
//###############################################

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''stats_image');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);

// get special data templates from the datastore
$specialtemplates = array(
    
'userstats'
);

// pre-cache templates used by all actions
$globaltemplates = array(
);

// pre-cache templates used by specific actions
$actiontemplates = array(
);

// ######################### REQUIRE BACK-END ############################
require_once('global.php');

Header ("Content-type: image/gif");

// Count Threads and Posts
$counter $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " TABLE_PREFIX "post");  
$count_threads $db->query_first("SELECT COUNT(*) AS threads FROM " TABLE_PREFIX "thread");  

// Gather info
$total_posts=number_format($counter['posts']);
$total_threads number_format($countthreads['threads']);
$total_members vb_number_format($vbulletin->userstats['numbermembers']); 

$my_img imagecreatefrompng("http://www.evercube.net/images/eclite.png"); 
$background imagecolorallocate$my_img255255255 ); 
$text_colour imagecolorallocate$my_img000000); 
$line_colour imagecolorallocate$my_img203203203 ); 

imagestring$my_img305$vbulletin->options[bbtitle], $text_colour );

imagestring$my_img2015$vbulletin->options[bburl], $text_colour );
imagesetthickness $my_img);
imageline$my_img03046830$line_colour );

imagestring$my_img2040"Threads: $total_threads Posts: $total_posts Members: $total_members"$text_colour );

header"Content-type: image/gif" );
imagegif$my_img );
imagecolordeallocate$line_color );
imagecolordeallocate$text_color );
imagecolordeallocate$background );
imagedestroy$my_img );
?>


The image location is right but when I view the php I get no image:
http://evercube.net/forum/stats_image.php

Any thoughts on why this isn't working?

=-=-=-= Edit

Seemed to fix itself. Thanks thou.


All times are GMT. The time now is 01:58 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.01153 seconds
  • Memory Usage 1,753KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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