Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks :: Archives ⇒ Stats signature for DragonlfyCMS :: Archived


Stats signature for DragonlfyCMS :: Archived
Need 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
Post new topic    Revive this topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

Topic Archived View previous topic :: View next topic  
Author Message
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: 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
View user's profile Visit poster's website Photo Gallery
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: 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 Laughing

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website Photo Gallery
xfsunoles
XHTML Specialist
XHTML Specialist

Offline Offline
Joined: Apr 30, 2004
Posts: 2502
Location: Melbourne, Florida
PostPosted: 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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger Photo Gallery
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: Mon Jan 29, 2007 12:21 am
Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke

nothing to do with including the security file - it doesn't work on this site either.
(in 9.1.x, missing the security file gives an error, but there are no errors)

dragonflycms.org/stats...viewsource
dragonflycms.org/statsig.php
dragonflycms.org/signature.png

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website Photo Gallery
xfsunoles
XHTML Specialist
XHTML Specialist

Offline Offline
Joined: Apr 30, 2004
Posts: 2502
Location: Melbourne, Florida
PostPosted: Mon Jan 29, 2007 2:06 am
Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke

Phoenix wrote:
nothing to do with including the security file - it doesn't work on this site either.
(in 9.1.x, missing the security file gives an error, but there are no errors)

dragonflycms.org/stats...viewsource
dragonflycms.org/statsig.php
dragonflycms.org/signature.png

Quote::
<b>Fatal error</b>: imagepng() [&lt;a href='function.imagepng'&gt;function.imagepng&lt;/a&gt;]: gd-png: fatal libpng error: zlib error in <b>/home/cpgn/public_html/statsig.php</b> on line <b>56</b><br />
Big grin

_________________

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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger Photo Gallery
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: 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 Twisted Evil


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
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: Mon Jan 29, 2007 3:47 am
Post subject: Re: Port phpnuke module "NukeSigs" to CPGNuke

xfsunoles wrote:
Quote::
<b>Fatal error</b>: imagepng() [&lt;a href='function.imagepng'&gt;function.imagepng&lt;/a&gt;]: gd-png: fatal libpng error: zlib error in <b>/home/cpgn/public_html/statsig.php</b> on line <b>56</b><br />
Big grin
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
View user's profile Visit poster's website Photo Gallery
tkog2004
Heavy poster
Heavy poster

Offline Offline
Joined: May 14, 2006
Posts: 152

PostPosted: Wed Feb 14, 2007 5:32 pm
Post subject: Re: Stats signature for DragonlfyCMS

can anyone tell me how I can get the script to also save the image as a png, for forums that will not accept .php in image tags.....

_________________


tkog2004 please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Visit poster's website
tkog2004
Heavy poster
Heavy poster

Offline Offline
Joined: May 14, 2006
Posts: 152

PostPosted: Wed Feb 14, 2007 8:40 pm
Post subject: Re: Stats signature for DragonlfyCMS

Doesnt matter, done it through htaccess now.....

_________________


tkog2004 please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Visit poster's website
fabke
Newbie
Newbie

Offline Offline
Joined: Nov 15, 2005
Posts: 29
Location: Belgium
PostPosted: Thu Feb 15, 2007 10:15 am
Post subject: Re: Stats signature for DragonlfyCMS

It still doesn't work here Evil or Very Mad

_________________
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
View user's profile Visit poster's website
espsjurs
Nice poster
Nice poster

Offline Offline
Joined: Aug 09, 2005
Posts: 92
Location: Bergen, Norway
PostPosted: 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
View user's profile Visit poster's website
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: Thu Mar 15, 2007 12:54 pm
Post subject: Re: Stats signature for DragonlfyCMS

Your answer lies in this very topic Smile

dragonflycms.org/Forum...tml#120285

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website Photo Gallery
espsjurs
Nice poster
Nice poster

Offline Offline
Joined: Aug 09, 2005
Posts: 92
Location: Bergen, Norway
PostPosted: 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
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Revive this topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 3 of 3
All times are GMT
Go to page Previous  1, 2, 3

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy