PDA

View Full Version : Forum+ecDownloads Stats on Signature Image


Mr Chad
09 Dec 2005, 01:30
If you like it click
https://www.vbulletin.org/forum/ (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=102551)


Installation Time: <5 mins
Files: 1
Plugins: 1
VB Version: This actually works on 3.5.0 - 3.5.4 for 3.6.0 - 3.6.4 go here (http://www.vbulletin.org/forum/showthread.php?t=136449)


Description:

This Hack will but your vb Forum stats (i.e. No. of Members, Threads and Posts) on your Signature Image. It uses the layout from sig.jpg, calls the stats from your Databank and creates a new images called signature.jpg

This hack uses the PHP-GD Function, so be shure you have this enabled on your server. If you donīt be shure about this, ask your host or look in your PHP-Info.

Installation Instructions:

Open signature.php in a text editor and set the variables at top according to your requirements (These are settings for stats text placement and with and height of signature image)
Upload signature.php to your forums directory
Open sig.jpg in your favourite Graphics Programm and make a real cool Signature image
Save it with the same name and upload it to your forum directory
Install the plugin and wait 5 mins :)Examples:http://the-chad.com/forums352/signature/signature.jpg

http://the-chad.com/forums352/banner.jpg

https://www.vbulletin.org/forum/
FAQ: N/A

If you like it click
https://www.vbulletin.org/forum/ (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=102551)

This hack was based on tkeil69575's hack (http://www.vbulletin.org/forum/showthread.php?t=50848&highlight=signature.php).


To add extra stats look in the signature.php for more info.

HMBeaty
09 Dec 2005, 01:34
Screenshot please?

dieselpowered
09 Dec 2005, 01:36
Ummm there is nothing attached my friend??

singhoo
09 Dec 2005, 01:37
no file to download?

Mr Chad
09 Dec 2005, 01:39
no file to download?

added it.

and added a example

and some instructions

dieselpowered
09 Dec 2005, 01:47
Doh there the instructions are :)

Mr Chad
09 Dec 2005, 01:51
Doh there the instructions are :)

lol, sorry never released anything before. (I was adding everything piece by piece)

Zachariah
09 Dec 2005, 01:54
lol, sorry never released anything before. (I was adding everything piece by piece)

I rem my 1st time. :rolleyes: :laugh:

I'll take a look

Mr Chad
09 Dec 2005, 01:58
I rem my 1st time. :rolleyes: :laugh:

I'll take a look

lol, thanks

WNxWakko
09 Dec 2005, 03:39
I did everything. The image was created, the 3 lines are on the image, but all data shows 0. I put in my DB username and pass all correctly. Running 3.5.2

Mr Chad
09 Dec 2005, 04:03
did you run the php file? and are you getting any errors?

evenmonkeys
09 Dec 2005, 04:17
I like the hack, but the instructions need to be re-done a bit. There are far too many errors in the installation instructions themselves and it's making it hard to fully understand.

WNxWakko
09 Dec 2005, 04:19
I did run the php manually, it does create the 2nd image. I do get these errors though,

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /******************/Forum/signature.php on line 55

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /******************/Forum/signature.php on line 57

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /******************/Forum/signature.php on line 62

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /******************/Forum/signature.php on line 64

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /******************/Forum/signature.php on line 69

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /******************/Forum/signature.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /******************/Forum/signature.php:55) in /******************/Forum/signature.php on line 103

evenmonkeys
09 Dec 2005, 04:26
Fatal error: Call to undefined function: imagecreatefromjpeg() in /path/signature.php on line 84

Mr Chad
09 Dec 2005, 04:40
Fatal error: Call to undefined function: imagecreatefromjpeg() in /path/signature.php on line 84

let me see.

Do you have GD 2.0 installed?

Mr Chad
09 Dec 2005, 04:47
I did run the php manually, it does create the 2nd image. I do get these errors though,

it looks like you didnt enter in the right table prefix.

WNxWakko
09 Dec 2005, 06:11
how do I find out the table prefix?

Mr Chad
09 Dec 2005, 06:27
like what are your tables named in your database, i think the standard is 'vb3_' look at one of your tables for example vb3_user

dieselpowered
09 Dec 2005, 16:30
Standard is no table prefix at all :)

You can check your prefix either by going into the db via php my admin or you can go into your config file and looking at what you entered :)

WNxWakko
09 Dec 2005, 22:53
sweet, that was the trick. I had no table prefix defined, it was just "" so now it works perfect.

Mr Chad
09 Dec 2005, 22:59
oh, guess i learned something.

WNxWakko
09 Dec 2005, 23:29
I know you said to put the signature.php in the Forum/ directory, but setting up the cron is not easy for it being in that directory. Just for anyone else to know, you can just put the signature.php file in your includes/cron/ directory and it still works the same without changing any settings. Then you can just use the defaut cron setup.

