Forum sig

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Re: Forum sig

Postby dazbobaby » Sat May 12, 2012 1:12 pm

website logo and tag line is working. Now for the album/artist/trakc details.
It's really a cheat, but until I can figure out how gaussian blur works, it'll have to do.
Image
Subsonic Signature, now with Random Images :D
Signature hosting - custom images, text, and fonts - http://mess-hall.co.uk/subsig/
User avatar
dazbobaby
 
Posts: 60
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby dazbobaby » Sat May 12, 2012 1:25 pm

It's done, it looks very neat on a light background, and it is a cheat. I duplicated the text layers, created a new sequence with dark text (shadow) then just continued on from there.
Code: Select all
    //If the user is playing a music file...
playing:
$imageList = array("music1.png","music2.png","music10.png","sony1.png","sony4.png","sony13.png");
$image = imagecreatefrompng($imageList[rand(1,count($imageList))-1]);
$end = imagealphablending($image, false);
$save = imagesavealpha($image, true);
header("Content-type: image/png"); 
header("Cache-Control: no-cache, must-revalidate"); 
header("Expires: Fri, 19 Jan 1994 05:00:00 GMT"); 
header("Pragma: no-cache"); 
     //Get the cover art
$coverart = "http://".$server."/rest/getCoverArt.view?u=".$admin."&p=".$adminpass."&v=1.5.0&c=signature&id=".$second_gen['coverArt']."&size=150";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $coverart);
curl_setopt ($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_HEADER, false);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 0);
$rawdata = curl_exec($ch);
$image2 = imagecreatefromstring($rawdata);
curl_close($ch);
//text colour
// this part is to create the drop shadow
$color = imagecolorallocate($image, 30, 30, 30);
$font = getcwd()."/aliee13.ttf";
$fontSize = 10;
$fontRotation = -0;
$x = 156;
$y = 98;
$end = imagealphablending($image, true);
$str = "Head Bangin' while listening to\nArtist: ".$second_gen['artist']."\nTitle: ".$second_gen['title']."\nAlbum: ".$second_gen['album'];
imagettftext($image, $fontSize, $fontRotation, $x, $y, $color, $font, $str);
imagettftext($image, 12, 0, 152, 282, imagecolorallocate($image, 30, 30, 30), getcwd()."/aliee13.ttf", $time);
$strwww = "www.Mess-Hall.co.uk";
imagettftext($image, 14, 0, 154, 16, imagecolorallocate($image, 30, 30, 30), getcwd()."/Capture it.ttf", $strwww);
$strtag = "A Small Review of Almost Everything";
imagettftext($image, 9, 0, 158, 26, imagecolorallocate($image, 30, 30, 30), getcwd()."/Capture it.ttf", $strtag);
// End of drop shadow

//text colour

$color = imagecolorallocate($image, 255, 255, 255);
$font = getcwd()."/aliee13.ttf";
$fontSize = 10;
$fontRotation = -0;
$x = 155;
$y = 97;
// $image = imagealphablending($str, true);
$end = imagealphablending($image, true);
$str = "Head Bangin' while listening to\nArtist: ".$second_gen['artist']."\nTitle: ".$second_gen['title']."\nAlbum: ".$second_gen['album'];
imagettftext($image, $fontSize, $fontRotation, $x, $y, $color, $font, $str);
imagettftext($image, 12, 0, 150, 280, imagecolorallocate($image, 255, 255, 255), getcwd()."/aliee13.ttf", $time);
$strwww = "www.Mess-Hall.co.uk";
imagettftext($image, 14, 0, 152, 15, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $strwww);
$strtag = "A Small Review of Almost Everything";
imagettftext($image, 9, 0, 156, 25, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $strtag);
// End of drop shadow test
Image
Subsonic Signature, now with Random Images :D
Signature hosting - custom images, text, and fonts - http://mess-hall.co.uk/subsig/
User avatar
dazbobaby
 
Posts: 60
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby SparkyRih » Sat May 12, 2012 1:36 pm

Nice work...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Forum sig

Postby dazbobaby » Sat May 12, 2012 3:09 pm

thanks Sparky :) I don't think it would have worked without out the alpha. Thanks for that.

got any samples of your updates in action?
Image
Subsonic Signature, now with Random Images :D
Signature hosting - custom images, text, and fonts - http://mess-hall.co.uk/subsig/
User avatar
dazbobaby
 
Posts: 60
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby SparkyRih » Sat May 12, 2012 3:30 pm

dazbobaby wrote:thanks Sparky :) I don't think it would have worked without out the alpha. Thanks for that.

got any samples of your updates in action?


I'll PM you a link...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Forum sig

Postby dazbobaby » Mon Aug 20, 2012 10:26 am

made a few minor changes:
Randomised the "nothing" image.
Added a hit counter - purely for curiousity

nothing:
Code: Select all
      //If user is offline, or the last file has finished playing...
nothing:
$imageList = array("graveyard.png","pushthebutton.png","worldmap.png","record.png","fantasy.png","couch.png","tron.png","eye.png","dancer.png","hifi.png","mask.png","storm.png");
$image = imagecreatefrompng($imageList[rand(1,count($imageList))-1]);
$end = imagealphablending($image, true);
$save = imagesavealpha($image, true);
$color = imagecolorallocate($image, 0, 0, 0);
$font = getcwd()."/Capture it.ttf";
$fontSize = 14;
//text location
$x = 7;
$y = 20;
$fontRotation = 0;
$str = "Your IP Address is $_SERVER[REMOTE_ADDR]";
//$str = "Your browser is $_SERVER[HTTP_USER_AGENT]";
imagettftext($image, $fontSize, $fontRotation, $x, $y, $color, $font, $str);
$x = 5;
$y = 18;
$color = imagecolorallocate($image, 255, 255, 255);       
$fontRotation = 0;
$str = "Your IP Address is $_SERVER[REMOTE_ADDR]";
  //$str = "Your browser is $_SERVER[HTTP_USER_AGENT]";
imagettftext($image, $fontSize, $fontRotation, $x, $y, $color, $font, $str);
imagettftext($image, 14, 0, 8, 148, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $time);
$strnot = "Not Watching Or Listening to Anything Right Now";
imagettftext($image, 14, 0, 5, 145, imagecolorallocate($image, 0, 0, 0), getcwd()."/Capture it.ttf", $time);
$strnot = "Not Watching Or Listening to Anything Right Now";
imagettftext($image, 10, 0, 140, 78, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $strnot);
$strwww = "www.Mess-Hall.co.uk";
imagettftext($image, 14, 0, 371, 136, imagecolorallocate($image, 30, 30, 30), getcwd()."/Capture it.ttf", $strwww);
$strwww = "www.Mess-Hall.co.uk";
imagettftext($image, 14, 0, 370, 135, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $strwww);
$strtag = "A Small Review of Almost Everything";
imagettftext($image, 8, 0, 377, 146, imagecolorallocate($image, 30, 30, 30), getcwd()."/Capture it.ttf", $strtag);
$strtag = "A Small Review of Almost Everything";
imagettftext($image, 8, 0, 376, 145, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $strtag);
// Uncomment the next line (remove //) to display the number of hits on your page.
//echo $hits;
  //hits text location
header("Content-type: image/png");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Fri, 19 Jan 1994 05:00:00 GMT");
header("Pragma: no-cache");
imagepng($image);
imagepng($image);
imagedestroy($image);
exit();


hit Counter:
Code: Select all
$xml = @simplexml_load_file("http://".$server."/rest/getNowPlaying.view?u=".$admin."&p=".$adminpass."&v=1.5.0&c=signature");
if($xml==false) {
goto offline;
}

// Hitcounter
$filename = 'hitcountdayz.txt';
$handle = fopen($filename, 'r');
$hits = trim(fgets($handle)) + 1;
fclose($handle);

$handle = fopen($filename, 'w');
fwrite($handle, $hits);
fclose($handle);


If anyone can get the hit counter to display correctly PLMK, I tried for a couple of hours yesterday and struggled like mad, displaying it worked, but it broke the rest of the code.
Image
Subsonic Signature, now with Random Images :D
Signature hosting - custom images, text, and fonts - http://mess-hall.co.uk/subsig/
User avatar
dazbobaby
 
Posts: 60
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby gurutech » Sun Sep 16, 2012 11:20 pm

For those who were interested in upgrading to 4.7 Subsonic, this mod will still work with no extra steps after upgrading, but I would suggest making a backup just in case. It worked for me, without having to change anything with the signature mod.
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Forum sig

Postby dazbobaby » Mon Sep 17, 2012 1:25 pm

I've yet to upgrade, but as Guru said, there's not going to be a problem.
BTW Gurutech, how come you're not showing off your signature?
Image
Subsonic Signature, now with Random Images :D
Signature hosting - custom images, text, and fonts - http://mess-hall.co.uk/subsig/
User avatar
dazbobaby
 
Posts: 60
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby gurutech » Mon Sep 17, 2012 1:57 pm

dazbobaby wrote:I've yet to upgrade, but as Guru said, there's not going to be a problem.
BTW Gurutech, how come you're not showing off your signature?



I do show it off, just not here... lol

I have it on a truck forum I'm a part of, and they have size limitations on how big the signature file can be (500x100), so it looks small compared to what the rest of the ones here look like. Guess I suffer from "signature envy"... lol
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Forum sig

Postby dazbobaby » Mon Sep 17, 2012 2:04 pm

just recode to that size.
Or do as I do, I have 4 sets of images and code for various forums.
Image
Subsonic Signature, now with Random Images :D
Signature hosting - custom images, text, and fonts - http://mess-hall.co.uk/subsig/
User avatar
dazbobaby
 
Posts: 60
Joined: Tue Dec 06, 2011 12:29 pm

Previous

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 1 guest