|
|
| |
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks :: Archives ⇒ Stats signature for DragonlfyCMS :: Archived
Stats signature for DragonlfyCMS :: ArchivedNeed help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Go to page Previous 1, 2, 3
| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Sun Jan 28, 2007 8:29 pm Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke |
|
I think this was the old 9.0.6.1 code but cannot be sure as it was so long ago.
| PHP: |
<?php
if (isset($_GET['viewsource'])) {
highlight_file(__FILE__);
exit;
}
define('XMLFEED', 1);
include('includes/cmsinit.inc');
$CLASS['member'] =& new cpg_member();
$userinfo =& $CLASS['member']->members[$CLASS['member']->user_id];
if (is_user()) {
$slogan = $userinfo['username']." you have $userinfo[user_new_privmsg] new & $userinfo[user_unread_privmsg] unread PM's";
}
$result = $db->sql_query("SELECT COUNT(*) FROM ".$prefix."_users", true);
list($users) = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$users--;
$result = $db->sql_query("SELECT title FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 1", true);
list($news) = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (strlen($news) > 34) $news = substr($news,0,31).'...';
$result = $db->sql_query("SELECT COUNT(*) FROM ".$prefix."_session WHERE guest = 0", true);
list($memonl) = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$result = $db->sql_query("SELECT COUNT(*) FROM ".$prefix."_session WHERE guest = 1", true);
list($anonl) = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$image = "signature.png";
$im = imagecreatefrompng($image);
if (date("s") < 30)
$tc = ImageColorAllocate($im, 102, 0, 0);
else
$tc = ImageColorAllocate($im, 102, 0, 0);
ImageString($im, 3, 48, 1, date("H:i:s"), $tc);
ImageString($im, 4, 181, 2, "Live statistics of $sitename", $tc);
ImageString($im, 3, 181, 18, "Latest news: $news", $tc);
ImageString($im, 3, 181, 32, "Tot Members: $users", $tc);
ImageString($im, 3, 181, 45, "Now online : $memonl members and $anonl guests", $tc);
ImageString($im, 3, 181, 60, "$slogan", $tc);
header('Pragma: public');
header('Pragma: no-cache');
header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy($im);
|
_________________ • DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin •
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Sun Jan 28, 2007 11:56 pm Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke |
|
@TouchDown - after some testing, there does appear to be an issue with the signature.
It simply doesn't work in PHP5, specifically 5.2, but is fine in 4.4.4, and I'm fairly certain that it was fine with 5.1.4.
It doesn't even work on this site
_________________ • DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin •
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
xfsunoles XHTML Specialist


Offline Joined: Apr 30, 2004 Posts: 2502 Location: Melbourne, Florida
|
Posted: Mon Jan 29, 2007 12:11 am Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke |
|
I know its not work in that site. its probably need include to security file.
_________________

Firefox is my Favorite Browser
xfsunoles's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
|
| Back to top |
|
 |
xfsunoles XHTML Specialist


Offline Joined: Apr 30, 2004 Posts: 2502 Location: Melbourne, Florida
|
Posted: Mon Jan 29, 2007 2:06 am Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke |
|
| Quote:: |
| <b>Fatal error</b>: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: fatal libpng error: zlib error in <b>/home/cpgn/public_html/statsig.php</b> on line <b>56</b><br /> |
_________________

Firefox is my Favorite Browser
xfsunoles's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Mon Jan 29, 2007 2:28 am Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke |
|
bug in Zend, the zlib library needs to be upgraded and GD needs to be recompiled
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Mon Jan 29, 2007 3:47 am Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke |
|
| xfsunoles wrote: |
| Quote:: |
| <b>Fatal error</b>: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: fatal libpng error: zlib error in <b>/home/cpgn/public_html/statsig.php</b> on line <b>56</b><br /> |  |
Well GFY xfsunoles - I can't get an error displayed on this site or mine, let alone the full path you show.
Change
imagepng($im,'',100);
To
imagepng($im,'',9);
statsig will then work in PHP5 - the compression argument should be 0 to 9.
(dragonflycms.org copy fixed)
For that matter, you might even get a smaller image if you use,
imagepng($im,'',9,PNG_ALL_FILTER);
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
tkog2004 Heavy poster


Offline Joined: May 14, 2006 Posts: 152
|
|
| Back to top |
|
 |
tkog2004 Heavy poster


Offline Joined: May 14, 2006 Posts: 152
|
|
| Back to top |
|
 |
fabke Newbie


Offline Joined: Nov 15, 2005 Posts: 29 Location: Belgium
|
Posted: Thu Feb 15, 2007 10:15 am Post subject: Re: Stats signature for DragonlfyCMS |
|
It still doesn't work here
_________________ Regards,
Fabke - www.airshows.be
fabke's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux srv122 2.6.18-6/5.0.32-Debian/5.2.7/Dragonfly 9.0.6.1
|
|
| Back to top |
|
 |
espsjurs Nice poster


Offline Joined: Aug 09, 2005 Posts: 92 Location: Bergen, Norway
|
Posted: Thu Mar 15, 2007 12:36 pm Post subject: Re: Stats signature for DragonlfyCMS |
|
When I try this at my site, i get this error:
| Code:: |
Fatal error: Call to undefined function: imagettftext() in /usr/local/psa/home/vhosts/krypinn.net/subdomains/bf2stat/httpdocs/statsig.php on line 46 |
Is this a standard PHP function or a module? My server runs PHP 4.4.2
Espen
espsjurs's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) FreeBSD 4.10/1.3.37/5.0.27/5.2.4/9.2.1
|
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
|
| Back to top |
|
 |
espsjurs Nice poster


Offline Joined: Aug 09, 2005 Posts: 92 Location: Bergen, Norway
|
Posted: Thu Mar 15, 2007 12:56 pm Post subject: Re: Stats signature for DragonlfyCMS |
|
The problem is gone after the image signature.png was added to the root..
Espen
espsjurs's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) FreeBSD 4.10/1.3.37/5.0.27/5.2.4/9.2.1
|
|
| Back to top |
|
 |
|
|
|
| |
 |
 Welcome Anonymous
|
|
|
|