Page 1 of 1

Coder for a forum signature (extension)

Posted: Sat May 25, 2019 3:04 pm
by Dazbobaby
Title/Job Description: Create an extension that takes plex now playing XML and turn it into a forum signature overlayed onto an image. Preferably PNG for aesthetics and transparancy.

Target audience: (e.g. professionals, hobbyists, students) Anyone who can handle plex webhooks, php and some graphic design, though it's mostly formatting textual overlays onto a predefined image(s).

Reward: (e. g. money, backlinks, fame) Name your price. Be reasonable, I'm not rich :D
If you want to charge a fee, then the code and copyright belong to me. If you want to do this for free, then you are allowed to resell the extension... or give it away, it's up to you. Or something else entirely, I'm quite open about the fee.

Deadline: 1 month? But sooner rather than later.

Preferred contact method: (e.g. PM, e-mail) Email or my forum: https://the-bionic-cyclist.co.uk/forum

Link to the board: https://the-bionic-cyclist.co.uk/forum


Detailed description of the tasks:
Add a webhook url (tutorial here: https://support.plex.tv/articles/115002267687-webhooks/) to my site, and create a formatted text showing various data, things like, show name, movie title, album/song name, show discription and or movie description along with IMDB score, and thumbnail of the cover. Then overlay it on a predefined image image.

The benefit of an image is that you can link to it from anywhere on the internet.

I hacked this together many years ago from other peoples code, it was based on the Subsonic audio streamer. This is just an example.
http://forum.subsonic.org/forum/viewtop ... 873#p44826

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();
Metadata must include
Song name/TV Show name/Movie Name
IMDB Score with a preceding star image :)
star.png
star.png (616 Bytes) Viewed 904 times
Show description or movie description.
Tag line - if there is one
Cover thumbnail
All files must be self hosted.

Finally and most importantly, well documented code, just in case I need to play around with it later.
Example:
example.png
There will be times when the description is too long for the image, so it must be formatted to fit, or a ... to be added at the end.
It must work as an extension, for ease of use, and installabilty.

Options for the extension:
Include artwork
Include/exclude any metadata - So you can add your own metadata from the stream. There is a lot of data in the webhook.
The possibility of users adding their own signature from their own plex library.
Anything else is to be discussed.

Re: Coder for a forum signature (extension)

Posted: Sun May 26, 2019 2:13 am
by 3Di
PM sent.

Re: Coder for a forum signature (extension)

Posted: Wed May 29, 2019 12:08 am
by 3Di
After a constructive discussion with the applicant, we have come to a consensus failure.
So the position remains free unless he decides otherwise.

Thanks. :)