Forum sig

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

Moderator: moderators

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

also sorry for the late reply, got tied up with work and my computer was in pieces as I was rebuilding...guess i should cut out the video port on my asus home server :P
"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 Jun 03, 2011 8:40 am

I guess my code is a little bit more advanced: http://marc.schattorie.nl/homepage/en/W ... -signature

I will make it user friendly (adding //comments to it), and will try to release it this evening...
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 10:44 am

<-----hardware guy, mild coding experience, alot of python.......yea, im not really a php coder...just have alot of experience hacking up other peoples code....my code is very simple, and for some reason .png didnt work only .php so I had it generate an image on the fly and I called that image as my signature (kinda a loophole) since I didnt know what i was doing.
glad to see this finally get done, and alot cleaner than mine, with instruction ;) kudos to you man...
can't wait to try it out
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 » Sat Jun 04, 2011 11:29 am

I created a new topic, have fun with it :)
http://forum.subsonic.org/forum/viewtopic.php?t=6903
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 » Fri Mar 30, 2012 5:40 pm

Sadly my provider doesn't support curl. (something to do with security)
Any volunteers to host my sig for me please?
Or any free hosts that support the requirements for the sig?
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby SparkyRih » Mon Apr 02, 2012 4:43 pm

dazbobaby wrote:Sadly my provider doesn't support curl. (something to do with security)
Any volunteers to host my sig for me please?
Or any free hosts that support the requirements for the sig?


Built your own server at home like me :) no restrictions at all! ;)
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 Apr 09, 2012 3:14 pm

SparkyRih wrote:
dazbobaby wrote:Sadly my provider doesn't support curl. (something to do with security)
Any volunteers to host my sig for me please?
Or any free hosts that support the requirements for the sig?


Built your own server at home like me :) no restrictions at all! ;)



Sounds like a plan, but how? WAMP?
and how do you see your own sig?
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby dazbobaby » Mon Apr 09, 2012 7:03 pm

got it working locally only, my subsonic address wont resolve properly, then of course there's putting it out on the internet successfuly.
Maybe getting the sig working on a local server and on forums is another topic entirely.
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby dazbobaby » Mon Apr 09, 2012 9:02 pm

testing remote access to the sig:
Yep it works! :D
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby dazbobaby » Thu Apr 12, 2012 9:35 pm

I hate to be a burden, but is it possible to set the code to select a random image?
I now have several images for my sig, and I'd like the code to randomise them....
Life is like a box of chocolates, you never know what you're gonna get.

But there' is a teeny tiny problem with the code, my time is wrong. It's out by one hour -1hour.
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby dazbobaby » Fri Apr 13, 2012 5:37 pm

Done it, here's the new code:

Code: Select all
//If the user is playing a music file...
playing:
$imageList = array("music1.png","music2.png","music3.png","music4.png");
$image = imagecreatefrompng($imageList[rand(1,count($imageList))-1]);
//$image = imagecreatefrompng("itunes_sig.png");
//Get the cover art


I've called the images music1.png - music4.png
I remarked the original line out for safe keeping.
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby SparkyRih » Fri Apr 20, 2012 5:10 pm

Nice job...

The fact that your time is wrong has to do with your server settings.
You can change it by +/- 3600 seconds.
$time = time()+3600;
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 » Fri Apr 20, 2012 8:05 pm

I couldn't find any details on how to setup UTC in Apache, but I did find a way of setting it up in PHP

Code: Select all
//Timestamp
//Different Timezones supported: http://phptutorial.info/?timezones
date_default_timezone_set('Europe/London');
$time = "My local time: ".date("l: M: H:i");


Thanks for the little push in the right direction though.

I've just been thinking about the idle signature, maybe it needs tarting up with IP address and Browser details ;)
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby dazbobaby » Sat Apr 21, 2012 10:49 am

IP Address Added, now to figure out Browser and OS.
Code: Select all
//If user is offline, or the last file has finished playing...
nothing:
$image = imagecreatefrompng("original.png");
$color = imagecolorallocate($image, 255, 255, 255);
$font = getcwd()."/Capture it.ttf";
$fontSize = 14;
//text location
$x = 5;
$y = 25;
$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);
//Time location
imagettftext($image, 14, 0, 5, 195, imagecolorallocate($image, 255, 255, 255), getcwd()."/Capture it.ttf", $time);
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);
imagedestroy($image);
exit();
Image
User avatar
dazbobaby
 
Posts: 68
Joined: Tue Dec 06, 2011 12:29 pm

Re: Forum sig

Postby SparkyRih » Sat Apr 21, 2012 10:54 am

I wanted to put my last tweet in this signature... but since my twitter account is protected it's a little bit harder :P
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

PreviousNext

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 0 guests