Here is my working Signature,
http://www.warriornation.net/Forum/images/dynamicwakko/sig2.jpg

I do have a question or two.

How did you add the number online bit. Also the info in my sig is not perfectly calculated to what the board says on members, posts and threads. Is it excluding certain usergroups and forums? members are about 20 off, threads are about 3000 off.

Mr Chad
09 Dec 2005, 23:40
Its because its not calling the global.php, so it just goes straight to the database im thinking its adding all the things you deleted. because lets say you make thread 100 and then you delete it, and someone makes another thread its going to be 101 not 100 again. It just pulls the ID number.

WNxWakko
09 Dec 2005, 23:47
hmm ok. I just found the difference in members, Its excluding all that are in the Awaiting Moderation usergroup on my board.

The threads bit is really really far off,
1,357,759 is actual, its about 22,104 off.

Mr Chad
10 Dec 2005, 00:02
hmm ok. I just found the difference in members, Its excluding all that are in the Awaiting Moderation usergroup on my board.

The threads bit is really really far off,
1,357,759 is actual, its about 22,104 off.

yea it doesnt look at what was deleted.

like make a new thread and look at the thread number, same w/ the post number.

oh and the currently online thing. I made mine up lol, im working on a way to pull it out.

Mr Chad
10 Dec 2005, 05:10
Ok just find:
$totalposts=number_format($postb['posts']);
and replace with this
$totalposts=number_format($postb['posts'] - 22640);

Mr Chad
10 Dec 2005, 05:34
im just messin around and i figured our how to call up stats from ecdownloads mod.

Lea Verou
10 Dec 2005, 08:39
Woah I wanted to make this!!
Thanks you saaved me lots of time!!! :D

Mr Chad
10 Dec 2005, 08:46
Woah I wanted to make this!!
Thanks you saaved me lots of time!!! :D

lol no problem.

board.trash
11 Dec 2005, 02:16
nice hack, thank you !

can you tell me how can i change the font type?

Mr Chad
11 Dec 2005, 03:36
hmm, thats one thing i was not able to do, ill work on that.

If anyone wants me to tell you how to let it show how many files you have in ecDownloads and how may times they have been downloaded. Just ask.

Mr Chad
14 Dec 2005, 08:03
anyone know how to get the latest member?

Dark Riku
15 Dec 2005, 19:25
anyone know how to get the latest member?

Yea, Id also like to know how to add the Latest member.

Stephen3
20 Dec 2005, 22:52
nice~

trancetopia
20 Dec 2005, 23:23
I've been waiting for this, thanks. Works like a charm :)

/me clicks install

Mr Chad
24 Dec 2005, 03:21
Ok i did some research. Results are in the hack description.

If you have ecdownloads you will love this.

This will get these stats: total downloads, total downloads downloaded, latest download, Latest Member

Zia
24 Dec 2005, 05:31
umm im kinda confused...does this need sql query...if so..how many sql query it needed?
if this..xtra sql query in every page....won't it slow down the page load?/

Mr Chad
24 Dec 2005, 06:12
no lol... you use the php file to create the sig image. and set the cron to run that file every 15 mins, you use the .jpg for the sig image. so it does a few querys every 15 mins.

Mr Chad
25 Dec 2005, 02:20
Im working on a way to get currently online.

Toneboy
29 Dec 2005, 16:27
Works nicely. How do you change the font & text positioning?

Mr Chad
01 Jan 2006, 01:39
added one for total threadviews. Look ^UP^

Mr Chad
01 Jan 2006, 01:43
Works nicely. How do you change the font & text positioning?

I currently dont know how to change the font

But you can change positioning by changeing this:
$left = 15; //Left text-margin
$top = 9; //text-margin from top

Xtrato
01 Jan 2006, 05:33
how about color?

Mr Chad
02 Jan 2006, 01:22
im noob to text ^_^ ill see what i can do.

Ron1n
02 Jan 2006, 01:24
nice work chatbum!

Mr Chad
07 Jan 2006, 22:17
nice work chatbum!

thanks.

Totti
14 Jan 2006, 20:54
hmmm,
my stats refering to vbHome are:
Threads: 7'008, Posts: 144'435, Members: 3'012

here's my sig:
https://www.vbulletin.org/forum/external/2006/01/7.jpg

i understood the issue with the deleted stuff, but why shows my sig less than my forumHome?!?
why not taking the same query as forumHome?


and ... i cannot get this showtotalhits working, showing some crazy php error - was for testing issues though ;)


so, THUMBS UP and installed :)

Mr Chad
15 Jan 2006, 03:11
hmmm,
my stats refering to vbHome are:
Threads: 7'008, Posts: 144'435, Members: 3'012

here's my sig:
http://fmcorner.4players.de/signatur2.jpg

