# \[PAID\] Custom Plugin - Insert an Image from User Input via API

**URL:** https://meta.discourse.org/t/paid-custom-plugin-insert-an-image-from-user-input-via-api/160748
**Category:** Marketplace
**Created:** [August 13, 2020, 2:58pm UTC](https://meta.discourse.org/t/paid-custom-plugin-insert-an-image-from-user-input-via-api/160748 "2020-08-13T14:58:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)
#### Post date: [August 13, 2020, 2:58pm UTC](https://meta.discourse.org/t/paid-custom-plugin-insert-an-image-from-user-input-via-api/160748/1 "2020-08-13T14:58:19Z")

</div>

**What would you like done?**

> **Spoiler**
>
> The idea here is to add a button to the composer labeled “Insert Deck”. The user clicks this button and then has an input window where they can copy paste text inside a box. Then the user simply presses “ok” after inserting the text. Here is an example with the new button in composer toolbar:  
> ![image](https://global.discourse-cdn.com/meta/original/3X/8/1/81a81d615cc003d1d9036d2b0a918ff05d666d48.png)  
> ![image](https://global.discourse-cdn.com/meta/original/3X/0/9/094d339adba459664a2026cab0070f8a6127c052.png)  
> After clicking the button:
> 
> ![image](https://global.discourse-cdn.com/meta/original/3X/9/f/9f850fee9c2273d5f02ff4a03b7088bf1a5034f1.png)
> 
> The user input doesn’t matter. It’s just some base64 code which represents the contents of a deck of cards. You url encode that code and pass it through the api. For example, let’s use this code:
> 
> `M+e6LjWfEYbv/L/MAMIXps0AY4kjoiww/PbQdlYYFuz7zgDDKmaXWGB4zsmPjCC8uMSeGYRfys5kheHgpcuZQXj3GXs4XnDhIQscP7oGx/ll7xlguPCSLrM1cx1L/+bXjKuufmK4K/mD4eN1Edbrk1ewTHtayryn/zTT0mXzGafd5WDwf/iGZesHRtZjxsnM7MfjWS02JrNocksxB33vYg4G4o3um8D4YcRcMAa5EeQmkJsB`
> 
> The raw code after being url encoded:  
> `M%2Be6LjWfEYbv%2FL%2FMAMIXps0AY4kjoiww%2FPbQdlYYFuz7zgDDKmaXWGB4zsmPjCC8uMSeGYRfys5kheHgpcuZQXj3GXs4XnDhIQscP7oGx%2Fll7xlguPCSLrM1cx1L%2F%2BbXjKuufmK4K%2FmD4eN1Edbrk1ewTHtayryn%2FzTT0mXzGafd5WDwf%2FiGZesHRtZjxsnM7MfjWS02JrNocksxB33vYg4G4o3um8D4YcRcMAa5EeQmkJsB`
> 
> Then this is passed through the api with the `imageify` parameter if `Image` was selected via `http://51.222.12.115:7000/imageify?list=code` where `code` would be the above url encoded code like this:
> 
> [http://51.222.12.115:7000/imageify?list=M%2Be6LjWfEYbv%2FL%2FMAMIXps0AY4kjoiww%2FPbQdlYYFuz7zgDDKmaXWGB4zsmPjCC8uMSeGYRfys5kheHgpcuZQXj3GXs4XnDhIQscP7oGx%2Fll7xlguPCSLrM1cx1L%2F%2BbXjKuufmK4K%2FmD4eN1Edbrk1ewTHtayryn%2FzTT0mXzGafd5WDwf%2FiGZesHRtZjxsnM7MfjWS02JrNocksxB33vYg4G4o3um8D4YcRcMAa5EeQmkJsB](http://51.222.12.115:7000/imageify?list=M%2Be6LjWfEYbv%2FL%2FMAMIXps0AY4kjoiww%2FPbQdlYYFuz7zgDDKmaXWGB4zsmPjCC8uMSeGYRfys5kheHgpcuZQXj3GXs4XnDhIQscP7oGx%2Fll7xlguPCSLrM1cx1L%2F%2BbXjKuufmK4K%2FmD4eN1Edbrk1ewTHtayryn%2FzTT0mXzGafd5WDwf%2FiGZesHRtZjxsnM7MfjWS02JrNocksxB33vYg4G4o3um8D4YcRcMAa5EeQmkJsB)
> 
> You can open that above link in your browser and it should show an image. That image is basically what should be inserted into the post after pressing ok if Image was selected in the checkbox.
> 
> If `List` is also selected, then you can insert the list below the image. The url encoded code is again passed but this time through the `convert` parameter like this: `http://51.222.12.115:7000/convert?pretty&to=names&list=code` where `code` again is the url encoded code. You will get this now:
> 
> [http://51.222.12.115:7000/convert?pretty&to=names&list=M%2Be6LjWfEYbv%2FL%2FMAMIXps0AY4kjoiww%2FPbQdlYYFuz7zgDDKmaXWGB4zsmPjCC8uMSeGYRfys5kheHgpcuZQXj3GXs4XnDhIQscP7oGx%2Fll7xlguPCSLrM1cx1L%2F%2BbXjKuufmK4K%2FmD4eN1Edbrk1ewTHtayryn%2FzTT0mXzGafd5WDwf%2FiGZesHRtZjxsnM7MfjWS02JrNocksxB33vYg4G4o3um8D4YcRcMAa5EeQmkJsB](http://51.222.12.115:7000/convert?pretty&to=names&list=M%2Be6LjWfEYbv%2FL%2FMAMIXps0AY4kjoiww%2FPbQdlYYFuz7zgDDKmaXWGB4zsmPjCC8uMSeGYRfys5kheHgpcuZQXj3GXs4XnDhIQscP7oGx%2Fll7xlguPCSLrM1cx1L%2F%2BbXjKuufmK4K%2FmD4eN1Edbrk1ewTHtayryn%2FzTT0mXzGafd5WDwf%2FiGZesHRtZjxsnM7MfjWS02JrNocksxB33vYg4G4o3um8D4YcRcMAa5EeQmkJsB)
> 
> If you put the above link in your browser, it will return a json response that looks like this:
> 
> > **Spoiler**
> >
> > `"names": "3 Nibiru, the Primal Being\n2 Exodius the Ultimate Forbidden Lord\n2 The Winged Dragon of Ra - Sphere Mode\n3 Fire Hand\n3 Ice Hand\n3 Thunder Hand\n3 Ghostrick Jiangshi\n2 Nopenguin\n2 Ghostrick Yuki-onna\n3 Penguin Soldier\n2 Ghostrick Jackfrost\n3 Ghostrick Lantern\n3 Ghostrick Specter\n3 Recurring Nightmare\n3 Evenly Matched\n\n1 Ghostrick Angel of Mischief\n1 Ghostrick Alucard\n1 Ghostrick Socuteboss\n1 Mechquipped Angineer\n1 Number 49: Fortune Tune\n1 Super Quantal Mech Beast Grampulse\n1 Wind-Up Zenmaines\n1 Slacker Magician\n1 Ghostrick Dullahan\n1 Kikinagashi Fucho\n1 Daigusto Emeral\n1 Castel, the Skyblaster Musketeer\n1 Number 39: Utopia\n1 Number S39: Utopia the Lightning\n1 Number 35: Ravenous Tarantula\n\n\n1 Ghost Belle & Haunted Mansion\n1 Ghost Mourner & Moonlit Chill\n1 Ghost Ogre & Snow Rabbit\n1 Ghost Ogre & Snow Rabbit\n2 Ghost Reaper & Winter Cherries\n2 Ghost Sister & Spooky Dogwood\n1 Ghostrick Yuki-onna\n1 Ghostrick Jackfrost"`
> 
> The `\n` here are line breaks. So in the composer it should just paste that list like so:
> 
> > 3 Nibiru, the Primal Being  
> > 2 Exodius the Ultimate Forbidden Lord
> 
> The “Paste YDK” is basically a button to copy paste the contents of a text file. YDK is simply a TXT. They click the button-\>they pick a text file from their explorer-\>the contents gets pasted in the window. Just another way of inserting the input instead of copy paste.
> 
> You don’t have to worry about the user input. Even if it’s invalid, the api will return invalid. The composer simply needs to paste whatever the api returns.
> 
> It doesn’t matter to me whether this is achieved via theme component or plugin. Any help you need with regards to sending requests through the api and reading the output, is something we can help with.

**When do you need it done?**

Within 2 weeks from the time you take the job.

**What is your budget, in $ USD that you can offer for this task?**

Negotiable. Please PM me your price. I’ll pick the best offer.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [August 14, 2020, 8:40am UTC](https://meta.discourse.org/t/paid-custom-plugin-insert-an-image-from-user-input-via-api/160748/2 "2020-08-14T08:40:42Z")

</div>

Hello from Pavilion, Thanks for reaching out. I’ll work out an estimate and update you on the PM.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 13, 2020, 8:43am UTC](https://meta.discourse.org/t/paid-custom-plugin-insert-an-image-from-user-input-via-api/160748/3 "2020-09-13T08:43:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
