vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - ForumSig 1.0 (https://vborg.vbsupport.ru/showthread.php?t=127076)

kg4mxz 09-19-2006 10:00 PM

ForumSig 1.0
 
Outputs a PNG image you can use as a forum signature with live forum statistics.

This was only tested with vB 3.6.1 There might be something similar to this already but I could not get a version that I could get to work so I made my own.

Install Time: <30 seconds

Installation:
  1. Change $forumname to the name of your forum as you want it displayed in the image.
  2. Upload sig.php and base.png to your forum root
  3. Do any modifications to base.png you want (Optional)
  4. Your signature is ready to use!
A sample implementation in HTML:
HTML Code:

<IMG SRC="http://yourdomain.com/path/to/forum/sig.php">

kg4mxz 09-20-2006 01:32 AM

This isn't meant to be a finished product! I know it needs design work :)

Please install this mod if you use it

aycan555 09-20-2006 01:43 AM

thanks...


**********22-09-2006 - Edited *************

When i look my site stats at homepage it says 37 Guest and 8 registered users..
When i looked into Who is online page, all guests viewing:

Unknown Location
/sig.php


:D:D:D

bada_bing 09-20-2006 01:57 AM

Where and why would you want to use this?

Jealousy10312 09-20-2006 02:02 AM

I have the same question.

Josh1 09-20-2006 02:04 AM

With a bit of work on the design side, i guess you could use it here. :p

kg4mxz 09-20-2006 02:17 AM

It's meant to be used as a forum signature.

bada_bing 09-20-2006 02:29 AM

Sorry I still dont get it??

Comalies 09-20-2006 07:25 AM

Works nice.

https://vborg.vbsupport.ru/showthrea...61#post1078961

aceofspades 09-20-2006 07:56 AM

What is not to understand, its hardly complicated. You have your stats displayed on a png so you can display them on other forums. Thanks buddy, i tried to get the other version to work but it didnt.

asj 09-20-2006 08:55 AM

Thanks

Snake 09-20-2006 09:04 AM

Very nice. Thanks!

kg4mxz 09-20-2006 10:01 AM

Your Welcome! w00t! First Mod!

iran.gs 09-20-2006 11:02 AM

Installed this is the best updated news for admins to use as Sig... Highly recomended to all forum admins and muds

iran.gs 09-20-2006 11:11 AM

only one Q can i add flash to it ?

kg4mxz 09-20-2006 11:14 AM

No, you cannot

Phooey 09-20-2006 01:24 PM

Is there any way to make the text size a bit larger?

Edit: Nevermind, figured it out. You can see my modded version in my sig. :D

/installed

ragtek 09-20-2006 04:58 PM

1. make a jpg file
not all forums allow *.php in a sig

2. the design is terrible
also my english

aceofspades 09-20-2006 05:35 PM

1. You noob you use the png as your sig image.
2. He is a coder not a designer, and this is his first script. You think you could do better, make your own image and use it, thats what everyone else doing :rolleyes:

hilfe-forum 09-20-2006 06:21 PM

i change color her:

//Defines Colors
$background_color = imagecolorallocate($im, 78, 153, 255);
$text_color = imagecolorallocate($im, 255, 255, 255);

but the PNG always show the old color???

hilfe-forum 09-20-2006 06:24 PM

Quote:

Originally Posted by Phooey
Is there any way to make the text size a bit larger?

Edit: Nevermind, figured it out. You can see my modded version in my sig. :D

/installed

please tell me the way to change text size

LICryptkeeper 09-20-2006 06:54 PM

Quote:

Originally Posted by aceofspades
1. You noob you use the png as your sig image.

he means that not all forums allow .php in image tags. I agree with ragtek that it should be cached into an image, and run as a cronjob, since it has the possibility of being a little sever-intensive.

it's how mine is running:

http://network.montrealforums.com/links/invite.php
outputs
http://network.montrealforums.com/links/invite2.jpg

the php is run every 15 minutes, and therefore the JPG gets updated every 15 minutes.

jw00dy 09-20-2006 11:25 PM

Very cool, thank you!

*installed*

jw00dy 09-20-2006 11:36 PM

Quote:

Originally Posted by LICryptkeeper
he means that not all forums allow .php in image tags. I agree with ragtek that it should be cached into an image, and run as a cronjob, since it has the possibility of being a little sever-intensive.

it's how mine is running:

http://network.montrealforums.com/links/invite.php
outputs
http://network.montrealforums.com/links/invite2.jpg

the php is run every 15 minutes, and therefore the JPG gets updated every 15 minutes.

That's very cool. I can already tell mine is taking a hit with the sig.

Phooey 09-21-2006 12:48 AM

Quote:

Originally Posted by hilfe-forum
please tell me the way to change text size

Find this code in the sig.php file, the numbers I bolded are what you change to make the text larger:
Code:

// Adds Text
imagestring($im, 1, 5, 5,  $forumname . " Statistics", $text_color);
imagestring($im, 1, 5, 15,  "Threads: " . $totalthreads, $text_color);
imagestring($im, 1, 5, 25,  "Posts: " . $totalposts, $text_color);
imagestring($im, 1, 105, 15,  "Users: " . $totalusers, $text_color);


Kanustep 09-21-2006 03:13 AM

Great hack! How do we add more variables, for example:
- Last thread
- Users online: this could be a mess!
- Active members
- Last member registration

hilfe-forum 09-21-2006 09:52 AM

Quote:

Originally Posted by Phooey
Find this code in the sig.php file, the numbers I bolded are what you change to make the text larger:
Code:

// Adds Text
imagestring($im, 1, 5, 5,  $forumname . " Statistics", $text_color);
imagestring($im, 1, 5, 15,  "Threads: " . $totalthreads, $text_color);
imagestring($im, 1, 5, 25,  "Posts: " . $totalposts, $text_color);
imagestring($im, 1, 105, 15,  "Users: " . $totalusers, $text_color);


Cool THX :)

