Advertisement:

Author Topic: signature info stats [no more updates and support]  (Read 171573 times)

Offline brianjw

  • SMF Hero
  • ******
  • Posts: 2,157
  • Gender: Male
Re: signature info stats
« Reply #180 on: November 04, 2008, 10:18:25 PM »
Are the images actually in those locations? If so, are they CHMODDED to 777?

Offline sebastian

  • Jr. Member
  • **
  • Posts: 204
  • Gender: Male
Re: signature info stats
« Reply #181 on: November 05, 2008, 04:42:44 AM »
Are the images actually in those locations?


Offline sebastian

  • Jr. Member
  • **
  • Posts: 204
  • Gender: Male
Re: signature info stats
« Reply #183 on: November 05, 2008, 07:35:36 PM »
OK!!!

Offline Zeebra

  • Semi-Newbie
  • *
  • Posts: 20
Re: signature info stats
« Reply #184 on: December 19, 2008, 02:36:05 PM »
...also...
Quote
I noticed that the online members is also counting guests, is there anyway to not have it count guests

Remove
Code: [Select]
$result = db_query("
SELECT COUNT(session)
FROM {$db_prefix}log_online", __FILE__, __LINE__);
list ($context['users_online']) = mysql_fetch_row($result);

Add
Code: [Select]
$result = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}log_online", __FILE__, __LINE__);

    $context['users_online'] = 0;

while ($row = mysql_fetch_assoc($result))
{

    if (!empty($row['ID_MEMBER']))
{
$context['users_online']++;
continue;
}

}


Hi Sebastian ,

your code works great for the stats page.  If I wanted to not show guests on the main page under "Users Online" what would I need to change to accomplish that?

Offline sebastian

  • Jr. Member
  • **
  • Posts: 204
  • Gender: Male
Re: signature info stats
« Reply #185 on: December 22, 2008, 07:35:04 AM »
If I wanted to not show guests on the main page under "Users Online" what would I need to change to accomplish that?

Hi Zeebra,

Do you mean 'The main page' of your forum? If so...

Backup and open your_forum_path/Themes/Your_theme/BoardIndex.template.php

Find
Code: [Select]
echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Replace
Code: [Select]
echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Offline Zeebra

  • Semi-Newbie
  • *
  • Posts: 20
Re: signature info stats
« Reply #186 on: December 22, 2008, 10:55:59 AM »
If I wanted to not show guests on the main page under "Users Online" what would I need to change to accomplish that?

Hi Zeebra,

Do you mean 'The main page' of your forum? If so...

Backup and open your_forum_path/Themes/Your_theme/BoardIndex.template.php

Find
Code: [Select]
echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Replace
Code: [Select]
echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Thank you again Sebastian!  That works great on the main page of the forum.  One more instance.  When I click on the link for "x Users" on the main page it takes me to a "Who's Online" page "index.php?action=who"...that still lists Guests.  Where is the code to modify for that last page?
« Last Edit: December 22, 2008, 10:59:05 AM by Zeebra »

Offline sebastian

  • Jr. Member
  • **
  • Posts: 204
  • Gender: Male
Re: signature info stats
« Reply #187 on: December 23, 2008, 12:57:51 AM »
When I click on the link for "x Users" on the main page it takes me to a "Who's Online" page "index.php?action=who"...that still lists Guests.  Where is the code to modify for that last page?

Same file BoardIndex.template.php

Find
Code: [Select]
echo '
                  ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Replace
Code: [Select]
echo '
', $context['show_who'] ? '' : '', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Find
Code: [Select]
echo $context['show_who'] ? '</a>' : '', '
<div class="smalltext">';

Replace
Code: [Select]
echo $context['show_who'] ? '' : '', '
<div class="smalltext">';

Offline Zeebra

  • Semi-Newbie
  • *
  • Posts: 20
Re: signature info stats
« Reply #188 on: December 23, 2008, 10:45:21 AM »
When I click on the link for "x Users" on the main page it takes me to a "Who's Online" page "index.php?action=who"...that still lists Guests.  Where is the code to modify for that last page?

Same file BoardIndex.template.php

Find
Code: [Select]
echo '
                  ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Replace
Code: [Select]
echo '
', $context['show_who'] ? '' : '', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Find
Code: [Select]
echo $context['show_who'] ? '</a>' : '', '
<div class="smalltext">';

Replace
Code: [Select]
echo $context['show_who'] ? '' : '', '
<div class="smalltext">';


I couldn't find the 2nd piece of code you listed.  I found instead:

Code: [Select]
if ($context['show_who'])
echo '</a>';

echo '
<div class="smalltext">';

and I tried replacing it with your code but I still see "Guests" in the "Who's Online" section?

Offline sebastian

  • Jr. Member
  • **
  • Posts: 204
  • Gender: Male
Re: signature info stats
« Reply #189 on: December 23, 2008, 09:13:42 PM »
and I tried replacing it with your code but I still see "Guests" in the "Who's Online" section?

OK I understood now.
Backup and open your_forum_path/Themes/Your_theme/Who.template.php

Find
Code: [Select]
if (!$member['is_guest'])
{
echo '
<div style="float: right; width: 14ex;">
', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" align="middle" />' : $member['online']['text'], $context['can_send_pm'] ? '</a>' : '', '
', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], '
</div>';
}

echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>';

if (!empty($member['ip']))
echo '
(<a href="' . $scripturl . '?action=trackip;searchip=' . $member['ip'] . '" target="_blank">' . $member['ip'] . '</a>)';

echo '
</td>
<td nowrap="nowrap">', $member['time'], '</td>
<td>', $member['action'], '</td>
</tr>';

Replace
Code: [Select]
if (!$member['is_guest'])
{
echo '
<div style="float: right; width: 14ex;">
', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" align="middle" />' : $member['online']['text'], $context['can_send_pm'] ? '</a>' : '', '
', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], '
</div>';


echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? '' : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>';

if (!empty($member['ip']))
echo '
(<a href="' . $scripturl . '?action=trackip;searchip=' . $member['ip'] . '" target="_blank">' . $member['ip'] . '</a>)';
       
echo '
</td>
<td nowrap="nowrap">', $member['time'], '</td>
<td>', $member['action'], '</td>';
}

echo '</tr>';

Offline Zeebra

  • Semi-Newbie
  • *
  • Posts: 20
Re: signature info stats
« Reply #190 on: December 24, 2008, 09:44:17 PM »
Thank you Sebastian!!!  You are a God-send...that was perfect!

Offline haito

  • Jr. Member
  • **
  • Posts: 390
  • Gender: Male
  • uso~
    • japanesia
Re: signature info stats
« Reply #191 on: March 16, 2009, 03:59:01 AM »
hello...
i like this...
but when i used this, each i modified post or post somehing always appeared ""Session verification failed. Please try logging out and back in again, and then try again. ""

so when i removed sign.php, i can modify and post again...
any sollution? i still want to use signature info stats
www.japanesia.co.id | Portal Berita & Komunitas Untuk Kamu yang Suka Jepang

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,943
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: signature info stats
« Reply #192 on: March 18, 2009, 02:57:16 PM »
Can this work with smf 1.1.8?
I tried but dont know where to add code from step 3? :/
When i try to browse signature_info.php it says:
Quote
The image “http://www.samo-opusteno.info/forum/signature_info.php” cannot be displayed, because it contains errors.

Offline allenz

  • Newbie
  • *
  • Posts: 5
Re: signature info stats
« Reply #193 on: March 18, 2009, 04:09:33 PM »
Hi,
Thanks for sharing the  lovely signature codes , indeed one..................... :)

Offline agbattery

  • Newbie
  • *
  • Posts: 7
  • Gender: Male
    • Accessory Genie
Re: signature info stats
« Reply #194 on: March 23, 2009, 04:04:54 PM »
Great coding thanks for the help
OEM hxxp:www.accessorygenie.com/batteries-c-1.html [nonactive], hxxp:www.accessorygenie.com/battery-chargers-c-2.html [nonactive], hxxp:www.accessorygenie.com/ac-adapters-c-3.html [nonactive], hxxp:www.accessorygenie.com/memory-cards-c-4.html [nonactive], hxxp:www.accessorygenie.com/gps-c-102.html [nonactive], hxxp:www.accessorygenie.com/radar-detectors-c-103.html [nonactive], and other hxxp:www.accessorygenie.com [nonactive]

Offline kizko

  • Full Member
  • ***
  • Posts: 405
    • PSP-Fanatik
Re: signature info stats
« Reply #195 on: April 22, 2009, 11:06:25 AM »
Hi, i have some custom profiles made by this mod: http://custom.simplemachines.org/mods/index.php?mod=319

How can i add: Avatar, username, and thoose custom fields to my signature ?
What i have to create, sorry, my english is a little bit bad. I want to tell me please the steps again to make that what i asked.

Offline MiXailo

  • Semi-Newbie
  • *
  • Posts: 10