i understood the issue with the deleted stuff, but why shows my sig less than my forumHome?!?
why not taking the same query as forumHome?


and ... i cannot get this showtotalhits working, showing some crazy php error - was for testing issues though ;)


so, THUMBS UP and installed :)

Thanks, when i have time ill see if i can work out the total hits bit.

evenmonkeys
16 Jan 2006, 02:22
How do you make them show up in one straight line rather than line breaks?

Mr Chad
19 Jan 2006, 20:13
How do you make them show up in one straight line rather than line breaks?

not that hard go into the php and find the /n and remove all of them except the one at the end of the sentence.

Totti
19 Jan 2006, 20:59
except the one at the end of the sentence.
is there a special need for this? worked for me even without that one, too ;)

Mr Chad
21 Jan 2006, 04:08
oh, well then i guess you dont need the last one :)

GamerJunk.net
27 Jan 2006, 18:18
This is amazing thanks.

GamerJunk.net
27 Jan 2006, 19:14
I just need to find out how to make a better looking logo lol

GamerJunk.net
27 Jan 2006, 19:19
I want it to have my forum name above the member info...how would I do that?

https://www.vbulletin.org/forum/external/2006/01/1.php

Mr Chad
27 Jan 2006, 23:41
I want it to have my forum name above the member info...how would I do that?

http://www.gsnforce.com/forum/signature.php

just edit the picture and add the name on it :).

IrPr
29 Jan 2006, 15:33
Nice !!
is it possible to do cronjob with VB Scheduled Tasks?

Mr Chad
29 Jan 2006, 23:59
Nice !!
is it possible to do cronjob with VB Scheduled Tasks?

thats what your spose to do :)

Mr Chad
01 Mar 2006, 00:38
Still works w/ 3.5.4 :)

PixelFx
08 Mar 2006, 08:31
Still works w/ 3.5.4 :)

works great on v3.5.4

Mr Chad
18 May 2006, 06:33
changed it so it is a product and less file edits :)

Mr Chad
26 May 2006, 03:00
~updated~

P.Jackson
30 May 2006, 10:28
im getting

Fatal error: Call to a member function on a non-object in /home/*********/public_html/forum/includes/cron/signature.php on line 18

Any ideas?

Mr Chad
30 May 2006, 14:59
not sure.

P.Jackson
30 May 2006, 15:20
damn was looking forward to getting this to work :(

Mr Chad
31 May 2006, 00:06
it should work. ill test this later.

Smiry Kin's
07 Jun 2006, 09:45
doesnt work for me.. install instructions not very clear, had no idea where to put the jpg file.. so i dont no if its wrong..
The image “/administrator/cronadmin.php?do=runcron&cronid=14” cannot be displayed, because it contains errors. thats in admincp

when i try to go onto the signature.php i get
Fatal error: Call to a member function on a non-object in signature.php on line 18

Jetrome
08 Jun 2006, 08:04
nevermind.

it works. thanks lots.

one question. if we want the ecDownloads stats, where do i put hte code in the signature.php file?

Mr Chad
08 Jun 2006, 23:36
when i upgraded the code changed. That is for refrence, ill work on updating it so you can use it.

Mr Chad
08 Jun 2006, 23:38
doesnt work for me.. install instructions not very clear, had no idea where to put the jpg file.. so i dont no if its wrong..
The image “/administrator/cronadmin.php?do=runcron&cronid=14” cannot be displayed, because it contains errors. thats in admincp

when i try to go onto the signature.php i get
Fatal error: Call to a member function on a non-object in signature.php on line 18

place it with your php file. where ever you put that.

Mr Chad
09 Jun 2006, 00:03
acutally install my new one. Updated it with EC stats. Any problems just reply.

SupremeWeapon
17 Jun 2006, 18:58
Fatal error: Call to a member function query_first() on a non-object in /forums/signature.php on line 18

line 18

$postcount = $vbulletin->db->query_first("SELECT COUNT(*) AS posts FROM " . TABLE_PREFIX . "post");

Latest Mysql
latest php
latest GD

Smiry Kin's
18 Jun 2006, 04:25
place it with your php file. where ever you put that.
place what? i downloaded the new version installed - same issues..

Mr Chad
18 Jun 2006, 07:16
hmm, ill look into this when i have time... (my site went down yesterday ><)

imported_Visions
19 Jun 2006, 08:05
I'm totally lost, I have installed the hack and went into vb schedualed taskes and ran the cron job and this is what I get. Database error in vBulletin 3.5.1:

Invalid SQL:
SELECT SUM(views) as pageviews FROMthread;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROMthread' at line 1
Error Number : 1064
Date : Monday, June 19th 2006 @ 02:55:38 AM
Script : http://www.mmoupdate.com/admincp/cronadmin.php?do=runcron&cronid=14
Referrer : http://www.mmoupdate.com/admincp/cronadmin.php?do=modify
IP Address : 68.52.48.164
Username : Administrator
Classname : vb_database

Any Ideas. Is there any way to get clear directions on the install of this mod? The directions are very unclear and I am really lost. Any help would be appreciated.

Smiry Kin's
19 Jun 2006, 12:15
I'm totally lost, I have installed the hack and went into vb schedualed taskes and ran the cron job and this is what I get. Database error in vBulletin 3.5.1:

Invalid SQL:
SELECT SUM(views) as pageviews FROMthread;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROMthread' at line 1
Error Number : 1064
Date : Monday, June 19th 2006 @ 02:55:38 AM
Script : http://www.mmoupdate.com/admincp/cronadmin.php?do=runcron&cronid=14
Referrer : http://www.mmoupdate.com/admincp/cronadmin.php?do=modify
IP Address : 68.52.48.164
Username : Administrator
Classname : vb_database

Any Ideas. Is there any way to get clear directions on the install of this mod? The directions are very unclear and I am really lost. Any help would be appreciated.
Donno but thats alot better error then just a few text words im getting..

Mr Chad
20 Jun 2006, 00:44
just comment out the pageviews bit...

SupremeWeapon
20 Jun 2006, 18:39
line 18



Latest Mysql
latest php
latest GD



Well any ideas yet?

SupremeWeapon
29 Jun 2006, 07:19
k, 9 days. what is up with this modification?

Still having the SAME issues

Fatal error: Call to a member function query_first() on a non-object in /forums/signature.php on line 18

VBUsers
29 Jun 2006, 09:50
can this work with 3.6 beta 3? hope so

SupremeWeapon
30 Jun 2006, 16:41
It has issues on 3.5.4 that th eauthor has yet to fix. So I really doubt it would work for 3.6

aceofspades
01 Jul 2006, 16:58
Hey guys, ive installed it (kept all the files as default) but when i go to www.hiven.net/forum/sig.jpg i see the image but there is no stats there? Can anyone please help me get this up and running, i would really like it

If there should be another jpg somewhere, where should it be? Im 99% there isnt one, just the two i uploaded. On top of that i see nothing when i go to www.hiven.net/forum/signature.php

Please help :(

SupremeWeapon
02 Jul 2006, 11:11
Chad... this is when my sig kicks in. if you are going to release something to the community the least you can do is fix it for them.

so many potential goodies like this one endup is the scrap yard because of the lazy coiders who just don;t have the respect to fix them.

LICryptkeeper
12 Jul 2006, 17:50
here's mine:

http://network.montrealforums.com/links/invite2.jpg

I've made a few, and am putting them on an invites and link to us page for signatures and stuff.

murdo
14 Jul 2006, 12:43
Does anyone know if this can accomodate adding Arcade Stats to the sig?

Snake
14 Jul 2006, 13:01
Thanks, just installed it! :)

Mr Chad
16 Jul 2006, 05:49
I no longer support this mod, because it works for some and does not work for others. If you can get it to work for yourself explain how you did it. I have been very busy and do not have time to keep up with my hacks.

aceofspades
16 Jul 2006, 20:54
Um great....Can anyone explain how they got it working or the possible reason it may not be working, chad if you could help at all it would be a big help.

Cagonni
19 Nov 2006, 10:27
in 3.6.x open product-imgsigstat.xml

Find:

<installcode><![CDATA[$db->query_write("INSERT INTO " . TABLE_PREFIX . "cron (weekday, day, hour, minute, filename, loglevel, title) VALUES (-1, -1, -1, 'a:1:{i:0;i:5;}', './signature.php', 1, 'Stats in Signature')");]]></installcode>


Change with:

<installcode><![CDATA[$db->query_write("INSERT INTO " . TABLE_PREFIX . "cron (weekday, day, hour, minute, filename, loglevel, varname) VALUES (-1, -1, -1, 'a:1:{i:0;i:5;}', './signature.php', 1, 'Stats in Signature')");]]></installcode>

Crow
23 Nov 2006, 20:10
Chad... this is when my sig kicks in. if you are going to release something to the community the least you can do is fix it for them.

so many potential goodies like this one endup is the scrap yard because of the lazy coiders who just don;t have the respect to fix them.

here here

Mr Chad
31 Dec 2006, 18:29
Chad... this is when my sig kicks in. if you are going to release something to the community the least you can do is fix it for them.

so many potential goodies like this one endup is the scrap yard because of the lazy coiders who just don;t have the respect to fix them.
... your the member ...

how are you contributing? your saying that I'm obligated to produce quality code for you? I'm sorry if the code worked at one point and no longer works, I don't have the time to fix it. If you really wanted the hack you could download it yourself and try to fix it like Cagonni did...

If there was a block hacks for specific user option you would be on it...

Mr Chad
07 Jan 2007, 06:42
ok then...