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)

Gio~Logist 10-01-2008 10:00 PM

Live Statistics Image 1.0.0 Light
 
Brought To You By
ModernvB - Vbulletin Solutions & Services
http://www.modernvb.com

Live Statistics Image Light 1.0.0
A great way to display your website's live stats! A 468x60 image is automatically generated with your site's name, url, and a few statistics.

Live Demo:
http://www.giologist.com/vb/stats_image.php


Instructions
  • Upload stats_image.php
  • Get ready to link it away :p
    (it can be used in pretty much any image tag where dynamic images are accepted)

acquiesce 10-02-2008 05:19 PM

Can the image be posted anywhere, like signatures on other sites, for example?

I like the sound of this :)

Gio~Logist 10-02-2008 05:21 PM

Quote:

Originally Posted by acquiesce (Post 1635805)
Can the image be posted anywhere, like signatures on other sites, for example?

I like the sound of this :)

Yep, wherever dynamic images are accepted.. This will be allowed. The only reason you can't do it over here on vb.org (in your signature at least) is because they attach/store their signature pictures. So even if it were possible, it'd be pointless. However, wherever you are allowed to have an image tag, you can definitely bring this along! ;)

acquiesce 10-02-2008 05:50 PM

Fantastic. I'll be using this, would be good "word of mouth" advertising if I can get my users to use it :D

Lea Verou 10-02-2008 06:04 PM

Is the image cached or its generated every time?
If its generated every time, it could be bad for the server load.

schlottkej 10-02-2008 06:09 PM

Looks good (Im assuming its a cache)

Also, Im still waiting on that PM Gio~ =) )

GoTTi 10-02-2008 06:10 PM

this is the same as that stats in signature thing a LONG time ago that came out right? but it doesnt make a png image where you can share the image, you need to share the link to the php file?

killerkraft 10-02-2008 07:25 PM

I must admit, it's so simple it hurts my PhP programmer feelings, eheheh

Thank's and bravo.

KK

iogames 10-02-2008 07:54 PM

Wow...

Gio~Logist 10-02-2008 08:22 PM

Quote:

Originally Posted by GoTTi (Post 1635851)
this is the same as that stats in signature thing a LONG time ago that came out right? but it doesnt make a png image where you can share the image, you need to share the link to the php file?

Yea, i think there was something like this released a bit ago. I had remembered seeing someone's signature do something like this and so I decided to write a modification to do so. Not sure what you mean about sharing, but you can always have people link it to the .php file and it won't cause any security exploits of course. Other than that, there are ways to allow different urls, etc. via .htaccess.

Gio~Logist 10-02-2008 08:23 PM

Quote:

Originally Posted by schlottkej (Post 1635850)
Looks good (Im assuming its a cache)

Also, Im still waiting on that PM Gio~ =) )

Yep, the thread and reply count are pulled live via the forum's cache, and the amount of members is pulled via a query.

Gio~Logist 10-02-2008 08:24 PM

Quote:

Originally Posted by killerkraft (Post 1635912)
I must admit, it's so simple it hurts my PhP programmer feelings, eheheh

Thank's and bravo.

KK


Heh, not so difficult at all. It's just sometimes we over-analyze things and overlook the simpler solutions :p I'm definitely going to look into adding things though, to further allow the image outputted, etc. :)

Quote:

Originally Posted by iogames (Post 1635936)
Wow...

Glad you like it :up:

binevi 10-02-2008 09:53 PM

2 questions : 1. How can i change background colour? i mean defult colour written as $background = imagecolorallocate( $my_img, 255, 255, 255 ); how can i replace white colour with a image?

2. i think it is a different mod but rather than showing forum statistic how can we do it for each user's statistic i usually see that in signatures in different forums

by the way great hack (;

macc 10-02-2008 11:22 PM

nice hack - but how to change background color?

regards

macc

Gio~Logist 10-02-2008 11:31 PM

To change the background color edit the following line in the file:
PHP Code:

$background imagecolorallocate$my_img255255255 ); 

The 3 numbers (255) shown above are red,green,blue components of the color you wish to generate.

If you do not know how to find the red,green,blue components for your desire color, there are an assortment of websites you can resort to such as http://www.pagetutor.com/colorpicker/index.html

macc 10-02-2008 11:44 PM

thanks for help!

macc

PoetJA-1975 10-03-2008 03:17 AM

Excellent share = Thanx ;)
It would be nice to have a background IMAGE though.
Also - is there anyway - to center the text?

Thanx.

Jacquii.

https://vborg.vbsupport.ru/

TimberFloorAu 10-03-2008 06:41 PM

Works great. Thanks.

We use another script, which I wrote to add personal info on ( in our case visas )

Will post cpl of screenies. Reason I am asking, this mod, could pull lots of global info, which would be great for at a glance stuff.

Great work mate.

The attached image, triggers on hover. Is a writeable png, and is integrated within our forum. I havent released it, as the coding is complex, and beyond most users acceptable mod and template changes.

( Only added this info, as it deploys a dynamic png ) similar to question asked within this thread

to view in action: try this link ;)

http://www.yobromofo.com/forum/barbi...html#post55601

PoetJA-1975 10-03-2008 10:39 PM

^ Interesting - what script is that?

Jacquii.

TimberFloorAu 10-03-2008 11:18 PM

Quote:

Originally Posted by PoetJA-1975 (Post 1636814)
^ Interesting - what script is that?

Jacquii.

My own :)

TilkiBey 10-04-2008 02:01 PM