optrex 09-21-2006 10:07 AM

Quote:

Originally Posted by LICryptkeeper
he means that not all forums allow .php in image tags. I agree with ragtek that it should be cached into an image, and run as a cronjob, since it has the possibility of being a little sever-intensive.

it's how mine is running:

http://network.montrealforums.com/links/invite.php
outputs
http://network.montrealforums.com/links/invite2.jpg

the php is run every 15 minutes, and therefore the JPG gets updated every 15 minutes.

can you tell me how I would set this cron job up - to update every 15 mins and output a jpg?

ragtek 09-21-2006 04:46 PM

oh sorry that i just said the truth
1.not in all forums is php allow
2. its better for the performance when you cache it every 30 minutes

and if you think that i'm a noob its ok for me

Qwest 09-21-2006 06:01 PM

Hey guys.

For those of you complaining about forums not accepting sig.php as an image. Simply add this code to a .htaccess file and place it in the same directory as base.png and sig.php

Code:

RewriteEngine on
RewriteRule ^base.png$ sig.php

Then just link to base.png and Apache will automatically use sig.php

Ricsca 09-22-2006 12:01 AM

Very Thanks ;)

aveon 09-22-2006 01:30 AM

if you can design something like this for the side column wold be lot nicer than sig thanx

ConqSoft 09-22-2006 02:30 AM

Quote:

Originally Posted by aveon
if you can design something like this for the side column wold be lot nicer than sig thanx

This is for you to use on OTHER forum sites you visit, not for display on your own forum.

optrex 09-22-2006 08:02 AM

Quote:

Originally Posted by Qwest
Hey guys.

For those of you complaining about forums not accepting sig.php as an image. Simply add this code to a .htaccess file and place it in the same directory as base.png and sig.php

Code:

RewriteEngine on
RewriteRule ^base.png$ sig.php

Then just link to base.png and Apache will automatically use sig.php

Nice tip, but not something you can do to get it to show on vbulletin.com for instance ;)

Fax 09-22-2006 10:00 AM

does this mod work on windows os ?

optrex 09-22-2006 10:06 AM

Don't see why not - its just php.

Qwest 09-22-2006 01:19 PM

Quote:

Originally Posted by optrex
Nice tip, but not something you can do to get it to show on vbulletin.com for instance ;)

