d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > Guide: How-to Make A Dynamic Ladder-slasher Sig > In A Few Easy Steps With Pics
Prev1252627282960Next
Add Reply New Topic New Poll
Member
Posts: 1,909
Joined: May 8 2007
Gold: 2,507.26
Feb 18 2009 02:07pm
try these two lines in your .htacces for me:

Code
RewriteEngine On
RewriteRule filename.png filename.php5


where you replace filename with your filename of the signature, and in your directory rename filename.png.php5 to filename.php5 (so delete the .png, we now use mod rewrite instead of multiviews, so also delete options multiviews from your .htaccess).

It is less powerful compared to option multiviews as you have to specify for every file in there (you can use more advanced lines but for the sake of simplicity I will not explain them here).

This post was edited by flapmo on Feb 18 2009 02:08pm
Member
Posts: 4,785
Joined: Jul 17 2008
Gold: 0.00
Feb 18 2009 02:14pm
Quote (flapmo @ Wed, 18 Feb 2009, 21:07)
try these two lines in your .htacces for me:

Code
RewriteEngine On
RewriteRule filename.png filename.php5


where you replace filename with your filename of the signature, and in your directory rename filename.png.php5 to filename.php5 (so delete the .png, we now use mod rewrite instead of multiviews, so also delete options multiviews from your .htaccess).

It is less powerful compared to option multiviews as you have to specify for every file in there (you can use more advanced lines but for the sake of simplicity I will not explain them here).


http://www.berlinscatering.se/sig/don.php5 <- works

http://www.berlinscatering.se/sig/don.png <- doesn't
Member
Posts: 1,909
Joined: May 8 2007
Gold: 2,507.26
Feb 18 2009 02:17pm
o mybad, I forgot to tell you:

you have to edit the line:

Code
Header ('Content-type: image/jpeg');


to

Code
Header ('Content-type: image/png');


probably you have the first line there in your file, and somewhere in the end you have:

Code
imagepng($image);


It has to match, so replace with

Code
Header ('Content-type: image/png');


it is an error in my start post. My bad :x

This post was edited by flapmo on Feb 18 2009 02:17pm
Member
Posts: 4,785
Joined: Jul 17 2008
Gold: 0.00
Feb 18 2009 02:21pm
Quote (flapmo @ Wed, 18 Feb 2009, 21:17)
o mybad, I forgot to tell you:

you have to edit the line:

Code
Header ('Content-type: image/jpeg');


to

Code
Header ('Content-type: image/png');


probably you have the first line there in your file, and somewhere in the end you have:

Code
imagepng($image);


It has to match, so replace with

Code
Header ('Content-type: image/png');


it is an error in my start post. My bad :x


still doesnt work :<
Member
Posts: 1,909
Joined: May 8 2007
Gold: 2,507.26
Feb 18 2009 02:28pm
Quote (jNaz @ Wed, 18 Feb 2009, 22:21)
still doesnt work :<


can you upload the contents of the following file:

http://www.bastijn.nl/zooi/jNaz.rar

in a newly created directory for me? for instance ../public_html/sig/jNaz or something.

And then try

http://www.berlinscatering.se/sig/jNaz/don.png



Member
Posts: 20,664
Joined: Aug 20 2006
Gold: 620.00
Feb 24 2009 06:13am
whats the code looks like when I only want to show "...minutes ago"?
Banned
Posts: 1,471
Joined: Feb 8 2009
Gold: 0.00
Warn: 60%
Feb 24 2009 08:08am
Quote (Juggalo_Mole @ Wed, Aug 27 2008, 11:23am)
How do we get a server ohmy.gif

I suck with hosting things

yoyo.pl ;d free
Member
Posts: 4,620
Joined: Aug 3 2008
Gold: 525.25
Feb 24 2009 08:42am
Quote (erasko @ Tue, Feb 24 2009, 07:13am)
whats the code looks like when I only want to show "...minutes ago"?




call it as $lastplayed


Code
$lastaction = (int)$data->lastaction;
 $time1 = time() - $lastaction;
 $lastplayed = sec2hms($time1);



function sec2hms ($sec, $padHours = false)
{

  $days = intval(intval($sec) / 86400);
  $hours = intval(($sec / 3600) % 24);
  $minutes = intval(($sec / 60) % 60);
 
  if ($days > 0) {
  $hms = $days. ' days, ';

  $hms .= ($padHours)
        ? str_pad($hours, 2, "0", STR_PAD_LEFT). ' hours ago'
        : $hours. ' hours ago';
} else {
   $hms = "";
     $hms .= ($padHours)
      ? str_pad($hours, 2, "0", STR_PAD_LEFT). ' hours, '
      : $hours. ' hours, ';

  $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ' minutes ago';
}

  return $hms;
 
}
Member
Posts: 20,664
Joined: Aug 20 2006
Gold: 620.00
Feb 24 2009 08:44am
Quote (SilentXer0 @ Tue, Feb 24 2009, 04:42pm)
call it as    $lastplayed


Code
$lastaction = (int)$data->lastaction;
 $time1 = time() - $lastaction;
 $lastplayed = sec2hms($time1);



function sec2hms ($sec, $padHours = false)
{

  $days = intval(intval($sec) / 86400);
  $hours = intval(($sec / 3600) % 24);
  $minutes = intval(($sec / 60) % 60);
 
  if ($days > 0) {
  $hms = $days. ' days, ';

  $hms .= ($padHours)
        ? str_pad($hours, 2, "0", STR_PAD_LEFT). ' hours ago'
        : $hours. ' hours ago';
} else {
   $hms = "";
     $hms .= ($padHours)
      ? str_pad($hours, 2, "0", STR_PAD_LEFT). ' hours, '
      : $hours. ' hours, ';

  $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ' minutes ago';
}

  return $hms;
 
}


I know this one but I got some problems in changing it so last played is only shown in minutes not day hours etc wink.gif
Member
Posts: 4,620
Joined: Aug 3 2008
Gold: 525.25
Feb 24 2009 09:21am
Quote (erasko @ Tue, Feb 24 2009, 09:44am)
I know this one but I got some problems in changing it so last played is only shown in minutes not day hours etc wink.gif


Code

$lastaction = (int)$data->lastaction;
$time1 = time() - $lastaction;
$lastplayed = sec2m($time1);


function sec2m($sec)
{
  $m = intval($sec / 60);
  $m .=' minutes ago';
  return $m;
 
}




This post was edited by SilentXer0 on Feb 24 2009 09:35am
Go Back To Ladder Slasher Topic List
Prev1252627282960Next
Add Reply New Topic New Poll