Recent Tutorials
Who is online?
In total there are 7 users online :: 2 Registered, 0 Hidden and 5 Guests

djblah, SLGray

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

FMD Shoutbox : Plugins

View previous topic View next topic Go down

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4675
Points : 9689
Reputation : 2331
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 19 Feb 2015, 17:54

This topic will be used to share plugins you've created with other members. If it gets too much to manage, a new forum will be created to share these plugins. Try to be detailed with your plugin when you post it ;

  • What does it do ?
  • Is there anything special that we should know ?


Tutorials


Installing plugins

For ease of use, I've added a "plugins" function to the config. This allows you to insert custom buttons, popups, etc.. into the shoutbox with ease. Simply copy the code you want to install and paste it inside plugins :

avatar
_Twisted_Mods_

Title :
Gender : Male
Age : 31
Posts : 36
Points : 1098
Reputation : 20
Location : USA
Language : code
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://liquidcode.forumotion.com/

Post_Twisted_Mods_ on Thu 19 Feb 2015, 19:15

Upload a image into the shoutbox

ok first goto https://developers.filepicker.io/register/free and crate an account this will be used to upload the images to

after you create an account ..

click create app

name: your choice

Which Filepicker.io file SDK(s) are you planning to use? WEB

skip step 2(the logo upload step)

3rd step will give you a API Key copy it you will need it for the script below

replace
Code:
YOURAPIKEYHERE

with the api key from filepicker



Code:

               $(function(){
                                  var script = document.createElement('script');
        script.id="filepicker";
        script.type="text/javascript";
        script.src="//api.filepicker.io/v1/filepicker.js";
        var body=$('body');
        body.append(script);
         $('.fmd_chat_button:last').after('<div class="fmd_chat_button" id="uploadImage" onclick="getPick();">Share Image</div>');
          getPick = function(){
        var textArea = $('#fmd_chat_message');
        filepicker.setKey('YOURAPIKEYHERE');
        filepicker.pick({
        mimetypes: ['text/*','image/*','video/*'],
        services:['COMPUTER','WEBCAM','VIDEO']
        },function(FPFile) {
        var docFile = FPFile.url;
        var type= FPFile.mimetype;
        var file = FPFile.url+'+'+FPFile.filename.replace(/\s/g,"");
        if(/^.*text.*$/.test(type)) {
        textArea.val(textArea.val()+'[url]'+file+'[/url]');
        } else if(/^.*image.*$/.test(type)) {
        textArea.val(textArea.val()+'[url='+file+'][img]'+file+'[/img][/url]');
        }else {
        textArea.val(textArea.val()+'[flash]'+file+'[/flash]');
        }
        $('#fmd_chat_send').click();
        });
        };
                });


place it in your plugins

save/submit .. and your good to go

--------

avatar
Michael_vx

Title :
Gender : Male
Age : 25
Posts : 301
Points : 1654
Reputation : 75
Language : Arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://miccsoft.net https://www.facebook.com/Michaelvx2008

PostMichael_vx on Fri 20 Feb 2015, 02:26

reflect 
how about if i liked to use a image host service that dose not have API like my host service right now on
http://micsoft.22web.org/
any idea or a trick
and by the way
@_Twisted_Mods_
your idea is cool i might give it a test in a non forumotion site Very Happy
i mean filepicker.io
avatar
_Twisted_Mods_

Title :
Gender : Male
Age : 31
Posts : 36
Points : 1098
Reputation : 20
Location : USA
Language : code
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://liquidcode.forumotion.com/

Post_Twisted_Mods_ on Fri 20 Feb 2015, 04:44

well theirs not many image uploads sites with developer tools so probably not

--------

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum