كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

2 مشترك

اذهب الى الأسفل

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Empty كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

مُساهمة من طرف العراقي الطائي 2/12/2021, 02:28

سلام عليكم للاسف مسحت كودين في منتداي ومو عارف الاقيهم
كودين جافه يشغلون هده الصوره
تعمل بحث وتطلع صور كثيره تختار منها
https://i.servimg.com/u/f37/18/91/01/54/tm/captur11.gif
على الاقل اريد اعرف هاي الصوره شيسموها
العراقي الطائي
العراقي الطائي
 
 

ذكر
عدد المساهمات : 1194
معدل النشاط : 3809
السُمعة : 10

https://asdd.ahladalil.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Empty رد: كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

مُساهمة من طرف العراقي الطائي 2/12/2021, 02:54

لقيتهم والحمد لله بطريق الصدفه عند بحثي على قوقال منتدى واحد يملكهم بس
وهدول الكودين اللي يريد يستفاد منهم وكي يبقوا بمنتدى الدعم للحفض على الاقل بموضوع
كود جافا عدد اثنين تنشرهم على جميع الصفحات وسجل
الاول
الكود:
// Demo: https://jsfiddle.net/baivong/a4z0hz63/embedded/result,html,js/
       
        jQuery(function() {
          'use strict';
       
          // Giphy image in post
          var $giphyImg = $('.postbody, .post-entry').find('img[src*=".giphy.com/media/"][src$="giphy.gif"]');
       
          if (!$giphyImg.length) return;
       
          // Add style to player like Facebook
          $('head').append($('<style/>', {
            text: '.gifactif_icon_bg,.gifactif_icon_load,.gifactif_icon_text{background-image:url(//i.imgur.com/VvrpCQJ.png);background-repeat:no-repeat;background-size:auto;left:50%;top:50%;cursor:pointer}.gifactif_wrap{position:relative;display:inline-block}.gifactif_icon_bg{background-position:0 0;height:72px;margin-left:-36px;margin-top:-36px;position:absolute;width:72px}.gifactif_icon_load{background-position:0 -73px;height:66px;margin-left:-33px;margin-top:-33px;position:absolute;width:66px}.rotate-spinner{-webkit-animation:rotateSpinner 2.5s linear infinite;animation:rotateSpinner 2.5s linear infinite}.gifactif_icon_text{background-position:0 -140px;height:17px;margin-left:-16px;margin-top:-9px;position:absolute;width:32px}.gifactif_external{display:block;background:url(//i.imgur.com/1yqUihp.png) repeat-x;bottom:0;color:#fff;font-size:11px;-webkit-font-smoothing:antialiased;font-weight:700;height:56px;left:0;position:absolute;right:0;text-align:left;text-shadow:0 1px 4px rgba(0,0,0,.4);text-transform:uppercase;white-space:nowrap}.gifactif_external_text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:9px;left:11px;max-width:400px;position:absolute;vertical-align:top;color:#fff}.gifactif_external_icon{width:24px;height:24px;background-image:url(//i.imgur.com/VvrpCQJ.png);background-size:auto;background-repeat:no-repeat;display:inline-block;background-position:0 -158px;bottom:9px;position:absolute;right:10px}.gifactif_player,.gifactif_poster{max-width:100%}.gifactif_cover{display:block}.gifactif_player,.gifactif_video .gifactif_cover{display:none}.gifactif_video .gifactif_player{display:block}@-webkit-keyframes rotateSpinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotateSpinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'
          }));
       
          // Replace GIF image to player like Facebook
          $giphyImg.replaceWith(function() {
            var imgUrl = this.src,
              pre = imgUrl.replace(/\.gif$/, '');
       
            return '<div class="gifactif_wrap" data-pre="' + pre + '" data-id="' + pre.match(/\/media\/([^\/]+)\/giphy/)[1] + '"><img class="gifactif_cover gifactif_poster" src="' + pre + '_s.gif" alt=""><div class="gifactif_cover gifactif_icon"><div class="gifactif_icon_bg"></div><div class="gifactif_icon_load"></div><div class="gifactif_icon_text"></div></div><a class="gifactif_cover gifactif_external" href="' + pre + '_s.gif" target="_blank"><div class="gifactif_external_text">giphy.com</div><i class="gifactif_external_icon"></i></a></div>';
          });
       
          // Click on player
          $('.gifactif_wrap').on('click', function(e) {
            var $this = $(this),
              $cover = $this.find('.gifactif_cover'),
              $video = $this.find('.gifactif_player'),
              $poster = $this.find('.gifactif_poster'),
              $loader = $this.find('.gifactif_icon_load'),
              pre = $this.data('pre');
       
            // Skip external url
            if (e.target.className === 'gifactif_cover gifactif_external') return;
       
            if (e.target.tagName !== 'VIDEO') {
              if (!$video.length) {
       
                // Generate video player
                $video = $('<video/>', {
                  class: 'gifactif_player',
                  poster: pre + '_s.gif',
                  loop: 'loop',
                  muted: 'muted',
                  width: $poster.width(),
                  height: $poster.height(),
                  html: '<source src="' + pre + '.mp4" type="video/mp4"><source src="' + pre + '.webm" type="video/webm">Your browser does not support HTML5 video.'
                });
                $this.append($video);
       
                // Loading effect
                $loader.addClass('rotate-spinner');
       
                $video.on('canplay canplaythrough', function() {
                  $loader.removeClass('rotate-spinner'); // Disable loading effect
       
                  $this.addClass('gifactif_video'); // Hide image, show video
                  $video.trigger('play');
                });
       
                $video.on('click', function() {
                  $this.removeClass('gifactif_video'); // Show image, hide video
                  $video.trigger('pause');
                });
       
                // Get real source url
                $.get('http://api.giphy.com/v1/gifs/' + $this.data('id') + '?api_key=' + (window.gifactif ? window.gifactif.key : 'dc6zaTOxFJmzC')).done(function(res) {
                  if (res.meta.status !== 200) return;
       
                  $this.find('.gifactif_external').attr('href', (res.data.source_post_url || res.data.url));
                  $this.find('.gifactif_external_text').text(res.data.source_tld || 'giphy.com');
                });
       
              } else {
                $this.addClass('gifactif_video');
              }
       
              $video.get(0).currentTime = 0; // Play video from the start
              $video.trigger('play');
            }
          });
       
        });


الثاني

الكود:
(function() {
          'GIFACTIF - GIPHY PLUGIN FOR THE FORUMACTIF SCEDITOR';
          'REPOSITORY : https://github.com/SethClydesdale/gifactif';
          'SEARCH API BY : https://github.com/Giphy/GiphyAPI';
       
       
          // return if gifactif has been initialized
          if (window.gifactif) {
            if (window.console && console.warn) {
              console.warn('gifactif has already been initialized');
            }
            return;
          }
       
       
          // setup global object
          window.gifactif = {
            key : 'dc6zaTOxFJmzC', // PUBLIC BETA KEY
            limit : 26, // max image results
            delay : 200, // delay before searches commence (200ms)
            auto_close : true,
       
            // general language settings
            lang : {
              searching : 'بحث ...',
              not_found : 'لا يوجد نتائج.. <img src="https://2img.net/i/fa/i/smiles/icon_sad.gif" style="margin:0;vertical-align:middle;"/>'
            },
       
            // dropdown markup
            dropDown : $(
              '<div>'+
                '<input type="text" id="gifactif_search" placeholder="بحث عن صورة GIF..." style="width:90%;"/>'+
                '<div id="gifactif_results" onscroll="gifactif.scrolling(this);"><div id="gifactif_images"></div></div>'+
                '<div id="giphy_attribution_mark"></div>'+
              '</div>'
            )[0],
       
       
            // initial setup of the SCEditor command
            init : function () {
              if ($.sceditor && window.toolbar) {
       
                // set the gifactif command
                $.sceditor.command.set('gifactif', {
       
                  tooltip : 'بحث عن صورة GIF',
       
                  // Dropdown and general functionality for gifactif
                  dropDown : function (editor, caller, callback) {
                    gifactif.reset();
                    gifactif.editor = editor;
                    gifactif.callback = callback;
                    editor.createDropDown(caller, 'gifactif', gifactif.dropDown);
       
                    $('#gifactif_search', gifactif.dropDown)[0].focus(); // focus the search area
                  },
       
       
                  // WYSIWYG MODE
                  exec : function(caller) {
                    var editor = this;
       
                    $.sceditor.command.get('gifactif').dropDown(editor, caller, function(gif) {
                      editor.insert('[img]' + gif + '[/img]');
                    });
                  },
       
       
                  // SOURCE MODE
                  txtExec : function(caller) {
                    var editor = this;
       
                    $.sceditor.command.get('gifactif').dropDown(editor, caller, function(gif) {
                      editor.insertText('[img]' + gif + '[/img]');
                    });
                  }
       
                });
       
       
                // add gifactif to the editor toolbar
                toolbar = toolbar.replace('image,', 'image,gifactif,');
       
                // add CSS for button image and dropdown
                $('head').append(
                  '<style type="text/css">'+
                    '.sceditor-button-gifactif div { background-image:url(https://i.servimg.com/u/f35/18/21/60/73/giphy10.png) !important; }'+
                    '.sceditor-button-gifactif:after, .sceditor-button-gifactif:before { content:""; }'+ // Forumactif Edge override
                    '#gifactif_results { width:300px; margin:10px auto; min-height:30px; max-height:300px; overflow-x:hidden; overflow-y:auto; }'+
                    '.gifactif_imagelist { line-height:0; column-count:2; column-gap:3px; }'+
                    '.gifactif_imagelist img { margin-bottom:3px; cursor:pointer; width:100%; }'+
                    'html #giphy_attribution_mark { background:url(https://i.servimg.com/u/f35/18/21/60/73/powere11.png) no-repeat 50% 50% transparent !important; height:22px !important; width:100%; !important; min-width:200px !important; display:block !important; visibility:visible !important; opacity:1 !important; }'+
                  '</style>'
                );
              }
       
            },
       
       
            // search for a GIPHY gif
            search : function (query) {
              if (gifactif.timeout) {
                gifactif.abort(); // abort ongoing searches and requests
              }
       
              if (query) {
       
                // set a small timeout in case the user is still typing
                gifactif.timeout = window.setTimeout(function() {
                  gifactif.reset(true, gifactif.lang.searching);
                  gifactif.query = encodeURIComponent(query);
       
                  gifactif.request = $.get('http://api.giphy.com/v1/gifs/search?q=' + gifactif.query + '&limit=' + gifactif.limit + '&rating=pg-13&api_key=' + gifactif.key, function(data) {
                    // update global data such as page offsets for scrolling
                    gifactif.request = null;
                    gifactif.offset = data.pagination.offset + gifactif.limit;
                    gifactif.offset_total = data.pagination.total_count;
       
                    gifactif.reset(true); // reset HTML content
                    gifactif.addGIF(data); // send data to be parsed
                  });
       
                }, gifactif.delay);
       
              } else {
                gifactif.reset(true);
              }
            },
       
       
            // abort ongoing searches and requests
            abort : function () {
              if (gifactif.timeout) {
                window.clearInterval(gifactif.timeout);
                gifactif.timeout = null;
              }
       
              if (gifactif.request) {
                gifactif.request.abort();
                gifactif.request = null;
              }
            },
       
       
            // add gifs to the result list
            addGIF : function (data, loadMore) {
              // setup data and begin parsing results
              var gif = data.data,
                  i = 0,
                  j = gif.length,
                  list = $('<div class="gifactif_imagelist" />')[0];
       
              if (j) {
                for (; i < j; i++) {
                  list.appendChild($('<img id="' + gif[i].id + '" src="' + gif[i].images.fixed_width.url + '" />').click(gifactif.insert)[0]);
                }
              } else if (!loadMore) {
                gifactif.reset(true, gifactif.lang.not_found);
              }
       
              // add results to the result list
              $('#gifactif_results', gifactif.dropDown).append(list);
            },
       
       
            // listen to the scrolling so we can add more gifs when the user reaches the bottom
            scrolling : function (that) {
              if (that.scrollHeight - that.scrollTop === that.clientHeight) {
                gifactif.loadMore();
              }
            },
       
       
            // load more results once the user has scrolled through the last results
            loadMore : function () {
              if (gifactif.offset < gifactif.offset_total) {
                gifactif.request = $.get('http://api.giphy.com/v1/gifs/search?q=' + gifactif.query + '&offset=' + gifactif.offset + '&limit=' + gifactif.limit + '&rating=pg-13&api_key=' + gifactif.key, function(data) {
                  gifactif.request = null;
                  gifactif.offset = data.pagination.offset + gifactif.limit;
                  gifactif.offset_total = data.pagination.total_count;
       
                  gifactif.addGIF(data, true); // send data to be parsed
                });
              }
            },
       
       
            // inserts the gif into the editor
            insert : function () {
              // add the gif to the editor and close the dropdown
              gifactif.callback('http://media0.giphy.com/media/' + this.id + '/giphy.gif');
       
              if (gifactif.auto_close) {
                gifactif.editor.closeDropDown(true);
                gifactif.reset();
              }
            },
       
       
            // reset the dropdown fields
            reset : function (resultsOnly, newContent) {
              $('#gifactif_results', gifactif.dropDown).html(newContent ? newContent : '');
       
              if (!resultsOnly) {
                $('#gifactif_search', gifactif.dropDown).val('');
              }
            }
          };
       
       
          // bind keyup event to search input
          $('#gifactif_search', gifactif.dropDown)[0].onkeyup = function(e) {
            var k = e.keyCode;
       
            // ignore specific key inputs to prevent unnecessary requests
            if (k && (k == 16 || k == 17 || k == 18 || k == 20 || k == 37 || k == 38 || k == 39 || k == 40)) {
              return;
            } else {
              gifactif.search(this.value);
            }
          };
       
          // initilize gifactif
          $(gifactif.init);
        }());
