Advanced nowplaying forum signature

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

Moderator: moderators

Re: Advanced nowplaying forum signature

Postby gurutech » Tue May 08, 2012 8:17 pm

Downloaded the code, and replaced the first line with the 3 lines you now have to get the user name, and that will work fine.

Started messing with the code a little, to replace lines as follows:

Replaced:
Code: Select all
$image = imagecreatefrompng("back2.png");

with the line
Code: Select all
$image = imagecreatefrompng(.$user.".png");

But I'm not sure if I have the syntax correct. Also tried it without the . before and after the $user value. I'm just getting a white screen now.

I did replace the line in .htaccess file also, so now it reads to rewrite (.*).png to signature.php

Any hints as to what I'm doing wrong?

Thanks!
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Advanced nowplaying forum signature

Postby SparkyRih » Tue May 08, 2012 9:00 pm

Replacing $user = ""; with the lines $geturi, $getfile and $user = ... is correct.... don't mess with those values...

But your imagecreate string is wrong:

Code: Select all
$uimg = $user.".png";
$image = imagecreatefrompng($uimg);


That would be the method that I prefer...
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: Advanced nowplaying forum signature

Postby gurutech » Tue May 08, 2012 9:54 pm

Makes sense! And I'm guessing I can use any font I want, as long as the .ttf file exists in the signatures folder?

Once I have that, I only need to be able to view the cover art. Where can I find out where that is being positioned, $x and $y? I can't seem to locate that bit in the script. I'm guessing it's just being generated outside of my 500x100 dimensions, so it's not showing up!

(nevermind, found the coordinates for the cover art, and adjusted it...)

Thanks!
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Advanced nowplaying forum signature

Postby SparkyRih » Tue May 08, 2012 10:11 pm

Code: Select all
imagecopy($image, $image2, xposition, yposition, 0, 0, width, height);


The two 0 have are source positions, just leave the mat 0...
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: Advanced nowplaying forum signature

Postby gurutech » Tue May 08, 2012 10:27 pm

Hmmm... mind if I PM you my code? Seems to not be showing that I'm not listening to anything. Even after I stop playing, and even logging out, it still shows that I'm listening to the last song I listened to...

The only things I have changed are the $uimg bit, and the coordinates for the text and cover art....


Hell, nevermind - again! For some reason it worked this time around, after pulling up another image name, then going back to this one....

Could the "not playing anything" image be generated after the song "would have ended", instead of when it did end due to me pausing the playlist or logging out?
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Advanced nowplaying forum signature

Postby SparkyRih » Tue May 08, 2012 10:42 pm

The signatures goes to "nothing" after "the length of the song is expired"... if you look in the code you'll find a $maths variable for that...

If the image doesn't update properly, check your caches...

Edit: Dude check it out! XD
Image
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: Advanced nowplaying forum signature

Postby gurutech » Wed May 09, 2012 2:43 am

Looks like you have a bug in your code... lol
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Advanced nowplaying forum signature

Postby SparkyRih » Wed May 09, 2012 9:26 am

gurutech wrote:Looks like you have a bug in your code... lol


Haha, I should've made the picture with the code in the background XD

But is everything working out now?
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: Advanced nowplaying forum signature

Postby gurutech » Wed May 09, 2012 12:23 pm

Yep, everything's working great! Now if only I can figure out how to allow each user to customize the font, color, and position of the text... lol
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Advanced nowplaying forum signature

Postby SparkyRih » Mon May 14, 2012 5:00 pm

Now also available as plugin for the subsonic registration engine.
Image

(See first page for download and real time demo)
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: Advanced nowplaying forum signature

Postby dazbobaby » Fri May 25, 2012 11:16 am

It's nice work Sparky, if a little complicated.
Sorry I didn't get back to you sooner, I've been playing DayZ Arma 2 mod
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Advanced nowplaying forum signature

Postby SparkyRih » Fri May 25, 2012 12:46 pm

dazbobaby wrote:It's nice work Sparky, if a little complicated.
Sorry I didn't get back to you sooner, I've been playing DayZ Arma 2 mod


I guess the ultimate feature would be to make this plugin available on my server, to create your own signature in this way, and if you're finished, you can just download a zip which contains the files for your personal signature...

But that's something for later, I have to focus on some other projects currently...
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: Advanced nowplaying forum signature

Postby gurutech » Sat Dec 15, 2012 11:42 pm

Not sure if there's a new thread for this, so I'm using the existing one...

Seem to be having some problems updating my sig file. It still shows the "Not listening to anything" image, even though I am listening to music (even now as I type this.) It looks like it's not detecting that anything is playing.

I'm currently running MadSonic 4.8 beta 2. As far as I can remember, it was working with 4.8 beta 1 and previous versions (4.7).

Does anyone know if there was enough code change that this wouldn't work any longer?

Edit: Seems to be a user account issue. I tested my "guest" account, and it worked as it should. Ended up deleting my main (non-admin) account, and recreating it, and it works now. I should have backed up the playlists I created with that account first though... lol
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Advanced nowplaying forum signature

Postby dazbobaby » Sun Jan 13, 2013 1:59 pm

I'd noticed that little problem a while ago, for some reason it doesn't get the info from the correct user. A deletion of users and re-creation works fine.
I would have posted but I didn't get an email notification.
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Advanced nowplaying forum signature

Postby gurutech » Mon Jan 14, 2013 12:25 am

dazbobaby wrote:I'd noticed that little problem a while ago, for some reason it doesn't get the info from the correct user. A deletion of users and re-creation works fine.
I would have posted but I didn't get an email notification.


Yeah, I figured that out after posting... And it's through deleting/recreating the user in Subsonic, not in the MySQL database...
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

PreviousNext

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 0 guests