there is an extra space (or two) after the sig that I would like to take out (just compare it to my sig here).
TIA
Anthony
_________________
ChadK Sergeant
Joined: Mar 26, 2004
Posts: 75
Posted:
Thu Apr 01, 2004 6:08 am
Something strange I noticed on my site (beta NC). If you already have a sig with an IMG tag and you edit it (removing the hex codes it adds to it) then your sig won't work, it will just display the img tags. You have to remove everything from your sig, update the profile then edit the sig again and enter your img tags for it to work. I don't know what those codes are but if you remove them it won't display your sig.
I also had trouble getting it to take my image and I could only get it to work if I submitted my profile from one or the other profile pages but I can't remember if it was the one in the forums or the one on the nuke portal that I had to edit. Two places to edit profiles sucks.
_________________
twelves Lieutenant
Joined: Jul 13, 2003
Posts: 192
Posted:
Thu Apr 01, 2004 7:52 am
Wouldn’t you know it! All the mucking around to get my SIG to work in 2.07 *I upgraded to 2.08 and still no sig!
Now I remember after reading the last post how I got it to work in Nukecops and NOT my page.
1. Go to “Your Account” in nuke. Remove your Signature.
2. Go to forms
3. Go to Profile and reinstall the code.
Thanks again! I thought I did that once already and it was NOT working. I did it a third time with the hacks and its working!
GREAT!
_________________
anthonyaykut Lieutenant
Joined: Mar 26, 2003
Posts: 182
Location: Europe
Posted:
Sun Apr 04, 2004 11:35 pm
Anyone that can help me with my problem? I thought since some of the people here know quite a bit about sigs, they would know an answer for this one as well
TIA
Anthony
ChadK Sergeant
Joined: Mar 26, 2004
Posts: 75
Posted:
Mon Apr 05, 2004 4:21 am
anthonyaykut: Make sure you don't have any spaces after the sig on that site... I mean, if you have an image tag, be sure it's all on one line and there are no spaces. If you use tables or something make sure there are no carriage returns/new lines in it anywhere as those throw off the output as well.
It might help if you posted your signature.php file
_________________
anthonyaykut Lieutenant
Joined: Mar 26, 2003
Posts: 182
Location: Europe
Posted:
Mon Apr 05, 2004 4:54 am
ChadK :
I do not have any spaces after the img tag - its all on one line. I am thinking it has more to do with either my tpl file(s) or the theme css(?) but I am not sure where to look. Anyway, here's my signature.php (taken from this thread):
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++;
}
Dag gum it. I guess I'm gonna have to spruce mine up a bit now
_________________
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
np6s4x Corporal
Joined: Feb 08, 2004
Posts: 68
Posted:
Thu May 20, 2004 3:08 pm
thx, for this great thread, got it all working, but there's just two little things i'm wondering about that i see in some people's:
1. this line: "We received xxxxxx page views since xx, xx, xxxx"
and
2. Online now(xx): x members and x visitors.
i was wondering how i could add those lines to it, thx
edit: nm, figured it out, thx
(it's of course not live)
though i removed the logo, and sitename, since if u were to type in the sitename on google, it's generally the 1st, or 2nd one, and would kinda like to be able to control where people come from, lol (though already been indexed by both yahoo, and google)
i am trying that also since 4 days but cant get the pic it always shows me that red X and i have GD installed in my web server
GD Library Information
GD Version bundled (2.0.23 compatible)
FreeType Support Yes
T1Lib Support No
GIF Read Support Yes
GIF Create Support No
JPG Support Yes
PNG Support Yes
WBMP Support Yes
XBM Support Yes
/**********************************************************************/
/* phpBB2 Dynamic Statistics Signature */
/* ============================================ */
/* */
/* by thainuke / webmaster@thainuke.net */
/* http://www.thainuke.net :: PHP-Nuke Thailand */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/************************************************************************/
// FI Subsilver
require_once("mainfile.php");
global $prefix, $startdate, $db;
list($count) = $db->sql_fetchrow($db->sql_query("SELECT count FROM ".$prefix."_counter WHERE type='total' AND var='hits'"));
list($sitename) = $db->sql_fetchrow($db->sql_query("SELECT sitename FROM ".$prefix."_config"));
list($overall) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_users"));
list($lastuser) = $db->sql_fetchrow($db->sql_query("SELECT username FROM ".$prefix."_users order by user_id DESC limit 0,1"));
list($member_online_num) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_session WHERE guest = 0"));
list($guest_online_num) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_session WHERE guest = 1"));
$who_online_num = $guest_online_num + $member_online_num;
$image = "signature.png";
$im = imagecreatefrompng($image);
$tc = ImageColorAllocate ($im, 5, 50, 250); // Blue
$now = date("M d,Y H:i:s");
$red = ImageColorAllocate ($im, 255, 0, 0);
$j = strlen($lastuser);
$space = $j*6+240;
ImageString($im, 3, 140, 5, "$sitename Live! $now", $tc);
ImageString($im, 2, 140, 17, "We received $count page views since $startdate.", $tc);
ImageString($im, 2, 140, 30, "Total Members: $overall", $tc);
ImageString($im, 2, $space, 30, "Latest: $lastuser", $red);
ImageString($im, 2, 140, 40, "Online Now($who_online_num): $member_online_num members and $guest_online_num visitors.", $tc);
header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy ($im);
?>
and this is the code that i am useing i have tried many other code that ppl posted before but most of them giving me some erros in some lines.
and if u have a better one then this and working also then plz can u post it over here so that i can also use it thanks.
_________________
Akaveli Captain
Joined: Jan 03, 2004
Posts: 501
Posted:
Sat May 14, 2005 1:04 pm
Thanks for this one!
McKooter Sergeant
Joined: Nov 22, 2003
Posts: 101
Posted:
Wed May 25, 2005 7:45 pm
ive been working on destroying this script for a day now and have managed to mess it up. (using telli's) posted
now i have a simple request, lets say i wanted to show the last banned ip address, how would i do that? what modifications and how do i pull the data,
(note, thats not specifically the thing i need but i think i can customize it much more once i figure out how to pull data and assign it to variables a bit better)
and if you put up a solution if you could let me know what table and what field your pulilng from so i can easily see where to change it to suit me.
Thanks so much, i know if i get this ill be able to cusomize it much better to my liking
BrainSmashR Support Mod
Joined: Jan 05, 2004
Posts: 1390
Location: Louisiana, USA
Posted:
Thu May 26, 2005 2:13 am
Hello......if you want an example rather than exact code, why not use the "example" that exists in the signature already?
Pulling data from the database is pulling data from the database regardless of you reading it here or in your own script.
If you want something specific then we could give you a little bit more help
_________________
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
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