• Signature image v2.3 5 0 5 1
Currently:  

Author Topic: Signature image v2.3  (Read 622644 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.21
« Reply #165 on: October 29, 2005, 12:17:04 AM »
I guess I should add that note to the tutorial ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline karlyn

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Karlyns.com
Re: Signature image v2.21
« Reply #166 on: November 20, 2005, 04:40:25 PM »
Hello!

I got this working and I enjoy it. Thank you for it!

I would like to show total downloads and maybe even "new downloads" also if possible, but when trying to add total downloads, I think I have the stats area written in wrong because it down not display, or I'm missing something else that I need.

array(array($fsize, $offset2+$tiny, $lang_downloads, "text_color"), array($fsize, $far, $show['downloads'], "text_color")),

Thanks in advance for your help.
- karlyn

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.21
« Reply #167 on: November 20, 2005, 06:42:06 PM »
You also need this mysql query:
Code: [Select]
// --- Total comments -----
  $sql = "SELECT SUM(image_downloads) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);
  $show['downloads'] = $row['sum'];
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline karlyn

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Karlyns.com
Re: Signature image v2.21
« Reply #168 on: November 21, 2005, 12:07:21 AM »
That's the ticket, thank you V@no!  :D

Offline karlyn

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Karlyns.com
Re: Signature image v2.20.2
« Reply #169 on: November 21, 2005, 01:38:50 AM »
I read/reread these status messages up and down and tried and tried and I just can't get my yahoo status to work.

Did I put this in wrong?

$statusimages = "/thegallery/"; //the directory where online.gif offline.gif and unknown.gif images are.
$statusurl = "http://osi.lostinspacehosting.com:81/"; //the url of status indicator server. WITH TRAILING SLASH!
//list of messengers
$messengers = array(
  "yahoo"   => "iamawahm"
);



u can try this:
replace
Code: [Select]
// --------- End Config ----------
with:
Code: [Select]
$statusimages = "/www/onlinestatusimgs/"; //the directory where online.gif offline.gif and unknown.gif images are.
$statusurl = "http://osi.lostinspacehosting.com:81/"; //the url of status indicator server. WITH TRAILING SLASH!
//list of messengers
$messengers = array(
  "icq" => "85389818",
  "aim"   => "JensF200x",
  "yahoo"   => "jensfunk"
);
// --------- End Config ----------

function online($id, $what)
{
  global $statusurl;
  $url = parse_url($statusurl);
  $header = "";
  if ($request = @fsockopen($url['host'], ((isset($url['port'])) ? $url['port'] : 80), $header, $header, 3))
  {
    fputs($request, "GET /$what/$id HTTP/1.0\r\nHost: ".$url['host']."\r\n\r\n");
    $header = fread($request, 200);
    fclose($request);
    if (strstr($header, "online"))
    {
      return true;
    }
    if (strstr($header, "unknown"))
    {
      return 2;
    }
    else
    {
      return false;
    }
  }
  return 2;
}

Then find:
Code: [Select]
  $function = "Image".$type;Insert above:
Code: [Select]
  $i = 0;
  $n = array_rand($messengers, count($messengers));
  $left = ($width/2) - (48*count($messengers)/2) - 14;
  foreach ($n as $key)
  {
    $status = online($messengers[$key], $key);
    $img = ($status) ? (($status === true) ? "online" : "unknown") : "offline";
    $st = imagecreatefromgif($statusimages.$key.$img.".gif");
    imagecopymerge($im, $st, ($left+$i), ($height-25), 0, 0, 48, 25, 100);
    $i += 48;
  }
edit the settings.

Offline maikew

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • MW PhotoWorks & Templates
Re: Signature image v2.21
« Reply #170 on: November 21, 2005, 05:13:02 AM »
have the same problem.my icq status won't work too  :oops:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.21
« Reply #171 on: November 21, 2005, 06:20:32 AM »
Quote
Warning: Invalid argument supplied for foreach() in /home/frkarlyn/public_html/thegallery/signature.php on line 390
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline karlyn

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Karlyns.com
Re: Signature image v2.21
« Reply #172 on: November 21, 2005, 06:38:59 AM »
Line 390 is :

  foreach ($n as $key)

I'm not sure what to do with that.
Any suggestions on what I'm missing?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.21
« Reply #173 on: November 21, 2005, 07:03:16 AM »
attach your signature.php to your reply (u might need change extension to .txt)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline karlyn

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Karlyns.com
Re: Signature image v2.21
« Reply #174 on: November 21, 2005, 08:04:37 AM »
Thank you for checking it out!  It's much appreciated.

signature.php.txt (changed to .txt for this purpose) is attached.

- Karlyn

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.21
« Reply #175 on: November 21, 2005, 08:11:48 AM »
Hmm...apperently array_rand() function does not work when only one item in the array is present...
replace
Code: [Select]
  $n = array_rand($messengers, count($messengers));with:
Code: [Select]
  $n = $messengers;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline karlyn

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Karlyns.com
Re: Signature image v2.21
« Reply #176 on: November 21, 2005, 08:21:13 AM »
Thank you. Done.
My signature graphic displays now, but still no yahoo images displaying. I still must have something else written the wrong way. Maybe a path?

Offline geohei

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Signature image v2.21
« Reply #177 on: November 21, 2005, 09:06:35 PM »
Something else ...

I have several private categories (visible only after permissions are set) in my image gallery. These are also shown in the signature thumb. Is it possible to exclude those from being displayed in the signature?

Thanks,

Offline maikew

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • MW PhotoWorks & Templates
Re: Signature image v2.21
« Reply #178 on: November 21, 2005, 10:32:05 PM »
same prob @vano.my icq graphic won't work.:(

i attached my signature,please check it out  :oops:
my icq graphics (icqoffline,icqonline and icqunknown.gif are in the right folder "icq" with chmod 777)  :?:

thank you
maike

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.21
« Reply #179 on: November 22, 2005, 12:57:34 AM »
ok, replace
Code: [Select]
  foreach ($n as $key)
  {
    $status = online($messengers[$key], $key);
with:
Code: [Select]
  foreach ($n as $key => $val)
  {
    $status = online($val, $key);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)