maternal
Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

22734 Posts in 6698 Topics- by 17594 Members - Latest Member: permsk

21-07-2019 18:09:08
JOOM::GALLERY::FORUMJoomGallery 3.0 JUX - ExtensionsPluginsJoombu/Joomplu - set Intro/Full article image
Pages: [1]
Print
Author Topic: Joombu/Joomplu - set Intro/Full article image  (Read 2677 times)
0 Members and 1 Guest are viewing this topic.
arj
Newbie
*
Offline Offline

Posts: 24


View Profile
« on: 12-01-2016 19:53:37 »

Howdy. I am trying to modify Joombu/Joomplu in such a way that I want to add a new tab, which will allow me to select an image and that would automatically use the image as article Intro and Full image. The Idea is as follows:

-> I will search for an image using Joombu
-> Once I click on the image, the image Thumbnail will be used as Intro image
-> The Detail image will be used as full article image
-> The alt text/caption would be pre filled with either imgtitle or description

Now, I got down to 2 files which I am trying to modify - com_joomgallery/views/mini/tmpl/default_minis.php and /media/joomgallery/js/mini.js

There are 2 things which would need to be done. Create a new function in the js file which would return the img_src. The other issue is to populate the right field - in this case I would need this to go to jform_images_image_intro and jform_images_image_fulltext respectively.

The issue is, whatever I try, the link is beeing inserted into jform_articletext. anyone able to help me getting this acomplished? I think this could be a good feature for the future too
Logged
arj
Newbie
*
Offline Offline

Posts: 24


View Profile
« Reply #1 on: 15-01-2016 11:00:58 »

Ok, so found the solution. The main issue was the Javascript which was in function insertJoomPluWithId calling window.parent.jInsertEditorText(tag, editor); . This means whatever e_name is beeing sent in the parameter as editor, it will always place the image into the WYSIWYG editor.

I created a second function in the js file which is calling window.parent.document.getElementById(editor).value = tag;  . In this case if I pass e_name jform_images_image_intro in the e_name, it will actually put it into the field .

Additional modification was in the default_minis.php file, where I needed to place an IF , which based on the supplied e_name will either call the first method or my custom function.

Last not least I had to modify the admin template to display the joombu just below the intro and fulltext field. I know this is not the cleanest way, but for what I need to do its actually more than OK.

So now I can very simply use images from the gallery as intro/fulltext images

Logged
MrMusic
Administrator
Hero Member
*****
Offline Offline

Posts: 1081



View Profile
« Reply #2 on: 15-01-2016 15:07:00 »

Hi,

this sounds interesting.  Smile
Can you put your code changes here or on Github so that the developers can take a closer look.
Thank you!
Logged

From now on there is the support for the JoomGallery here: forum.en.joomgalleryfriends.net
arj
Newbie
*
Offline Offline

Posts: 24


View Profile
« Reply #3 on: 16-01-2016 20:14:15 »

Ok, done, have a look, posted into comments what would be a better way to do it - the way I have implemented it is not clean. It works, but its definetly not clean
Logged
MrMusic
Administrator
Hero Member
*****
Offline Offline

Posts: 1081



View Profile
« Reply #4 on: 15-06-2016 13:11:55 »

Now a plugin is available to use JoomGallery Images as Intro/Article image: https://github.com/JoomGallery/JoomMediaFormField
Logged

From now on there is the support for the JoomGallery here: forum.en.joomgalleryfriends.net
Pages: [1]
Print
Jump to:  

HOSTED BY SCHWARZKÜNSTLER ®

PROTECTED BY  ZB BLOCK  AND Project Honey Pot
Theme orange-lt created by panic

Bad Behavior has blocked 6814 access attempts in the last 7 days.

maternal