Well vbulletin.com doesn't allow ANY images in sigs does it?

I think you misread the point of my tip.

My tip makes it so you can use <img src=http://mysite.com/base.png>

instead of using <img src=http://mysite.com/sig.php>

because a lot of boards are set up to not allow dynamic images (images that end in anything other than .gif or .jpg or .png)

Fax 09-25-2006 09:01 AM

i'm using vbulletin 3.6.0 on a windows 2003 dedicated server (i know this is for 3.6.1 but some users have this working on 3.6.0) and cannot get this to work.

error output:-
Quote:

query_first("SELECT COUNT(threadid) FROM " . TABLE_PREFIX . "vbthread"); $totalthreads = implode(",",$totalthreads); $totalposts = $db->query_first("SELECT COUNT(postid) FROM " . TABLE_PREFIX . "vbpost"); $totalposts = implode(",",$totalposts); $totalusers = $db->query_first("SELECT COUNT(userid) FROM " . TABLE_PREFIX . "vbuser"); $totalusers = implode(",",$totalusers); // Loads a PNG image function LoadPNG($imgname) { $im = @imagecreatefrompng($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ $im = imagecreatetruecolor(150, 30); /* Create a blank image */ $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } // Actually Loads the image $im = @LoadPNG('base.png'); //Adds the Header header("Content-type: image/png"); //Defines Colors $background_color = imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 0, 255, 0); // Adds Text imagestring($im, 1, 5, 5, $forumname . " Statistics", $text_color); imagestring($im, 1, 5, 15, "Threads: " . $totalthreads, $text_color); imagestring($im, 1, 5, 25, "Posts: " . $totalposts, $text_color); imagestring($im, 1, 105, 15, "Users: " . $totalusers, $text_color); //Outputs the image imagepng($im); imagedestroy($im); ?>
i use table prefix of vb so i changed this in the sig.php, i have tried with the standard settings but this didn't work either.

any ideas ?

Mrflow 10-22-2006 03:58 AM

it is possible to be put Profile Fields of vbulletin like country, posts or another extra thing?

DavutPasha 10-23-2006 10:06 PM

I added some extra lines. You can see my signature.

* Server Load
* Server Uptime
* Server Activity

I want to share my own codes with you..

PHP Code:

// information about server activity
$sunucu = @fsockopen(localhost80);
if (
$sunucu) {
$sunucudurumu .= "ACTIVE";
}
else {
$sunucudurumu .= "INACTIVE";
}

// Uptime and Server Load istatistics
$uptimekaydi trim(exec("uptime"));
if (
$uptimekaydi) {
if (
preg_match("/, *(\d) (users?), .*: (.*), (.*), (.*)/"$uptimekaydi$uptime)) {
$kullanicilar[0] = $uptime[1];
$kullanicilar[1] = $uptime[2];
$suankiyuk $uptime[3];
$yukleme15 $uptime[4];
$yukleme30 $uptime[5];
}
} else {
$kullanicilar[0] = "Mevcut degil";
$kullanicilar[1] = "--";
$suankiyuk "Mevcut degil";
$yukleme15 "--";
$yukleme30 "--";
}
$uptime shell_exec("cut -d. -f1 /proc/uptime");
$gun floor($uptime/60/60/24);
$saat $uptime/60/60%24;
$dakika $uptime/60%60;
$saniye $uptime%60

you can add this informations like this;

PHP Code:

$information1 "DAVUTPASHA.COM HAS $suankiyuk SERVER LOAD AND ALSO";
$information2" WE HAVEN'T HAD ANY PROBLEM ABOUT $gun DAYS $saat:$dakika:$saniye SECONDS.";

imagestring($im24192"SERVER ACTIVITY: " $sunucudurumu$text_color);
imagestring($im2516$information1$text_color);
imagestring($im2529$information2$text_color); 


Main codes are in Turkish. I translated them to English. You can translate other words.

See my sig: http://www.davutpasha.com/imzam.php


All times are GMT. The time now is 02:12 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.01372 seconds
  • Memory Usage 1,845KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (10)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