oops
an error!!!
i cant see that php page

i cant translate the error writing which shown in ff

the error writing in ie
Code:

<br /> <b>Fatal error</b>:  Call to undefined function:  imagecreate() in <b>c:\program files\easyphp1-8\www\forum\stats_image.php</b> on line <b>46</b><br />

TimberFloorAu 10-04-2008 10:47 PM

Why are you calling the stats_image.php locally ?

TilkiBey 10-05-2008 08:37 AM

Quote:

Originally Posted by TimberFloorAu (Post 1637433)
Why are you calling the stats_image.php locally ?

coz i dont ve an online vB site for now

i use local vB with easyphp
for testing add-ons, styles etc...
and,for translating add-ons.

is it (using localhost) a problem for this add-on?

star88 10-05-2008 07:20 PM

what an excellent work
merci !

TilkiBey 10-11-2008 04:09 PM

will u ans. my question?

soqzippo 10-12-2008 05:25 AM

Love this thing. Although how do you edit it so that it links to your website? instead of just the image


http://soqpro.com/stats_image.php

soqzippo 10-12-2008 05:28 AM

Quote:

Originally Posted by PoetJA-1975 (Post 1636189)
Excellent share = Thanx ;)
It would be nice to have a background IMAGE though.
Also - is there anyway - to center the text?

Thanx.

Jacquii.

http://jpicforum.info/stats_image.php

Change the numbers in red higher or lower


imagestring( $my_img, 5, 78, 0, $vbulletin->options[bbtitle], $text_colour );

imagestring( $my_img, 2,95, 15, $vbulletin->options[bburl], $text_colour );
imagesetthickness ( $my_img, 2 );
imageline( $my_img, 0, 30, 300, 30, $line_colour );

imagestring( $my_img, 2,36, 40, "Threads: $total_threads Posts: $total_posts Members: $total_members", $text_colour );

denman75 10-12-2008 06:11 AM

installed *
another great feature from u running on my site
btw have it installed in my footer also ;)

http://www.bullterrierforum.nl/bullf...tats_image.php

RedTrinity 10-18-2008 10:07 AM

Brilliant little hack :)

Any way to change the font?

http://www.theparentingsanctuary.com...tats_image.php

dodjer42 10-20-2008 01:42 PM

This script is dangerous. It contains several db queries. By posting it on a busy forum you are effectively creating your own distributed denial of service.

A far more safe way to do this, though not updated in real time, is to run a cron job which creates the signature image every hour or so.

In regards to changing font, its pretty straight forward:

PHP Code:

$font_size "10";
$font_file "bombard.ttf"
imagettftext($my_img$font_size305$text_colour$font_file$vbulletin->options[bbtitle]); 

Font must be a true type.

soqzippo 10-20-2008 11:24 PM

nobody cares.. the mod rules

dodjer42 10-21-2008 05:50 AM

Quote:

Originally Posted by soqzippo (Post 1649341)
nobody cares.. the mod rules

And you speak for all?

The implementation of a statistics signature for vbulletin is a great idea, though it has been done before, and done better:

http://www.vbseo.com/blogs/danny-bem...-generator-63/

Gio deserves rep for it but at the same time, those considering it should be aware of the risk of this code.

Read around; lots of admins shy away from installing mods that perform even a single database query on a busy board. Now this does 3 queries for every view of the signature. Say you post this signature on a busy forum with around 100 concurrent users. You are looking at 300 mysql queries to generate a single image. Big problem!

carlos54321 10-21-2008 08:25 AM

Quote:

Originally Posted by dodjer42 (Post 1648919)
This script is dangerous. It contains several db queries. By posting it on a busy forum you are effectively creating your own distributed denial of service.

A far more safe way to do this, though not updated in real time, is to run a cron job which creates the signature image every hour or so.

In regards to changing font, its pretty straight forward:

PHP Code:

$font_size "10";
$font_file "bombard.ttf"
imagettftext($my_img$font_size305$text_colour$font_file$vbulletin->options[bbtitle]); 

Font must be a true type.

Thanks
liked this mod but as to the comment you made,your right this is not so good so until i can work out how to cron job it then ive uninstalled.
would be nice on some instructions on how to make a cron job which creates the signature image every hour or so. please:)

dodjer42 10-21-2008 08:39 AM

Check the link above Carlos. That one has a cron built in.

Maybe Gio will include one in an update too.

carlos54321 10-21-2008 10:45 AM

:) ahh fantastic cheers fella

Gio~Logist 11-24-2008 08:13 AM

Updated stats_image.php to use vbulletin's datastore and forumcache to pull stats, as oppose to running queries for each.

onehost 11-24-2008 07:30 PM

Interesting, I like this, Marked Installed.

however, i really do not like the background/font colors, anyway to change this?

TerryMason 01-05-2009 04:40 PM

Quote:

Originally Posted by onehost (Post 1672180)
Interesting, I like this, Marked Installed.

however, i really do not like the background/font colors, anyway to change this?


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 ); 


private_ale 01-05-2009 07:32 PM

Awesome idea and very customizable!
Installed :D

and because I'm in a good mood, Nominated for MOTM :)

https://vborg.vbsupport.ru/

clubbah 01-08-2009 02:32 AM

Is there a way where you can also include how many members are currently online? Is that possible?


All times are GMT. The time now is 05:49 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.01398 seconds
  • Memory Usage 1,837KB
  • 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
  • (4)bbcode_php_printable
  • (11)bbcode_quote_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
  • (40)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