Our FamilyForum

FamilyForum Documentation & Help => FamilyForum Features & Guidelines => Code & Stuff => Topic started by: Lesmond on September 30, 2017, 02:58:22 PM

Title: tinypix image upload smf mod
Post by: Lesmond on September 30, 2017, 02:58:22 PM
I made this just for friends only, (its not going on the SMF Mod site)
Quote
This will add a simple image upload bbc code to the post.

Author: Lesmond
Type: New Enhancement
Available since: 2017
Latest version: 1.3
Compatible with: SMF  2.0.14


This mod integrates image hosting with SMF. It makes image upload very simple.
All images are hosted on remote image hosting service, not on your forum.
When user uploads image, script creates a thumbnail for image and appends bbcode to post user is typing.
User doesn't need to know anything about bbcode. And this mod is very simple to install.

Powered by TinyPiX (https://tinypix.top)

(https://tinypix.top/images/2017/09/29/jZh.md.png) (https://tinypix.top/image/jZh)

You will get an error with "Install in Other Themes" but just ignore that and go ahead with the install.
You will get a button under the post text box click that and a new window opens, drag or upload a image, you can also use the URL of an image if you wish.

All images are stored on my dedicated server, so no space is taken here.


Let me know if you need any help with this... I will be hiding ;)

package attached

Updated to fix "Install in Other Themes" error

Now includes upload in PM's

Updated to fix image icon in shout... I hope  :o
Title: Re: tinypix image upload smf mod
Post by: Skhilled on September 30, 2017, 03:18:45 PM
Great job, Les! ;)
Title: Re: tinypix image upload smf mod
Post by: Ken on September 30, 2017, 08:29:57 PM
Works great Les!  :thumbup:

(https://tinypix.top/images/2017/10/01/0qH.th.jpg) (https://tinypix.top/image/0qH)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on September 30, 2017, 09:52:09 PM
thanks ken, works better here

(https://tinypix.top/images/2017/10/01/1cr.th.jpg) (https://tinypix.top/image/1cr)
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 01, 2017, 05:44:45 AM
One question, is the sizing in the coding or does it size according to what is set in SMF?
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 07:26:09 AM
You get edit options when you are selecting the image for uploading.




(https://tinypix.top/images/2017/10/01/pFV.th.jpg) (https://tinypix.top/image/pFV)
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 01, 2017, 07:30:31 AM
Oh! I totally missed that little dropdown on the top left with the signin and all! LOL
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 07:35:38 AM
Took me a couple of tries to get it right... maybe Les needs to write a little how-to???  laughing7
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 01, 2017, 07:38:53 AM
I only clicked the button below and added an image I had saved and it worked. Nothing else to do and no need to login although you can and it will be saved to your account.
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 07:41:44 AM
Testing...

The size edit function works. (will only decrease the size)

(https://tinypix.top/images/2017/10/01/7KI.th.jpg) (https://tinypix.top/image/7KI)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 01, 2017, 09:53:44 AM
(https://tinypix.top/images/2017/10/01/ArZ.th.jpg) (https://tinypix.top/image/ArZ)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 01, 2017, 10:06:49 AM
One question, is the sizing in the coding or does it size according to what is set in SMF?
its set in the package, the only way to change the image size it to reinstall the package,
the one I have here was set to thumbnail.

If you want you can use the attachment  below, it will give you an medium image

(https://tinypix.top/images/2017/09/29/slw.md.jpg) (https://tinypix.top/image/slw)
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 11:04:15 AM
Hey Les, can this be coded to work with the PM system? We have the attachments function working with PM's and me thinks that this tiny_pic app would be a nice addition.  :thumbup:
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 01, 2017, 11:21:43 AM
Agreed!
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 01, 2017, 11:25:33 AM
Hey Les, can this be coded to work with the PM system? We have the attachments function working with PM's and me thinks that this tiny_pic app would be a nice addition.  :thumbup:
It took me all my time to make this one, I don't think I could work out how to do that, but worth looking into
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 12:32:48 PM
Good deal, thanks for checking. :)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 01, 2017, 01:59:21 PM
Updated to fix "Install in Other Themes" error....  See first post (https://www.ourfamilyforum.org/FamilyForum/index.php?topic=4346.0)
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 02:16:23 PM
Updated to fix "Install in Other Themes" error....  See first post (https://www.ourfamilyforum.org/FamilyForum/index.php?topic=4346.0)

This version installed cleanly with no errors.   :thumbup:
Title: Re: tinypix image upload smf mod
Post by: Ken on October 01, 2017, 02:23:18 PM
testing...

(https://tinypix.top/images/2017/10/01/6zT.md.jpg) (https://tinypix.top/image/6zT)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 01, 2017, 06:23:50 PM
OK found how to add the image upload to PM's but the package won't add the code, it say Test successful, but the code is not added to the files in index.template.php

If you want to add it manually for now you can, until I find how to fix it....

in /Themes/default/index.template.php
Code: (find) [Select]
// Here comes the JavaScript bits!
echo '

Code: (add after) [Select]
<script async src="//tinypix.top/sdk/pup.js" data-url="https://tinypix.top/upload"></script>
this can be added to all themes if needed.

I have added the mod below if anyone knows how to fix it :o :-\

Now fixed to include uploads on PM's with the help of Steve :thumbup:
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 02, 2017, 11:37:21 AM
Glad to help! :)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 04, 2017, 11:49:29 AM
The position of the button has been move in the reply section next to the (https://www.ourfamilyforum.org/FamilyForum/Themes/workdesk3_smf202/images/bbc/img.gif) button

(https://tinypix.top/images/2017/10/04/od4.png)
Title: Re: tinypix image upload smf mod
Post by: Ken on October 04, 2017, 03:24:53 PM
So, should the current package be uninstalled and This Version (https://www.ourfamilyforum.org/FamilyForum/index.php?topic=4346.msg17562#msg17562) be installed for the PM fix???
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 04, 2017, 03:48:07 PM
So, should the current package be uninstalled and This Version (https://www.ourfamilyforum.org/FamilyForum/index.php?topic=4346.msg17562#msg17562) be installed for the PM fix???
Yes uninstall the old one and delete the package.
Title: Re: tinypix image upload smf mod
Post by: Ken on October 05, 2017, 07:55:12 AM
Works good Les!  :thumbup:

(https://tinypix.top/images/2017/10/05/UGz.jpg) (https://tinypix.top/image/UGz)
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 05, 2017, 08:06:41 AM
I see that if you click the little X in the top left of the photo it will take you to the image hosting. And also add to the TP shoutbox.
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 05, 2017, 08:12:15 AM
I see that if you click the little X in the top left of the photo it will take you to the image hosting. And also add to the TP shoutbox.

The little X is already in the photo ;) I dont see the icon in the shoutbox though!
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 05, 2017, 08:17:06 AM
Yes, the last version did not have the X.

It seems that you must be on the main forum page to see the "Upload images" BBC icon. Can't see it when viewing a topic.
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 05, 2017, 08:34:18 AM
the mod adds the upload image to anything that has a text box, no way for me to change that :(
 and the X in the picture was already there, it was from Kens phone that added the X to the top left... if you click anywhere on the picture it will take you to the image hosting :)

(https://tinypix.top/images/2017/10/05/UGz.jpg) (https://tinypix.top/image/UGz)
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 05, 2017, 08:36:03 AM
Oh, LOL, ok.

Sometimes the image is large and sometimes it's small...in the SB. Right after you make a post and look over there it's large but on the forum page it's smaller. But if you are just reading a post or making one it's smaller.
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 05, 2017, 08:56:55 AM
(https://tinypix.top/images/2017/10/04/gf3.gif)
Title: Re: tinypix image upload smf mod
Post by: Ken on October 05, 2017, 11:30:24 AM
I see that if you click the little X in the top left of the photo it will take you to the image hosting. And also add to the TP shoutbox.

The little X is already in the photo ;) I dont see the icon in the shoutbox though!

Me not seeing the shoutbox icon either.
Title: Re: tinypix image upload smf mod
Post by: Ken on October 05, 2017, 11:40:13 AM
Whoops!!!  :coolsmiley:

Seeing it now, like Steve mentioned.

(https://tinypix.top/images/2017/10/05/nXA.md.jpg) (https://tinypix.top/image/nXA)


Also...
It's double posting the image link:
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 05, 2017, 12:11:32 PM
Updated first post with new package, hopefully it will fix the shoutbox issue..

As always remove the old one first :)
Title: Re: tinypix image upload smf mod
Post by: Ken on October 05, 2017, 12:59:49 PM
Updated first post with new package, hopefully it will fix the shoutbox issue..

As always remove the old one first :)

Done... works great!  :thumbup:

(https://tinypix.top/images/2017/10/05/36O.md.jpg) (https://tinypix.top/image/36O)
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 05, 2017, 01:03:10 PM
Quote from: Ken
Also...
It's double posting the image link:

I haven't seen that happen yet :-\

Has the large icon come back under the SB again?
let me know if it does please
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 05, 2017, 01:04:06 PM
(https://tinypix.top/images/2017/10/05/C8o.md.jpg) (https://tinypix.top/image/C8o)
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 06, 2017, 07:02:20 AM
Testing...

Nope, showing as the small long one.  :coolsmiley:
Title: Re: tinypix image upload smf mod
Post by: Ken on October 06, 2017, 05:09:34 PM
For me it only shows when the post window/box is open... and sometimes not at all.
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 06, 2017, 05:22:40 PM
Post window/box? I do know I can't see it if I'm viewing a new post...or any topic but does show right after I post in a topic or am viewing the form page.
Title: Re: tinypix image upload smf mod
Post by: Ken on October 06, 2017, 05:36:09 PM
It seems to be doing the same for me, just didn't see it before.
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 06, 2017, 05:44:35 PM
I think there may also be a caching issue cause sometimes it shows after a refresh.
Title: Re: tinypix image upload smf mod
Post by: Lesmond on October 07, 2017, 06:23:48 AM
I think some of this is an issue with the guy that make the code, not the actual package I made, I will have to post the findings there and see if he comes up with an answer 
Title: Re: tinypix image upload smf mod
Post by: Skhilled on October 07, 2017, 08:14:25 AM
Yes, I think the caching issue is that. He may have to add code so it shows up on all pages that show the portal instead of just the forum page. This may mean separate code for TP or any portal.
Title: Re: tinypix image upload smf mod
Post by: Lesmond on November 05, 2017, 01:26:40 PM
Forgot to mention, if mick wants to use my mod he is more than welcome
Title: Re: tinypix image upload smf mod
Post by: Ken on November 05, 2017, 02:16:40 PM
Forgot to mention, if mick wants to use my mod he is more than welcome

 :thumbup:
Title: Re: tinypix image upload smf mod
Post by: Lesmond on November 12, 2017, 10:15:18 AM
Ken I have added a category just for Our FamilyForum, just chose that when uploading from here. :azn:

(https://tinypix.top/images/2017/11/12/ATmN.png) (https://tinypix.top/i/ATmN)
Title: Re: tinypix image upload smf mod
Post by: Skhilled on November 12, 2017, 10:49:31 AM
Cool!
Title: Re: tinypix image upload smf mod
Post by: Ken on November 12, 2017, 11:58:22 AM
Cool beans!!!  :hah!:

Lets try this:
... it took several attempts before the image link would show up in my post form.
(https://tinypix.top/images/2017/11/12/AUEq.md.jpg) (https://tinypix.top/i/AUEq)
Title: Re: tinypix image upload smf mod
Post by: Mick on November 12, 2017, 12:50:07 PM
Meant to come back and reply to this, always late on parade.   :-[

Nice mod Les, seems to work well.

I had already mentioned to Les about me making use of this mod, and would consider doing such if my own workflow ceased to work, at the moment I host my own images for the sites I run.

I have downloaded in case of such an event.  Thanks.  :thumbup:
Title: Re: tinypix image upload smf mod
Post by: Lesmond on November 12, 2017, 02:12:43 PM
Cool beans!!!  :hah!:

Lets try this:
... it took several attempts before the image link would show up in my post form.
To get it to go to your post form album, you need to be logged in to tinypix
Title: Re: tinypix image upload smf mod
Post by: Ken on November 12, 2017, 04:08:23 PM
Cool beans!!!  :hah!:

Lets try this:
... it took several attempts before the image link would show up in my post form.
To get it to go to your post form album, you need to be logged in to tinypix

OK, I'll make sure of that from now on.  :thumbup: