Forum sig

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

Moderator: moderators

Forum sig

Postby donpearson » Tue May 26, 2009 4:24 pm

Im working on a forum sig to show what your playing and stuff like that, but its php so you will need to install that as well.
Facebook Group:
http://www.facebook.com/groups/subsonic.group/

Image
donpearson
 
Posts: 361
Joined: Wed Oct 15, 2008 3:53 pm
Location: UK

Postby donpearson » Thu Jul 09, 2009 3:32 pm

I have a dam good question, im a php man and would love to get php talking to subsonic.
Im still picking up java as i go but some help would be nice to get me on my way.

(wow this was my 100th post lol)
Facebook Group:
http://www.facebook.com/groups/subsonic.group/

Image
donpearson
 
Posts: 361
Joined: Wed Oct 15, 2008 3:53 pm
Location: UK

Postby sindre_mehus » Thu Jul 09, 2009 6:11 pm

I'm hoping to add a REST interface to Subsonic to better support third-party integration.

A first, minimal version of this *might* come in 3.8.
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby donpearson » Thu Jul 09, 2009 6:39 pm

Now that would be nice to have in subsonic as i have made some nice apps that will go with it.
Facebook Group:
http://www.facebook.com/groups/subsonic.group/

Image
donpearson
 
Posts: 361
Joined: Wed Oct 15, 2008 3:53 pm
Location: UK

Postby deejay2302 » Fri Apr 09, 2010 5:54 pm

Give it a How To for this Feature? I will create my own Stat-Signatur. We have Version 3.9 . Works the Feature?
21.681 Artists
58.141 Albums
674.091 Songs
5072,14 GB (~ 49.341 Hours)
User avatar
deejay2302
 
Posts: 165
Joined: Tue Oct 06, 2009 5:36 pm
Location: Germany

Postby donpearson » Mon Feb 21, 2011 9:20 am

For anyone that is intrested here is a little look at the signature im working on this min:

This is the live signature not just an image...
Image

All comments and ideas welcome, but please bare in mined im still working on this and have a lot im adding.
donpearson
 
Posts: 361
Joined: Wed Oct 15, 2008 3:53 pm
Location: UK

Postby bytethdgroove » Thu Apr 28, 2011 12:54 pm

yes very intersted, any eta on a release?
been trying to get the other one posted earlier working, but nothing but problems with that script....
can't wait to test yours
peace
byte
User avatar
bytethdgroove
 
Posts: 59
Joined: Mon Apr 25, 2011 1:02 pm
Location: Chicago

Postby bytethdgroove » Fri Apr 29, 2011 3:43 pm

got the code from lucron working to create a forum signature, tried to hack it up, did manage to add genre, album, year and such to it, but im at a roadblock trying to add album art...wondering if you can help
thanks
byte
"I'm as honest as the day is long, the longer the daylight the less I do wrong!"
Image
User avatar
bytethdgroove
 
Posts: 59
Joined: Mon Apr 25, 2011 1:02 pm
Location: Chicago

Postby bytethdgroove » Thu May 26, 2011 10:57 am

so Don, ever finish your forum sig, care to publish it? if not possibly wanna help me solve album art and Ill be glad to share my code..
thanks
byte
"I'm as honest as the day is long, the longer the daylight the less I do wrong!"
Image
User avatar
bytethdgroove
 
Posts: 59
Joined: Mon Apr 25, 2011 1:02 pm
Location: Chicago

Postby SparkyRih » Fri May 27, 2011 10:00 am

Could I take a look at the code?
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

Postby bytethdgroove » Fri May 27, 2011 10:32 am

sweet ill send u a pm with the code I have, when I get home from work.
thanks man...

oh and btw....the code is all over the place, as im not much of a programmer, I do understand the fundementals, however I dont code much and it shows in my code ;)

once it's finished I plan on posting the full code, if anyone wants what I currently have (everything works except album art) just pm me

peace
byte
"I'm as honest as the day is long, the longer the daylight the less I do wrong!"
Image
User avatar
bytethdgroove
 
Posts: 59
Joined: Mon Apr 25, 2011 1:02 pm
Location: Chicago

Postby SparkyRih » Fri May 27, 2011 10:48 am

Thank you ;)
'
I'll do my best to get the cover art right, I really like this idea :)

Edit: It turned out that it's not that hard to make one (never worked with XML in PHP before, so I had to learn that first)...

I hope to get a nice result tomorrow (playing with text alignments)... After that I'll take a look at the cover art...

Edit 2:
Image

Edit 3: And now I got the coverart working to :D
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

Postby BrianDelShasta » Sun May 29, 2011 4:28 am

bytethdgroove, would you mind sharing you code with me as well? Have you figured out how to only display now playing information for a specific account?
Thanks
BrianDelShasta
 
Posts: 116
Joined: Tue Jun 03, 2008 4:45 am
Location: USA

Postby SparkyRih » Sun May 29, 2011 9:15 am

BrianDelShasta wrote:bytethdgroove, would you mind sharing you code with me as well? Have you figured out how to only display now playing information for a specific account?
Thanks


My script does that, I only have to solve one bug... I can release my code after that if bytethdgroove is ok with that?

Edit: Bug solved :)

http://marc.schattorie.nl/homepage/en/W ... -signature
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

Postby bytethdgroove » Fri Jun 03, 2011 12:07 am

ofcoarse I dont mind, i didnt start this idea, was only trying to get mine to work...(which as i as i posted earlier is an extension to lucrons original sig..added some more options and styling) and was hoping to get album art added but never got it working
here is the code its a lil sloppy as I was testing things last, if I can add album art that would be great :)

Code: Select all
<?php


//Subsonic Account Information
$user = "xxxxxxxx";
$pass = "xxxxxxxx";

//Path to your Subsonic
$server = "http://xxx.subsonic.org";

//Path to your signature image
$signaturepath = "images/signature1.jpg";

$img = @imagecreatefromjpeg($signaturepath);

//Font settings
$size = 5;
$size2 = 5;
$x = 5; //X Position
$y2 = 0; //Y Position
$y3 = 13;
$y = 86; //Y Position
$x1 = 5; //X Position
$y1 = 100; //Y Position
$color = imagecolorallocate($img,255,255,255);
$yel = imagecolorallocate($img,255,255,0);
$text = "Byte's Subsonic Server";
$text2 = date('D, F d, Y h:i:sa');
$text3 = date('h:i:sa');
$font = 'C:\WINDOWS\Fonts\tf2build.ttf';
$font1 = 'C:\WINDOWS\Fonts\tf2professor.ttf';
$font2 = 'C:\WINDOWS\Fonts\TF2.ttf';
$white = imagecolorallocate($img, 255, 255, 255);
$grey = imagecolorallocate($img, 128, 128, 128);
$black = imagecolorallocate($img, 0, 0, 0);
$red = imagecolorallocate($img, 255, 0, 0);

//Retrieve the XML output from REST
$xmlstr = simplexml_load_file("$server/rest/getNowPlaying.view?u=$user&p=$pass&v=1.3.0&c=forumsig");

//Retrieve Now Playing Information
$artist = $xmlstr->nowPlaying->entry[artist];
$title = $xmlstr->nowPlaying->entry[title];
$album = $xmlstr->nowPlaying->entry[album];
$genre = $xmlstr->nowPlaying->entry[genre];
$year = $xmlstr->nowPlaying->entry[year];
$bitrate = $xmlstr->nowPlaying->entry[bitRate];
$minutesago = $xmlstr->nowPlaying->entry[minutesAgo];
$playername = $xmlstr->nowPlaying->entry[playerName];

//Change header to jpeg, so browsers know that this is an image
header('Content-Type: image/jpeg');

if ($artist && $title) //Check if a song is playing or not, if not, don't write anything!
   {
   imagettftext($img, 18, 0, 170, 73, $white, $font, $text);
   imagettftext($img, 18, 0, 169, 72, $red, $font, $text);
   //imagestring($img, $size2,$x,$y2, "Byte's Subsonic Server",$color1);
   imagettftext($img, 13, 0, 4, 95, $grey, $font2, "$artist - $album - $title");
   imagettftext($img, 13, 0, 3, 94, $white, $font2, "$artist - $album - $title");
   //imagestring($img, $size,$x,$y, "$artist-$album-$title",$color);
   imagettftext($img, 27, 0, 4, 118, $grey, $font1, "$genre - $year ($minutesago min. ago) on $playername");
   imagettftext($img, 27, 0, 3, 117, $white, $font1, "$genre - $year ($minutesago min. ago) on $playername");
   //imagestring($img, $size,$x1,$y1, "$genre - $year ($minutesago min. ago) on $playername",$color);
   //imagestring($img, $size, $x, $y3, date('D, F-d-Y h:i:sa'), $color);
   imagettftext($img, 15, 0, 4, 19, $grey, $font, $text2);
   imagettftext($img, 15, 0, 3, 18, $white, $font, $text2);
   //imagettftext($img, 15, 0, 4, 45, $grey, $font, $text3);
   //imagettftext($img, 15, 0, 3, 44, $yel, $font, $text3);
   }
else
   {
   imagettftext($img, 18, 0, 170, 73, $white, $font, $text);
   imagettftext($img, 18, 0, 169, 72, $red, $font, $text);
   imagettftext($img, 15, 0, 4, 19, $grey, $font, $text2);
   imagettftext($img, 15, 0, 3, 18, $white, $font, $text2);
   imagettftext($img, 20, 0, 4, 118, $grey, $font2, "I'm Currently Not Listening To Anything");
   imagettftext($img, 20, 0, 3, 117, $white, $font2, "I'm Currently Not Listening To Anything");

   //imagestring($img, $size, $x, $y1, "I'm Currently Not Listening To Anything", $color);
   //imagestring($img, $size, $x, $y, date('D, F-d-Y h:i:sa'), $color);
   //imagestring($img, $size, $x, $y2, "Idle for $minutesago minutes", $color1);
   //imagettftext($img, 27, 0, 4, 118, $grey, $font1,  date('D, F-d-Y h:i:sa');
   //imagettftext($img, 27, 0, 3, 117, $white, $font1,  date('D, F-d-Y h:i:sa');
   }

imagejpeg($img, 'C:\Inetpub\wwwroot\sig.jpg', 100);
imagejpeg($img);
imagedestroy($img);

?>


peace
byte
"I'm as honest as the day is long, the longer the daylight the less I do wrong!"
Image
User avatar
bytethdgroove
 
Posts: 59
Joined: Mon Apr 25, 2011 1:02 pm
Location: Chicago

Next

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 6 guests