العراقي الطائي
العراقي الطائي
 
 

ذكر
عدد المساهمات : 1194
معدل النشاط : 3809
السُمعة : 10

https://asdd.ahladalil.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Empty رد: كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

مُساهمة من طرف العراقي الطائي 2/12/2021, 02:55

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Captur11
العراقي الطائي
العراقي الطائي
 
 

ذكر
عدد المساهمات : 1194
معدل النشاط : 3809
السُمعة : 10

https://asdd.ahladalil.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Empty رد: كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

مُساهمة من طرف كونان2000 2/12/2021, 03:04

مرحبا اخي  @العراقي الطائي
هل تريد التعديل ام تريد نشرهم في قسم التقنيات المتقدمة

اذا تريد وضعم في قسم التقنيات
لا تنشرهم على العام  قانون0
بل لازم اول ترسلهم في قسم المعاينة  هنا
ولا تنسى وضع صوره لمعاينة الخاصيه
+
ذكر النسخه اللتي يعمل عليها الكود
والنسخ التي لا يعمل الكود عليها

بعدها انتظر موافقة الادارة على نشره

مع التحية
كونان2000
كونان2000
اشراف عام المساعدة
اشراف عام المساعدة

ذكر
عدد المساهمات : 1260
معدل النشاط : 2701
السُمعة : 194

https://anime.forumperso.com/

العراقي الطائي يعجبه هذا الموضوع

الرجوع الى أعلى الصفحة اذهب الى الأسفل

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Empty رد: كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

مُساهمة من طرف العراقي الطائي 2/12/2021, 03:05

شكرا كونان
العراقي الطائي
العراقي الطائي
 
 

ذكر
عدد المساهمات : 1194
معدل النشاط : 3809
السُمعة : 10

https://asdd.ahladalil.com/

كونان2000 يعجبه هذا الموضوع

الرجوع الى أعلى الصفحة اذهب الى الأسفل

كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي Empty رد: كان كودين جافه لتشغيل الصور المبوبه للصندوق الماسي

مُساهمة من طرف كونان2000 2/12/2021, 03:07

كونان2000
كونان2000
اشراف عام المساعدة
اشراف عام المساعدة

ذكر
عدد المساهمات : 1260
معدل النشاط : 2701
السُمعة : 194

https://anime.forumperso.com/

العراقي الطائي يعجبه هذا الموضوع

الرجوع الى أعلى الصفحة اذهب الى الأسفل

الرجوع الى أعلى الصفحة

- مواضيع مماثلة

 
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى