From a0ffba0351af0f385c48d99f96ae8de3db5efe77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=81Z=C3=81R=20Imre=20AI=20Agent?= Date: Thu, 16 Jul 2026 11:24:49 +0200 Subject: [PATCH] feat(deployed): add mod_ut_joomstagram 1.2.0 (no-source, vetted live) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UT Joomstagram module (Unitemplates.com); registration-gated vendor -> deployed files. Signed-off-by: LÁZÁR Imre Assisted-by: claude-code@claude-opus-4-8 --- .../assets/css/joomstagram.css | 19 ++ .../assets/js/spectragram.js | 199 ++++++++++++++++++ .../assets/js/spectragram.min.js | 1 + .../modules/mod_ut_joomstagram/index.html | 1 + .../en-GB/en-GB.mod_ut_joomstagram.ini | 31 +++ .../en-GB/en-GB.mod_ut_joomstagram.sys.ini | 3 + .../es-ES/es-Es.mod_ut_joomstagram.ini | 31 +++ .../es-ES/es-Es.mod_ut_joomstagram.sys.ini | 3 + .../mod_ut_joomstagram/mod_ut_joomstagram.php | 17 ++ .../mod_ut_joomstagram/mod_ut_joomstagram.xml | 65 ++++++ .../mod_ut_joomstagram/tmpl/default.php | 71 +++++++ 11 files changed, 441 insertions(+) create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/css/joomstagram.css create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.js create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.min.js create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/index.html create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.ini create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.sys.ini create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.ini create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.sys.ini create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.php create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.xml create mode 100644 deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/tmpl/default.php diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/css/joomstagram.css b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/css/joomstagram.css new file mode 100644 index 00000000..e3aa5799 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/css/joomstagram.css @@ -0,0 +1,19 @@ +/** +* info@unitemplates.com +* http://www.unitemplates.com +* Copyright (C) 2014 - 2015 Unitemplates. All rights reserved. +* GNU General Public License version 2 or later. +*/ + +/*-------------------------------------- +Class for UT Joomstagram +--------------------------------------*/ +.ut-joomstagram{} +.ut-joomstagram .jg-intro{margin: 0 0 20px;} +.ut-joomstagram .jg-intro p{} +.ut-joomstagram .jg-photo-ct{} +.ut-joomstagram .jg-photo-ct ul{padding: 0;} +.ut-joomstagram .jg-photo-ct ul li{display: inline-block;float: left;border:none;} +.ut-joomstagram .jg-photo-ct ul li a{padding: 0;} +.ut-joomstagram .jg-photo-ct ul li a:before{display: none;padding: 0;} +.ut-joomstagram .jg-photo-ct ul li a img{width: 100%;} \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.js b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.js new file mode 100644 index 00000000..25e89cd9 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.js @@ -0,0 +1,199 @@ +/*! + * Spectragram by Adrian Quevedo (http://adrianquevedo.com/) + * http://spectragram.js.org/ + * + * Licensed under the MIT license. + * You are free to use this plugin in commercial projects as long as the copyright header is left intact. + * + * This plugin uses the Instagram(tm) API and is not endorsed or certified by Instagram, Inc. + * All Instagram(tm) logos and trademarks displayed on this plugin are property of Instagram, Inc. + * + */ + +// Utility for older browsers +if ( typeof Object.create !== "function" ) { + Object.create = function ( obj ) { + function F () {} + F.prototype = obj; + return new F(); + }; +} + +( function ( $, window, document, undefined ) { + + var Instagram = { + + API_URL: "https://api.instagram.com/v1", + + // Initialize function + initialize: function ( options, elem ) { + this.elem = elem; + this.$elem = $( elem ); + this.accessToken = $.fn.spectragram.accessData.accessToken, + this.options = $.extend( {}, $.fn.spectragram.options, options ); + this.endpoints = this.setEndpoints(); + + this.messages = { + defaultImageAltText: "Instagram Photo related with " + this.options.query, + notFound: "This user account is private or doesn't have any photos." + }; + }, + + // Set Endpoints + // Returns an object of endpoints to use on the app + setEndpoints: function () { + return { + usersSelf: "/users/self/?access_token=" + this.accessToken, + usersMediaRecent: "/users/self/media/recent/?&count=" + this.options.max + "&access_token=" + this.accessToken, + tagsMediaRecent: "/tags/" + this.options.query + "/media/recent?&count=" + this.options.max + "&access_token=" + this.accessToken + } + }, + + // Get Photos + // Call the fetch function and work with the response + getPhotos: function ( endpoint ) { + var self = this; + + self.fetch( endpoint ).done( function ( results ) { + var status = self.options.query || 'User'; + + if ( results.data.length ) { + self.display( results ); + } else { + $.error( "Spectragram.js - Error: " + status + " does not have photos." ); + } + } ); + }, + + // Users + // Get the most recent media published by the owner of the access_token. + getUserFeed: function () { + this.getPhotos( this.endpoints.usersMediaRecent ); + }, + + // Tags + // Get a list of recently tagged media + getRecentTagged: function () { + this.getPhotos( this.endpoints.tagsMediaRecent ); + }, + + fetch: function ( getData ) { + var getUrl = this.API_URL + getData; + + return $.ajax( { + type: "GET", + dataType: "jsonp", + cache: false, + url: getUrl + } ); + }, + + display: function ( results ) { + var $element, + $image, + isWrapperEmpty, + imageGroup = [], + imageCaption, + imageHeight, + imageWidth, + max, + setSize, + size; + + isWrapperEmpty = $( this.options.wrapEachWith ).length === 0; + + if ( results.data === undefined || results.meta.code !== 200 || results.data.length === 0 ) { + if ( isWrapperEmpty ) { + this.$elem.append( this.messages.notFound ); + } else { + this.$elem.append( $( this.options.wrapEachWith ).append( this.messages.notFound ) ); + } + } else { + max = ( this.options.max >= results.data.length ) ? results.data.length : this.options.max; + setSize = this.options.size; + + for ( var i = 0; i < max; i++ ) { + if ( setSize === "small" ) { + size = results.data[i].images.thumbnail.url; + imageHeight = results.data[i].images.thumbnail.height; + imageWidth = results.data[i].images.thumbnail.width; + } else if ( setSize === "medium" ) { + size = results.data[i].images.low_resolution.url; + imageHeight = results.data[i].images.low_resolution.height; + imageWidth = results.data[i].images.low_resolution.width; + } else { + size = results.data[i].images.standard_resolution.url; + imageHeight = results.data[i].images.standard_resolution.height; + imageWidth = results.data[i].images.standard_resolution.width; + } + + imageCaption = ( results.data[i].caption !== null ) ? + $( "" ).text( results.data[i].caption.text ).html() : + this.messages.defaultImageAltText; + + $image = $( "", { + alt: imageCaption, + attr: { + height: imageHeight, + width: imageWidth + }, + src: size + } ); + + $element = $( "", { + href: results.data[i].link, + target: "_blank", + title: imageCaption + } ).append( $image ); + + if ( isWrapperEmpty ) { + imageGroup.push( $element ); + } else { + imageGroup.push( $( this.options.wrapEachWith ).append( $element ) ); + } + } + + this.$elem.append( imageGroup ); + } + + if ( typeof this.options.complete === "function" ) { + this.options.complete.call( this ); + } + } + }; + + jQuery.fn.spectragram = function ( method, options ) { + if ( jQuery.fn.spectragram.accessData.accessToken ) { + + this.each( function () { + var instagram = Object.create( Instagram ); + + instagram.initialize( options, this ); + + if ( instagram[method] ) { + return instagram[method]( this ); + } else { + $.error( "Method " + method + " does not exist on jQuery.spectragram" ); + } + }); + + } else { + $.error( "You must define an accessToken on jQuery.spectragram" ); + } + }; + + // Plugin Default Options + jQuery.fn.spectragram.options = { + complete : null, + max: 20, + query: "instagram", + size: "medium", + wrapEachWith: "
  • " + }; + + // Instagram Access Data + jQuery.fn.spectragram.accessData = { + accessToken: null + }; + +} )( jQuery, window, document ); \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.min.js b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.min.js new file mode 100644 index 00000000..ffbf488e --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/assets/js/spectragram.min.js @@ -0,0 +1 @@ +"function"!=typeof Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),function(t,e,s,a){var i={API_URL:"https://api.instagram.com/v1",initialize:function(e,s){this.elem=s,this.$elem=t(s),this.accessToken=t.fn.spectragram.accessData.accessToken,this.options=t.extend({},t.fn.spectragram.options,e),this.endpoints=this.setEndpoints(),this.messages={defaultImageAltText:"Instagram Photo related with "+this.options.query,notFound:"This user account is private or doesn't have any photos."}},setEndpoints:function(){return{usersSelf:"/users/self/?access_token="+this.accessToken,usersMediaRecent:"/users/self/media/recent/?&count="+this.options.max+"&access_token="+this.accessToken,tagsMediaRecent:"/tags/"+this.options.query+"/media/recent?&count="+this.options.max+"&access_token="+this.accessToken}},getPhotos:function(e){var s=this;s.fetch(e).done(function(e){var a=s.options.query||"User";e.data.length?s.display(e):t.error("Spectragram.js - Error: "+a+" does not have photos.")})},getUserFeed:function(){this.getPhotos(this.endpoints.usersMediaRecent)},getRecentTagged:function(){this.getPhotos(this.endpoints.tagsMediaRecent)},fetch:function(e){var s=this.API_URL+e;return t.ajax({type:"GET",dataType:"jsonp",cache:!1,url:s})},display:function(e){var s,a,i,n,o,r,c,h,d,p=[];if(i=0===t(this.options.wrapEachWith).length,void 0===e.data||200!==e.meta.code||0===e.data.length)i?this.$elem.append(this.messages.notFound):this.$elem.append(t(this.options.wrapEachWith).append(this.messages.notFound));else{c=this.options.max>=e.data.length?e.data.length:this.options.max,h=this.options.size;for(var u=0;u").text(e.data[u].caption.text).html():this.messages.defaultImageAltText,a=t("",{alt:n,attr:{height:o,width:r},src:d}),s=t("
    ",{href:e.data[u].link,target:"_blank",title:n}).append(a),i?p.push(s):p.push(t(this.options.wrapEachWith).append(s));this.$elem.append(p)}"function"==typeof this.options.complete&&this.options.complete.call(this)}};jQuery.fn.spectragram=function(e,s){jQuery.fn.spectragram.accessData.accessToken?this.each(function(){var a=Object.create(i);if(a.initialize(s,this),a[e])return a[e](this);t.error("Method "+e+" does not exist on jQuery.spectragram")}):t.error("You must define an accessToken on jQuery.spectragram")},jQuery.fn.spectragram.options={complete:null,max:20,query:"instagram",size:"medium",wrapEachWith:"
  • "},jQuery.fn.spectragram.accessData={accessToken:null}}(jQuery,window,document); \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/index.html b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/index.html @@ -0,0 +1 @@ + diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.ini b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.ini new file mode 100644 index 00000000..0fb349a3 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.ini @@ -0,0 +1,31 @@ +;Description +MOD_UT_JOOMSTAGRAM = "UT Joomstagram" +MOD_UT_JOOMSTAGRAM_XML_DESCRIPTION ="UT Joomstagram is a module for displaying recent photos and photos of a Tag, from an Instagram User in Joomla!. Read
    Documentation Here!
    Unitemplates
    " + +;Basic +JG_INTRO_LABEL ="Intro" +JG_INTRO_DESC ="Optional text if you want to display a description" +JG_CLIENTID_INFO_LABEL ="First you must create a Client and get your ID, follow this Link. And enter in Manage clients" +JG_CLIENT_ID_LABEL ="Client ID" +JG_CLIENT_ID_DESC ="For a client ID follow the link above" +JG_TOKEN_INFO_LABEL ="For an access token follow this Link. And follow the steps" +JG_ACCESS_TOKEN_LABEL ="Access Token" +JG_ACCESS_TOKEN_DESC ="It is an access token generated by Instagram. Follow the link above" +JG_FEED_SOURCE_LABEL ="Feed Source" +JG_FEED_SOURCE_DESC ="It is the source from which you will get the photos" +JG_USER_LABEL ="User" +JG_USER_DESC ="Write your Instagram username" +JG_TAG_LABEL ="Tag" +JG_TAG_DESC ="Write a tag name (EX: if your hashtag is #fashion your tag is fashion)" +JG_PHOTO_SIZE_LABEL ="Photo Size" +JG_PHOTO_SIZE_DESC ="Choose a size according to the space you have for the module" +JG_COLUMNS_LABEL ="Columns" +JG_COLUMNS_DESC ="This is the number of photos in a row" +JG_ROWS_LABEL ="Rows" +JG_ROWS_DESC ="Enter the number of rows of photos showing" +JG_PADDING_LABEL ="Padding" +JG_PADDING_DESC ="If you need space between photos add padding in pixels. EX 5px" + +;Advanced +JG_ADD_CONTAINER_LABEL ="Container" +JG_ADD_CONTAINER_DESC ="This adds the Responsive container of Bootstrap
    Active if you are going to publish the module in a full screen position" \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.sys.ini b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.sys.ini new file mode 100644 index 00000000..18a5b28a --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/en-GB/en-GB.mod_ut_joomstagram.sys.ini @@ -0,0 +1,3 @@ +;Description +MOD_UT_JOOMSTAGRAM = "UT Joomstagram" +MOD_UT_JOOMSTAGRAM_XML_DESCRIPTION ="UT Joomstagram is a module for displaying recent photos and photos of a Tag, from an Instagram User in Joomla! Read Documentation Here!
    Unitemplates
    " \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.ini b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.ini new file mode 100644 index 00000000..7ad5378c --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.ini @@ -0,0 +1,31 @@ +;Description +MOD_UT_JOOMSTAGRAM = "UT Joomstagram" +MOD_UT_JOOMSTAGRAM_XML_DESCRIPTION ="UT Joomstagram es un modulo para mostrar fotos recientes y fotos de una Etiqueta de un Usuario de Instagram en Joomla!. Lea la Documentacion aqui!
    Unitemplates
    " + +;Basic +JG_INTRO_LABEL ="Introduccion" +JG_INTRO_DESC ="Texto Opcional por si deseas mostrar una descripcion" +JG_CLIENTID_INFO_LABEL ="Primero debes crear un Cliente y obtener su ID, siga el siguiente Enlace. Y entra en Manage clients" +JG_CLIENT_ID_LABEL ="Id de Cliente" +JG_CLIENT_ID_DESC ="Para obtener un ID de cliente siga el enlace anterior" +JG_TOKEN_INFO_LABEL ="Para obtener un Token de Acceso siga el siguiente Enlace. Y siga los pasos descritos" +JG_ACCESS_TOKEN_LABEL ="Access Token" +JG_ACCESS_TOKEN_DESC ="Es un token de Acceso generado por Instagram. Siga el enlace anterior" +JG_FEED_SOURCE_LABEL ="Fuente de Alimentacion" +JG_FEED_SOURCE_DESC ="Es la fuente de donde obtendras las fotos" +JG_USER_LABEL ="Usuario" +JG_USER_DESC ="Escriba tu nombre de usuario de instagram" +JG_USER_OR_TAG_LABEL ="Etiqueta" +JG_USER_OR_TAG_DESC ="Escriba el nombre de una etiqueta (Ej: si tu hashtag es #fashion tu etiqueta es fashion)" +JG_PHOTO_SIZE_LABEL ="Tamaño de Photo" +JG_PHOTO_SIZE_DESC ="Elije un tamaño de acuerdo al espacio que tienes para el modulo" +JG_COLUMNS_LABEL ="Columnas" +JG_COLUMNS_DESC ="Esto es la cantidad de fotos en una fila" +JG_ROWS_LABEL ="Filas" +JG_ROWS_DESC ="Escriba la cantidad de filas de fotos a mostrar" +JG_PADDING_LABEL ="Relleno" +JG_PADDING_DESC ="Si necesitas espacios entre fotos agrega padding en pixeles EJ: 5px" + +;Advanced +JG_ADD_CONTAINER_LABEL ="Contenedor" +JG_ADD_CONTAINER_DESC ="Esto agrega el contenedor Responsive de Bootstrap
    Activa si vas publicar el modulo en una posicion de pantalla completa" \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.sys.ini b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.sys.ini new file mode 100644 index 00000000..5756e938 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/language/es-ES/es-Es.mod_ut_joomstagram.sys.ini @@ -0,0 +1,3 @@ +;Description +MOD_UT_JOOMSTAGRAM = "UT Joomstagram" +MOD_UT_JOOMSTAGRAM_XML_DESCRIPTION ="UT Joomstagram es un modulo para mostrar fotos recientes y fotos de una Etiqueta de un Usuario de Instagram en Joomla!. Lea la Documentacion aqui!
    Unitemplates
    " \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.php b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.php new file mode 100644 index 00000000..fad0c4e7 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.php @@ -0,0 +1,17 @@ +get('moduleclass_sfx')); + +require JModuleHelper::getLayoutPath('mod_ut_joomstagram', $params->get('layout', 'default')); \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.xml b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.xml new file mode 100644 index 00000000..ff5ec14b --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/mod_ut_joomstagram.xml @@ -0,0 +1,65 @@ + + + UT Joomstagram + Unitemplates.com + September 2018 + Copyright (C) 2018 Unitemplates.com. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + info@unitemplates.com + www.unitemplates.com + 1.2.0 + MOD_UT_JOOMSTAGRAM_XML_DESCRIPTION + + language/en-GB/en-GB.mod_ut_joomstagram.ini + language/en-GB/en-GB.mod_ut_joomstagram.sys.ini + language/es-ES/es-ES.mod_ut_joomstagram.ini + language/es-ES/es-ES.mod_ut_joomstagram.sys.ini + + + mod_ut_joomstagram.php + index.html + language + tmpl + assets + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    +
    + + https://update.unitemplates.com/extensions/mod_ut_joomstagram.xml + +
    \ No newline at end of file diff --git a/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/tmpl/default.php b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/tmpl/default.php new file mode 100644 index 00000000..5fe650e3 --- /dev/null +++ b/deployed/mod_ut_joomstagram/modules/mod_ut_joomstagram/tmpl/default.php @@ -0,0 +1,71 @@ +get('jg_feed_source') =='getUserFeed'; +$type_tag = $params->get('jg_feed_source') == 'getRecentTagged'; +$padding = $params->get('jg_padding'); +$columns = $params->get('jg_columns'); +$rows = $params->get('jg_rows'); + +$margins = explode(' ', $padding); +$margin = ''; +foreach ($margins as $key => $value) { + $margin .= '-'.$value.' '; +} +$style = 'ul#feed-'.$module->id.' > li{padding:'.$padding.'!important;}'; +$style .= 'ul#feed-'.$module->id.'{margin:'.$margin.'!important;}'; + + +$doc = JFactory::getDocument(); +$doc->addStyleSheet('modules/mod_ut_joomstagram/assets/css/joomstagram.css'); +$doc->addStyleDeclaration($style); +$doc->addScript('modules/mod_ut_joomstagram/assets/js/spectragram.js'); + +?> + +
    + get('add_container')){echo '
    ';}?> + + get('jg_intro')):?> +
    +

    get('jg_intro');?>

    +
    + + +
    +
      + +
    +
    + get('jg_add_container')){echo '
    ';}?> + + +
    \ No newline at end of file