Re: signature info stats [no more updates and support]
« Reply #196 on: January 07, 2014, 03:59:46 PM »
SMF: 2.0.6
Problem: I found some code on page 6 in this topic and I do everything that need and it won't works!!
Code: [Select]
<?php

if (file_exists(dirname(__FILE__) . '/SSI.php')) {
require(
dirname(__FILE__) . '/SSI.php');
}
else die();

getinfos();
signature();

function 
getinfos()
{
global 
$smcFunc$context$memberContext;

$mommy '';

if (
$_GET['u'] >= 1)
    
$id_mem = isset($_GET['u']) ? (int) $_GET['u'] : die();
else die();

    
$result $smcFunc['db_query']('''
        SELECT member_name
        FROM {db_prefix}members
        WHERE id_member = '
. (int) $id_mem.' AND is_activated = 1
        LIMIT 1
        '
,
        array()
    );

     if (
$smcFunc['db_fetch_row']($result) > 0)  
{

 
$mprofile[] = (int) $id_mem;

loadMemberData($mprofilefalse'profile');

foreach (
$mprofile as $profile)
{
loadMemberContext($profile);


$context['item_comms'] = array();

$context['item_comms'][] = array(
    
'lbuser' => $memberContext[$id_mem]
);

foreach (
$context['item_comms'] as $item_comm)
    {
$context['membername'] = $item_comm['lbuser']['name'];
$context['posts'] = $item_comm['lbuser']['posts'];
$context['gender'] = $item_comm['lbuser']['gender']['image'];
$context['karmaBad'] = $item_comm['lbuser']['karma']['bad'];
$context['karmaGood'] = $item_comm['lbuser']['karma']['good'];
$context['avatar'] = $item_comm['lbuser']['avatar']['href'];
    }

} else die();

if (!empty(
$context['avatar']))
  {
  
$mommy = !empty($context['avatar']) ? $context['avatar'] : ''
  
$mommy preg_split('/;/',$mommy, -1PREG_SPLIT_OFFSET_CAPTURE);
  
$mommy $mommy [1][0];
  
$mommy trim(substr(strrchr($mommy'='), 1));

$result2 $smcFunc['db_query']('','
SELECT filename
FROM {db_prefix}attachments
WHERE id_attach = ' 
. (int) $mommy ' AND attachment_type = 0 AND approved = 1
LIMIT 1'
,
array()
);

list(
$count_result) = $smcFunc['db_fetch_row']($result2);

   
$context['filename_avatar'] = $count_result;
   
$smcFunc['db_free_result']($result2);
      
  }
  
  
$smcFunc['db_free_result']($result);
 }
 

function 
signature()
{
global 
$context$settings$modSettings;

$lemo '';
$img_url $settings['default_theme_url']; 

$membername $context['membername'];
$posts $context['posts'];

    if (!empty(
$context['filename_avatar'])) 
     {
       
$lemo $context['filename_avatar'];
     }
    else {
       
$lemo '';
     } 

$avatar $context['avatar'];
$gender $context['gender'];

if (
preg_match'/Male/'$gender))
{
    
$gender "male";
$img_gender "$img_url/images/Male.gif";

elseif (
preg_match'/Female/'$gender)) {
    
$gender "female";
    
$img_gender "$img_url/images/Female.gif"; }
else {
$gender "n/a"$img_gender "$img_url/images/star.gif";}

$karmaBad $context['karmaBad'];
$karmaGood $context['karmaGood'];   
if (
$modSettings['karmaMode'] == '1'

$karma $karmaGood $karmaBad;
} elseif (
$modSettings['karmaMode'] == '2')
{
$karma '+'.$karmaGood.' / '.'-'.$karmaBad;
} elseif (
$modSettings['karmaMode'] == '0'
{
$karma 'n/a';
}
// Your settings +++++++++++++++++++++++++++++++++++ 
$backimg "$img_url/images/sign.png"// or where you want 
$noavatar "$img_url/images/noavatar.png"// or where you want
$set_avatar_height 0//move avatar up/down
$set_avatar_width 0//move avatar left/right
$set_gender_style 0// 0 text , 1 image
$set_gender_height = -92//move gender up/down
$set_gender_width = -230//move gender left/right
// Your settings +++++++++++++++++++++++++++++++++++

if (!empty($avatar)) {$avatar $avatar;}
else {
$avatar $noavatar;}

if (!empty(
$lemo)) { $ext substr(strrchr($lemo'.'), 1); }
else {
$ext substr(strrchr($avatar'.'), 1);}

unset(
$lemo);

if (
$ext == 'png') {$img_bgr imagecreatefrompng($avatar); }
elseif (
$ext == 'jpg') {$img_bgr imagecreatefromjpeg($avatar); }
elseif (
$ext == 'gif') {$img_bgr imagecreatefromgif($avatar); }
else die();

$size getimagesize($backimg);

if (
$set_gender_style == 1) {
$img_bgr_gender imagecreatefromgif($img_gender);
$image_width_gender imagesx($img_bgr_gender);  
$image_height_gender imagesy($img_bgr_gender);
$dest_x_gender $size[0] - $image_width_gender $set_gender_width;  
$dest_y_gender $size[1] - $image_height_gender $set_gender_height;
}

$image_width imagesx($img_bgr);  
$image_height imagesy($img_bgr);

//______________avatar  width & height must be <=106
if ($image_width <=106 && $image_width >=10 && $image_height <=106 && $image_height >=10)
  {
$set_avatar_width =  $set_avatar_width + (($image_width 101) * 0.35);
$set_avatar_height =  $set_avatar_height + (($image_height 101) * 0.35);
 }
else { die();}

$image imagecreatetruecolor($image_width$image_height); 
$image imagecreatefrompng($backimg);  

$dest_x $size[0] - $image_width $set_avatar_width;  
$dest_y $size[1] - $image_height $set_avatar_height
imagecopymerge($image$img_bgr,  $dest_x$dest_y00$image_width$image_height100);
if (
$set_gender_style == 1) {
imagecopymerge($image$img_bgr_gender,  $dest_x_gender$dest_y_gender00$image_width_gender$image_height_gender100);
}
 
$green ImageColorAllocate ($image2312417); 
$blue ImageColorAllocate ($image00255); 
$red ImageColorAllocate ($image25500);
$white ImageColorAllocate ($image255255255);
$black ImageColorAllocate ($image000);

ImageString($image42035"Postova: $posts"$black);
ImageString($image42051"Karma: $karma"$black);
if (
$set_gender_style == 0) {
ImageString($image5314"$membername"$black);
ImageString($image42066"Pol: $gender"$black);
} else {
ImageString($image5444"$membername"$black);}

header("Content-Type: image/png"); 

$php PHP_VERSION
if (@
version_compare(PHP_VERSION'5.1.0'">="))
  {
  
// if PHP v5.1 ++
Imagepng($image,null,9,null); 
  }
else {
Imagepng($image,null,90,null); 
  }    
ImageDestroy ($image);
ImageDestroy ($img_bgr);  
}


?>
I have uploaded file sign.php in public_html where is my forum (up code)
I made some photos in photoshop
I'm uploaded this to Themes/default/images I named this as noavatar.png
and this I'm uploaded to Themes/default/images I named this as sign.png
When I put this in signature area shows this
I used this code
Code: [Select]
[img]http://www.gti-roleplay.net/sign.php?u=1[/img]Sorry for bad English!

Offline MoreBloodWine

  • SMF Hero
  • ******
  • Posts: 2,723
  • Gender: Male
  • ...
    • Uncharted 2: Among Thieves Stat Sig Generator
Re: signature info stats [no more updates and support]
« Reply #197 on: January 28, 2014, 06:42:14 PM »
I still use this quite successully for a few forums, and even adapted it to display some of my user stats on a bitcoin mining site.

However, why I am here today, even though support is stated as no longer offered is just to see if anyone can tell me how to make, if possible, one of the text strings underlined... Ty.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,629
    • StoryBB/StoryBB on GitHub
Re: signature info stats [no more updates and support]
« Reply #198 on: January 28, 2014, 06:48:14 PM »
imageline() will be your friend. You will have to draw the underline in yourself since imagestring() has no function for it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline MoreBloodWine

  • SMF Hero
  • ******
  • Posts: 2,723
  • Gender: Male
  • ...
    • Uncharted 2: Among Thieves Stat Sig Generator
Re: signature info stats [no more updates and support]
« Reply #199 on: January 28, 2014, 08:19:17 PM »
imageline() will be your friend. You will have to draw the underline in yourself since imagestring() has no function for it.
I hate to ask because support on this is no longer offered and all I originally asked for was an idea but I looked at the imageline() php manual and got a little lose, could you maybe please help me with this one small thing ?

Code: [Select]
REMOVED
This is the line I want underlined using the same color variable.

ImageString($im, 3, 47, 40, "BTC-Guild User: MoreBloodWine", $lightblue);
« Last Edit: January 28, 2014, 08:49:28 PM by MoreBloodWine »
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits