www.archline.hu — clean post-compromise baseline #2

Merged
imre.agent merged 88 commits from baseline/47 into main 2026-07-16 14:40:45 +02:00
11 changed files with 441 additions and 0 deletions
Showing only changes of commit a0ffba0351 - Show all commits

View File

@ -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%;}

View File

@ -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 ) ?
$( "<span>" ).text( results.data[i].caption.text ).html() :
this.messages.defaultImageAltText;
$image = $( "<img>", {
alt: imageCaption,
attr: {
height: imageHeight,
width: imageWidth
},
src: size
} );
$element = $( "<a>", {
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: "<li></li>"
};
// Instagram Access Data
jQuery.fn.spectragram.accessData = {
accessToken: null
};
} )( jQuery, window, document );

View File

@ -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<c;u++)"small"===h?(d=e.data[u].images.thumbnail.url,o=e.data[u].images.thumbnail.height,r=e.data[u].images.thumbnail.width):"medium"===h?(d=e.data[u].images.low_resolution.url,o=e.data[u].images.low_resolution.height,r=e.data[u].images.low_resolution.width):(d=e.data[u].images.standard_resolution.url,o=e.data[u].images.standard_resolution.height,r=e.data[u].images.standard_resolution.width),n=null!==e.data[u].caption?t("<span>").text(e.data[u].caption.text).html():this.messages.defaultImageAltText,a=t("<img>",{alt:n,attr:{height:o,width:r},src:d}),s=t("<a>",{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:"<li></li>"},jQuery.fn.spectragram.accessData={accessToken:null}}(jQuery,window,document);

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -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 <a href="https://www.unitemplates.com/documentation/joomla-extensions/ut-joomstagram" target="_blank">Documentation Here!</a><br /><div><a href="http://www.unitemplates.com/" target="blank"><img src="http://www.unitemplates.com/images/logos/logo.png" alt="Unitemplates" width="160" height="56"></a></br></div>"
;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 <a href="http://instagram.com/developer/" target="_blank">Link</a>. 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 <a href="http://instagram.com/developer/authentication/" target="_blank">Link</a>. 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<br/>Active if you are going to publish the module in a full screen position"

View File

@ -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 <a href="https://www.unitemplates.com/documentation/joomla-extensions/ut-joomstagram" target="_blank">Documentation Here!</a><br /><div><a href="http://www.unitemplates.com/" target="blank"><img src="http://www.unitemplates.com/images/logos/logo.png" alt="Unitemplates" width="160" height="56"></a></br></div>"

View File

@ -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 <a href="https://www.unitemplates.com/documentation/joomla-extensions/ut-joomstagram" target="_blank">la Documentacion aqui!</a><br /><div><a href="http://www.unitemplates.com/" target="blank"><img src="http://www.unitemplates.com/images/logos/logo.png" alt="Unitemplates" width="160" height="56"></a></br></div>"
;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 <a href="http://instagram.com/developer/" target="_blank">Enlace</a>. 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 <a href="http://instagram.com/developer/authentication/" target="_blank">Enlace</a>. 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<br/>Activa si vas publicar el modulo en una posicion de pantalla completa"

View File

@ -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 <a href="https://www.unitemplates.com/documentation/joomla-extensions/ut-joomstagram" target="_blank">la Documentacion aqui!<br /><div><a href="http://www.unitemplates.com/" target="blank"><img src="http://www.unitemplates.com/images/logos/logo.png" alt="Unitemplates" width="160" height="56"></a></br></div>"

View File

@ -0,0 +1,17 @@
<?php
/**
* @package Joomla.site
* @subpackage mod_ut_spectragram
* @version 1.0.0
* @created Jan 2015
* @author Unitemplates
* @email info@unitemplates.com
* @website http://www.unitemplates.com
* @copyright Copyright (C) 2014 - 2015 Unitemplates. All rights reserved.
* @license GNU General Public License version 2 or later.
*/
defined('_JEXEC') or die;
$class_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
require JModuleHelper::getLayoutPath('mod_ut_joomstagram', $params->get('layout', 'default'));

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1.0" client="site" method="upgrade">
<name>UT Joomstagram</name>
<author>Unitemplates.com</author>
<creationDate>September 2018</creationDate>
<copyright>Copyright (C) 2018 Unitemplates.com. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>info@unitemplates.com</authorEmail>
<authorUrl>www.unitemplates.com</authorUrl>
<version>1.2.0</version>
<description>MOD_UT_JOOMSTAGRAM_XML_DESCRIPTION</description>
<languages>
<language tag="en-GB">language/en-GB/en-GB.mod_ut_joomstagram.ini</language>
<language tag="en-GB">language/en-GB/en-GB.mod_ut_joomstagram.sys.ini</language>
<language tag="es-ES">language/es-ES/es-ES.mod_ut_joomstagram.ini</language>
<language tag="es-ES">language/es-ES/es-ES.mod_ut_joomstagram.sys.ini</language>
</languages>
<files>
<filename module="mod_ut_joomstagram">mod_ut_joomstagram.php</filename>
<filename>index.html</filename>
<folder>language</folder>
<folder>tmpl</folder>
<folder>assets</folder>
</files>
<config>
<fields name="params">
<fieldset name="basic">
<field name="jg_intro" type="textarea" label="JG_INTRO_LABEL" description="JG_INTRO_DESC" />
<field name="jg_clientid_info" type="spacer" label="JG_CLIENTID_INFO_LABEL" />
<field name="jg_token_info" type="spacer" label="JG_TOKEN_INFO_LABEL" />
<field name="jg_access_token" type="text" label="JG_ACCESS_TOKEN_LABEL" description="JG_ACCESS_TOKEN_DESC" />
<field name="jg_feed_source" type="list" label="JG_FEED_SOURCE_LABEL" description="JG_FEED_SOURCE_DESC">
<option value="getUserFeed">JGLOBAL_USERNAME</option>
<option value="getRecentTagged">Tag</option>
</field>
<field name="jg_user" type="text" showon="jg_feed_source:getUserFeed" label="JG_USER_LABEL" description="JG_USER_DESC" />
<field name="jg_tag" type="text" showon="jg_feed_source:getRecentTagged" label="JG_TAG_LABEL" description="JG_TAG_DESC" />
<field name="jg_photo_size" type="list" label="JG_PHOTO_SIZE_LABEL" description="JG_PHOTO_SIZE_DESC" default="medium">
<option value="small">Small</option>
<option value="medium">Medium</option>
<option value="big">Big</option>
</field>
<field name="jg_columns" type="list" label="JG_COLUMNS_LABEL" description="JG_COLUMNS_DESC" default="4">
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="6">6</option>
</field>
<field name="jg_rows" type="text" label="JG_ROWS_LABEL" description="JG_ROWS_DESC" default="2"/>
<field name="jg_padding" type="text" label="JG_PADDING_LABEL" description="JG_PADDING_DESC" default="0" />
</fieldset>
<fieldset name="advanced">
<field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC" />
<field name="add_container" type="list" label="JG_ADD_CONTAINER_LABEL" description="JG_ADD_CONTAINER_DESC" default="0">
<option value="0">JNO</option>
<option value="container">JYES</option>
</field>
<field name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>
</fields>
</config>
<updateservers>
<server type="extension" name="UT Joomstagram">https://update.unitemplates.com/extensions/mod_ut_joomstagram.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.site
* @subpackage mod_ut_joomstagram
* @version 1.0.0
* @created September 2017
* @author Unitemplates
* @email info@unitemplates.com
* @website http://www.unitemplates.com
* @copyright Copyright (C) 2012 - 2015 Unitemplates. All rights reserved.
* @license GNU General Public License version 2 or later.
*/
defined('_JEXEC') or die;
//variables
$type_user = $params->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');
?>
<div id="ut-jg-<?php echo $module->id;?>" class="ut-joomstagram <?php echo $class_sfx;?>">
<?php if($params->get('add_container')){echo '<div class="container">';}?>
<?php if ($params->get('jg_intro')):?>
<div class="jg-intro">
<p><?php echo $params->get('jg_intro');?></p>
</div>
<?php endif;?>
<div class="jg-photo-ct">
<ul id="feed-<?php echo $module->id;?>" class="clearfix">
<!-- load instagram photos here -->
</ul>
</div>
<?php if($params->get('jg_add_container')){echo '</diV>';}?>
<script>
jQuery(function(){
// Configure your accessData with accessToken and clientID
jQuery.fn.spectragram.accessData = {
accessToken: '<?php echo $params->get("jg_access_token");?>',
//clientID: '<?php echo $params->get("jg_client_id");?>'
};
// Search and Display data from instagram
jQuery('#feed-<?php echo $module->id;?>').spectragram('<?php echo $params->get("jg_feed_source");?>',{
query: '<?php if($type_user){echo $params->get("jg_user");}?><?php if($type_tag){echo $params->get("jg_tag");}?>',
max:<?php echo $columns * $rows;?>,
size:'<?php echo $params->get("jg_photo_size");?>',
wrapEachWith: '<li class="col-xs-6 col-sm-<?php echo 12 / $columns;?>"></li>'
});
});
</script>
</div>