Generate random image of a dog in your post
2 posters
Page 1 of 1
Generate random image of a dog in your post
Title: Generate random image of a dog in your post
Description: You will be able to click an image of a dog and generate a random image of a dog in your post (updates your unpublished post). This is a fun way to play around.
Version: All versions.
Preview:

1. Go to AP > Modules > Javascript codes management > Enable javascript and then create new javascript.
Name script: Random dog image generator
Placement: In the topics.
Add this code:
Save. Check how it works.
Note: In AwesomeBB version, it works only for quick reply.
Description: You will be able to click an image of a dog and generate a random image of a dog in your post (updates your unpublished post). This is a fun way to play around.
Version: All versions.
Preview:

1. Go to AP > Modules > Javascript codes management > Enable javascript and then create new javascript.
Name script: Random dog image generator
Placement: In the topics.
Add this code:
- Code:
function callImage() {
// Random images generated thanks to free API: https://github.com/jigsawpieces/dog-api-images
$.ajax({
url: 'https://dog.ceo/api/breeds/image/random',
type: 'GET',
dataType: 'json',
success: function(data) {
$('#text_editor_textarea').sceditor("instance").insertText('\n[img]' + data.message + '[/img]');
},
error: function(error) {
console.error('Error fetching JSON:', error);
}
});
}
$(document).ready(function() {
$(function() {
$('<img src="https://i.ibb.co/Wv5Jjb8/3316536-animal-cachorro-dog-dogs-icon-1.png" />').insertAfter('.sceditor-group:last').on("click", function() {
callImage();
});
});
});
Save. Check how it works.
Note: In AwesomeBB version, it works only for quick reply.
Re: Generate random image of a dog in your post
Hello @The Raven
Is this code written by you ?
Is this code written by you ?
Rules wrote:
Rules you must stick to
*Any codes posted must be your own codes and not a small change of codes / JavaScripts made by others on the support forum.
Re: Generate random image of a dog in your post
Itvis made by me. I simply found ni key API and made a call, took data, used it in my own way and that's it.
Re: Generate random image of a dog in your post
somebody else has created that key did you get permission to use it ? do you know if it is copyrighted?
sources
https://codepen.io/louisnelza/pen/GGJoqY
https://github.com/rsumitaj/dogs-api-Ajax/blob/master/script.js
sources
https://codepen.io/louisnelza/pen/GGJoqY
https://github.com/rsumitaj/dogs-api-Ajax/blob/master/script.js
Re: Generate random image of a dog in your post
No. This is the OG of API, all code is there. https://github.com/jigsawpieces/dog-api-images
This is the licence: https://github.com/jigsawpieces/dog-api-images/blob/main/LICENSE
Commercial use
Modification
Distribution
Patent use
Private use
This is the licence: https://github.com/jigsawpieces/dog-api-images/blob/main/LICENSE
Commercial use
Modification
Distribution
Patent use
Private use
GNU General Public License v3.0
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.

» Random image
» Random image widget
» Random 2013 Image
» Random Image Header
» i need a random image javascript
» Random image widget
» Random 2013 Image
» Random Image Header
» i need a random image javascript
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum