Iam looking for a php script / module that i can add to my php6.5 forum.. were members can make a signature from.. i dont kmow the correct term. but i have found it on alot of sites .. mainly clan fan sites.. any help? would be appreciated in advance.. thank you!!!
viperxp45@msn.com
Stephen2417 Major
Joined: Dec 26, 2003
Posts: 1135
Location: Bristolville, OH (US)
Posted:
Sat Feb 21, 2004 11:42 am
Here is something similar to what you are asking about:
$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++;
}
(3) Add this to your signature on any phpbb/nukebb forum [ img=http://www.yourdomain.com/modules.php?name=Forums&file=signature[ /img] Note: I added a space between img & /img make sure there is no space when you add it to your signature.
_________________ If you shoot for the moon and miss, you'll still be amongst the stars.
viperxp45 Lieutenant
Joined: Jun 07, 2003
Posts: 155
Posted:
Sun Feb 22, 2004 2:57 pm
thank you i will try this code ...u guys are very nice ..thanks !!!!
well i tried the code and iam not able to get it to work ..but after reading this post over and over i think foxfemfem that its really not what iam looking for , but the link i have provided on my last post is more what iam trying to get results for ,,, anyway thank you ..but still searching for a mod,hack,or a way a member can go to select a templet wich i can provide , that will make them a sig ...they will just click on a few buttons and whala! there sumital will send it to me then i will actully make it .with the templet they chose and text they provide... then i will host it on my site and post the code for them to use...
foxyfemfem Support Staff
Joined: Jan 23, 2003
Posts: 668
Location: USA
Posted:
Tue Feb 24, 2004 11:14 am
Hello,
I visited your site. I don't think you need a mod nor a hack, you need a complete program to do what you want. If, I'm not mistaken. You want to offer an image for the user's signature that you generate for them based on the information they give you? Uhm, you need a coder to code you a program that does that and a coder I'm not
_________________ If you shoot for the moon and miss, you'll still be amongst the stars.
viperxp45 Lieutenant
Joined: Jun 07, 2003
Posts: 155
Posted:
Tue Feb 24, 2004 10:12 pm
well thank you so much for the reply .. i was thinking that, but really didnt know. also thumbs up that sig u have is realy cool too ...i just couldnt get mine working,,,uploaded the image,and made a signature.php and put into the fourms directory but as my luck ... hehe but thanks have a very nice day ...
telli Support Mod
Joined: Aug 21, 2003
Posts: 335
Posted:
Tue Feb 24, 2004 10:48 pm
viperxp45 wrote:
well thank you so much for the reply .. i was thinking that, but really didnt know. also thumbs up that sig u have is realy cool too ...i just couldnt get mine working,,,uploaded the image,and made a signature.php and put into the fourms directory but as my luck ... hehe but thanks have a very nice day ...
Put the signature.php in your main root next to the config.php
Hi Telli, can you please tell me step by step how to do that? are you changing something in the code? I tried as you said with no results, I know I am missing a step here. Thanks.
telli Support Mod
Joined: Aug 21, 2003
Posts: 335
Posted:
Wed Feb 25, 2004 1:51 am
save this as signature.php and upload into your root directiory next to your config.php put the signature.png into your root/images folder.
Code:
<?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++;
}
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