You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 55 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Dynamic Site Sig [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Prism128
Sergeant
Sergeant


Joined: Jan 01, 2004
Posts: 88

Location: Where they won't find me...

PostPosted: Thu Jun 10, 2004 7:50 am Reply with quoteBack to top

Hi,

I've noticed recently that quite a few of the people here have dynamic sigs that show the status of their nuke sites. How do you go about making one of them? I have one that runs off WinAmp, but that's for music, and I want one for my site.

Thanks in advance,

Prism128
Find all posts by Prism128View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
BrainSmashR
Support Mod
Support Mod


Joined: Jan 05, 2004
Posts: 1390

Location: Louisiana, USA

PostPosted: Thu Jun 10, 2004 9:15 am Reply with quoteBack to top

What, like mine? Twisted Evil

It's even cooler if you have a registered nick on my site (hint, hint).....anyway, my lunch break is almost over.. I'll be back in about 4 hours and I'll pull the script from my server and post it here for you then.

_________________
ImageImage
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
Find all posts by BrainSmashRView user's profileSend private messageVisit poster's websiteYahoo MessengerMSN MessengerICQ Number
Prism128
Sergeant
Sergeant


Joined: Jan 01, 2004
Posts: 88

Location: Where they won't find me...

PostPosted: Thu Jun 10, 2004 10:56 am Reply with quoteBack to top

thanks for your reply.

yeah, that's exactly what i mean.

_________________
Image
Find all posts by Prism128View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
wakeboarder
Sergeant
Sergeant


Joined: Nov 17, 2003
Posts: 95


PostPosted: Thu Jun 10, 2004 10:59 am Reply with quoteBack to top

I'd also like to know Smile
Find all posts by wakeboarderView user's profileSend private message
BrainSmashR
Support Mod
Support Mod


Joined: Jan 05, 2004
Posts: 1390

Location: Louisiana, USA

PostPosted: Thu Jun 10, 2004 1:10 pm Reply with quoteBack to top

Hmmm, seems you missed the part about REGISTERING AT MY SITE GOOBERS, but anyway.....

This was written for CPGNuke, so I do not know if it will work for regular phpNuke......if it give you problems, I DO have another that will work on phpNuke.

This particular signature will display your information where ever you see it (assuming you have registered at my site) instead of showing you as an Anonymous user.

Also, it does not identify your Nuke or phpBB version, I just added that. otherwise save this script as signature.php and store in the root directoy of your Nuke site

Code:

<?php
define('CPG_NUKE', 1);
$phpver = phpversion();
$useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
if ($phpver >= '4.0.4pl1' && extension_loaded('zlib')) {
// ob_start('ob_gzhandler');
}
require_once('config.php');
require_once('db/db.php');

$result[0] = $db->sql_query("SELECT topic_views, topic_replies FROM ".$prefix."_bbtopics");
while( $post = $db->sql_fetchrow($result[0]) ) {
list($users) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_users", true));
list($lastuser) = $db->sql_fetchrow($db->sql_query("SELECT username FROM ".$user_prefix."_users WHERE user_active = 1 AND user_level > 0 ORDER BY user_id DESC LIMIT 1", true));

$numviews[0] = $numviews[0] + $post[topic_views];
$numreplies[0] = $numreplies[0] + $post[topic_replies];
$numtopics[0]++;
}
$numposts[0] = $numtopics[0]+$numreplies[0];
$user = $_COOKIE['user'];
if ($user) {
if (!is_array($user)) {
$user = base64_decode($user);
$user = explode(":", $user);
}
$uid[0] = $user[0];
$pwd[0] = $user[2];
$uid[0] = intval($uid[0]);
if ($uid[0] != "" AND $pwd[0] != "") {
$result[0] = $db->sql_query("SELECT user_password, username, user_new_privmsg, user_unread_privmsg FROM ".$user_prefix."_users WHERE user_id='$uid[0]'");
$row = $db->sql_fetchrow($result[0]);
if ($row[user_password] == $pwd[0] && $row[user_password] != "") {
$slogan = $row[username]." you have $row[user_new_privmsg] new & $row[user_unread_privmsg] unread PM's";
}
$db->sql_freeresult($result[0]);
}
} Else {
$hello = "Anonymous User";
$anonymous = "Click Here to Register ";
$slogan2 = "BrainSmashR.com";
$slogan3 = "** Seeking the Way **";
}


$image[0] = "images/signature.png";
$im = imagecreatefrompng($image[0]);
$tc = ImageColorAllocate ($im, 0, 0, 0);
$tc2 = ImageColorAllocate ($im, 0, 0, 255);
$red = ImageColorAllocate ($im, 255, 0, 0);

ImageString($im, 3, 10, 30, "$hello", $red);
ImageString($im, 3, 10, 45, "$anonymous", $tc);   
ImageString($im, 2, 200, 2, "Membership: ", $tc);
ImageString($im, 2, 275, 2, "$users", $tc2);
ImageString($im, 2, 300, 2, "Registered Users ", $tc);
ImageString($im, 2, 200, 13, "Newest Member:", $tc);
ImageString($im, 2, 285, 13, " $lastuser", $tc2);

ImageString($im, 2, 200, 24, "Forum Topics:", $tc);
ImageString($im, 2, 285, 24, "$numtopics[0]", $tc2);
ImageString($im, 2, 308, 24, "Posts:", $tc);
ImageString($im, 2, 345, 24, "$numposts[0]", $tc2);
ImageString($im, 2, 365, 24, "Views:", $tc);
ImageString($im, 2, 405, 24, "$numviews[0]", $tc2);
ImageString($im, 2, 200, 35, "CPGNuke Version:", $tc);
ImageString($im, 2, 304, 35, "8.2a", $tc2);
ImageString($im, 2, 345, 35, "phpBB:", $tc);
ImageString($im, 2, 389, 35, "2.0.8", $tc2);


ImageString($im, 2, 200, 47, "$slogan", $red);
ImageString($im, 2, 200, 47, "$slogan2", $tc);
//ImageString($im, 2, 250, 47, "$slogan3", $tc2);


header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy ($im);
?>


Then enter the following code as your signature.......errr, edited to your needs. Only works on phpBB based forums.

Code:

[url=http://www.brainsmashr.com][img]http://www.brainsmashr.com/CPG/signature.php[/img][/url]


You should just be able to copy my image and edit it as needed for your signature.png

_________________
ImageImage
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
Find all posts by BrainSmashRView user's profileSend private messageVisit poster's websiteYahoo MessengerMSN MessengerICQ Number
Prism128
Sergeant
Sergeant


Joined: Jan 01, 2004
Posts: 88

Location: Where they won't find me...

PostPosted: Fri Jun 11, 2004 1:10 am Reply with quoteBack to top

thanks mate. could i have the one which works with phpnuke? then i can compare them. im gonna test that one now.

Prism128

_________________
Image
Find all posts by Prism128View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
BrainSmashR
Support Mod
Support Mod


Joined: Jan 05, 2004
Posts: 1390

Location: Louisiana, USA

PostPosted: Fri Jun 11, 2004 3:02 am Reply with quoteBack to top

Actually, I think the difference is the above workes with Nuke and this one works with phpBB (which is part of Nuke)

You can see it in action HERE.

This one DOES read your Nuke Version and phpBB version, but I had to add the CPG to mine.

Code:

<?php
require_once("./mainfile.php");

$phpbb_root_path = './modules/Forums/';

define('IN_PHPBB', true);
include ('./config.php');
include ('./db/db.php');
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : '';
$sql = "SELECT u.username, u.user_id, s.session_logged_in, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 3600 ) . "
$user_forum_sql
ORDER BY u.username ASC, s.session_ip ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}

$logged_online = 0;

$prev_user_id = 0;

while( $row = $db->sql_fetchrow($result) )
{
// User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
$logged_online++;
}

$prev_user_id = $row['user_id'];
}
}

$image = "images/signature.png";
$im = imagecreatefrompng($image);
$tc = ImageColorAllocate ($im, 255, 255, 255);
$red = ImageColorAllocate ($im, 255, 0, 0);
$blue = ImageColorAllocate($im, 0, 0, 255);
 
$version = '2'.$board_config['version'];
$sitename = $board_config['sitename'];
$total_users = get_db_stat('usercount');
$total_posts = get_db_stat('postcount');
$total_topics = get_db_stat('topiccount');
$j = strlen($total_users);
$leerzeichen = $j*6+237;
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
ImageString($im, 5, 102, 0, "Statistics for $sitename", $blue);



ImageString($im, 3, 95, 13, "CPGNuke Version-$Version_Num", $red);
ImageString($im, 3, 240, 13, "phpBB Version-$version ", $red);
ImageString($im, 3, 120, 26, "Total Members-$total_users", $red);
ImageString($im, 3, 251, 26, "Users Online-$logged_online", $red);
ImageString($im, 3, 155, 38, "Newest Member-$newest_user", $red);
ImageString($im, 3, 123, 50, "Total Posts-$total_posts Posts in $total_topics Topics", $red);
header("Content-Type: image/png");
$user = $_COOKIE['user'];
if ($user) {
if (!is_array($user)) {
$user = base64_decode($user);
$user = explode(":", $user);
}
$uid = $user[0];
$pwd = $user[2];
$uid = intval($uid);
if ($uid != "" AND $pwd != "") {
global $db, $user_prefix;
$sql = "SELECT user_password, username, user_new_privmsg, user_unread_privmsg FROM ".$user_prefix."_users WHERE user_id='$uid'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ($row[0] == $pwd && $row[0] != "") {
$slogan = $row[1]." you have $row[2] new & $row[3] unread PM's";
}
$db->sql_freeresult($result);
}
}
Imagepng($im,'',100);
ImageDestroy ($im);
?>

_________________
ImageImage
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
Find all posts by BrainSmashRView user's profileSend private messageVisit poster's websiteYahoo MessengerMSN MessengerICQ Number
dc1bot
Nuke Soldier
Nuke Soldier


Joined: Jun 10, 2004
Posts: 15


PostPosted: Fri Jun 11, 2004 3:58 am Reply with quoteBack to top

I have just found this script for one like mine shown below. Comes ready to upload and you can edit it if you want / change logo etc... hope you like ti .get it from my site www.nokiawarez ... ?>>

This will take you straight to the download!

Signiture phpBB Download

[dc1]

_________________
Image
Find all posts by dc1botView user's profileSend private message
Prism128
Sergeant
Sergeant


Joined: Jan 01, 2004
Posts: 88

Location: Where they won't find me...

PostPosted: Fri Jun 11, 2004 6:59 am Reply with quoteBack to top

can you change what tables it looks in? eg change the phpbb tables to other forum ones, as long as its in the same databse?

_________________
Image
Find all posts by Prism128View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
ChadK
Sergeant
Sergeant


Joined: Mar 26, 2004
Posts: 75


PostPosted: Fri Jun 11, 2004 10:38 am Reply with quoteBack to top

odd.. mine used to work but recently stopped. Any ideas? (the images/signature.png file exists)

http://www.aviary.info/signature.php
Quote:

<?php
$phpbb_root_path = 'modules/Forums/';

define('IN_PHPBB', true);
require_once("mainfile.php");
include ('config.php');
include ('db/db.php');
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$ZeroPad=4;

//Count users online
$sql = "SELECT COUNT(`uname`) FROM `nuke_session` WHERE `time` >= ".( time() - 3600 ).";";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
$logged_online = 0;
$row=$db->sql_fetchrow($result);
$logged_online=sprintf("%0".$ZeroPad."d",$row[0]);


//Count Pending users
$sig_pendingusers = 0;
$sql = "SELECT count(`user_id`) FROM `nuke_users_temp`; ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain Pending Users Count', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$sig_pendingusers = sprintf("%0".$ZeroPad."d",$row[0]);

//Count Classified Ads
$sig_classifiedcount = 0;
$sql = "SELECT count(`id_ads`) FROM `nuke_ads_ads`; ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain Classified Ad Count', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$sig_classifiedcount = sprintf("%0".$ZeroPad."d",$row[0]);

//Count Auctions
$sig_auction_items = 0;
$sql = "SELECT count( `cid` )
FROM `nuke_auction_items`; ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain active auction count', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$sig_auction_items = sprintf("%0".$ZeroPad."d",$row[0]);

//Count Auctions Completed
$sig_auction_doneitems = 0;
$sql = "SELECT count(`cid`)
FROM `nuke_auction_doneitems`; ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain closed auction count', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$sig_auction_doneitems = sprintf("%0".$ZeroPad."d",$row[0]);

//Count Photos
$sig_photocount = 0;
$sql = "SELECT count(`pid`) FROM `nuke_cpg_pictures`; ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain coppermine photo count', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$sig_photocount = sprintf("%0".$ZeroPad."d",$row[0]);


//Set up image text
$image = "images/signature.png";
$im = imagecreatefrompng($image);
$tc = ImageColorAllocate ($im, 0, 0, 0);
$blue = ImageColorAllocate ($im, 0, 0, 255);
$grey = ImageColorAllocate ($im, 77, 77, 77);
//$version = '2'.$board_config['version'];
$sitename = $board_config['sitename'];
$total_users = sprintf("%0".$ZeroPad."d",get_db_stat('usercount'));
$total_posts = sprintf("%0".$ZeroPad."d",get_db_stat('postcount'));
$total_topics = sprintf("%0".$ZeroPad."d",get_db_stat('topiccount'));
$j = strlen($total_users);
$leerzeichen = $j*6+225;
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];


//Left Line 1
ImageString($im, 2, 3, 2, "$nukeurl", $blue);

//Left Line 2
ImageString($im, 2, 3, 46, "Since: $startdate", $tc);

//Line 1
ImageString($im, 2, 150, 2, "Statistics for $sitename | Newest:$newest_user", $tc);

//Line 2
ImageString($im, 2, 150, 13, "$slogan", $tc);

//Line 3
//ImageString($im, 2, 150, 25, "phpBB v. $version - Nuke v. $Version_Num", $tc);
ImageString($im, 2, 150, 24, "Members : [$total_users] / Pending [$sig_pendingusers] / Online [$logged_online]", $tc);

//Line 4
ImageString($im, 2, 150, 35, "Threads : [$total_topics] / Replies [$total_posts] | Photos: [$sig_photocount]", $tc);

//Line 5
ImageString($im, 2, 150, 46, "Auctions: [$sig_auction_items] / Closed [$sig_auction_doneitems] | Ads: [$sig_classifiedcount]", $tc);

//Create Image
header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy ($im);
?>

_________________
Image
Find all posts by ChadKView user's profileSend private messageVisit poster's website
Sniperwolf-UA-
Nuke Soldier
Nuke Soldier


Joined: Apr 28, 2004
Posts: 11


PostPosted: Fri Jun 11, 2004 11:21 am Reply with quoteBack to top

Ok i already got a dynamic sig but it won't show on my forum, how do i setup my forum to allow it. I am running BBtoNuke 2.0.7
Find all posts by Sniperwolf-UA-View user's profileSend private messageVisit poster's website
Prism128
Sergeant
Sergeant


Joined: Jan 01, 2004
Posts: 88

Location: Where they won't find me...

PostPosted: Fri Jun 11, 2004 11:33 am Reply with quoteBack to top

make sure you have put it in the image tags:

Code:
[img]http://yoursite.com/signiture.php[/img]
like that, but change the address and name of file to suit yours.

Is it on the same server?
Is there a background-type image?
Is the name right in the code?
Are you allowed to use .php as an image extension?
Are the GD extensions installed? (EG. can you see the little security images or do they no work/or are they disabled?)

Make sure the answers to the above questions are "yes", then it should work.

_________________
Image
Find all posts by Prism128View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Sniperwolf-UA-
Nuke Soldier
Nuke Soldier


Joined: Apr 28, 2004
Posts: 11


PostPosted: Fri Jun 11, 2004 1:17 pm Reply with quoteBack to top

Prism128 wrote:
make sure you have put it in the image tags:

Code:
[img]http://yoursite.com/signiture.php[/img]
like that, but change the address and name of file to suit yours.

Is it on the same server?
Is there a background-type image?
Is the name right in the code?
Are you allowed to use .php as an image extension?
Are the GD extensions installed? (EG. can you see the little security images or do they no work/or are they disabled?)



Make sure the answers to the above questions are "yes", then it should work.


Is it on the same server?= Yes
Is there a background-type image?= .png extension
Is the name right in the code?= yes
Are you allowed to use .php as an image extension?= how would i know?
Are the GD extensions installed? (EG. can you see the little security images or do they no work/or are they disabled?)= What?

I am the admin for our website and forum and i have never seen any of this, and i am a total n00b to this so sorry for not understanding what you are talking about.

Is it possible to do this in the forum admin or do i need to mess around with some script or something?

This is the dynamic sig in question

Image
Find all posts by Sniperwolf-UA-View user's profileSend private messageVisit poster's website
Prism128
Sergeant
Sergeant


Joined: Jan 01, 2004
Posts: 88

Location: Where they won't find me...

PostPosted: Sat Jun 12, 2004 4:46 am Reply with quoteBack to top

well its working there.

Quote:
Are you allowed to use .php as an image extension?= how would i know?
Are the GD extensions installed? (EG. can you see the little security images or do they no work/or are they disabled?)= What?
as you say ur the site admin, do u see the little image w/ 6 random numbers on or is it turned off? and u may need an .htaccess file to let it work, but as its working now, i dont think it matters.

_________________
Image
Find all posts by Prism128View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
BrainSmashR
Support Mod
Support Mod


Joined: Jan 05, 2004
Posts: 1390

Location: Louisiana, USA

PostPosted: Sat Jun 12, 2004 5:38 am Reply with quoteBack to top

I'm pretty sure you cannot use your own dynamic signature on your own site.

_________________
ImageImage
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
Find all posts by BrainSmashRView user's profileSend private messageVisit poster's websiteYahoo MessengerMSN MessengerICQ Number
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.284 Seconds - 350 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::