Editor Button Parameters

Admiror Gallery is free extension for Joomla! based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Message
Author
User avatar
53nord
Komusubi
Komusubi
Posts: 26
Joined: Tue Nov 09, 2010 9:09 pm

Editor Button Parameters

#1 Post by 53nord »

Hi Guys,
the parameters i set in AG configuration are not adopted to the parameters when i use the AG Editor Button. They are fix all the time. Will you change it in future version? Where can i change/remove the parameters (code)? After klicking the AG editorbutton normally i (or my customers) just need a selection (maybe popup menu) of the imagefolder.

Best regards from Hamburg - and thanx for the great tool :)

Torsten

Admiror Gallery 5 - Fundraising Campaign

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: Editor Button Parameters

#2 Post by kekeljevic »

This is great idea. We will add this option for sure. Thanks.

User avatar
53nord
Komusubi
Komusubi
Posts: 26
Joined: Tue Nov 09, 2010 9:09 pm

Re: Editor Button Parameters

#3 Post by 53nord »

what code do i have to remove that i just have the option to choose the album in the editor button dialog?

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: Editor Button Parameters

#4 Post by kekeljevic »

Open /administrator/components/com_admirorgallery/views/button/tmpl/default.php

Edit line 88

Code: Select all

var AG_triggerCode='{AG'+AG_params+'}'+AG_jQuery('input[name="AG_form_folderName"]:checked').val()+'{/AG}';
to

Code: Select all

var AG_triggerCode='{AG}'+AG_jQuery('input[name="AG_form_folderName"]:checked').val()+'{/AG}';

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: Editor Button Parameters

#5 Post by kekeljevic »

You can remove for 49-64 if You want not to see parameters.

Admiror Gallery 5 - Fundraising Campaign

User avatar
53nord
Komusubi
Komusubi
Posts: 26
Joined: Tue Nov 09, 2010 9:09 pm

Re: Editor Button Parameters

#6 Post by 53nord »

Thanks - that works.

What code do i have to change that i get a dropdown-list instead of the radio buttons to chose the imagefolders?

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: Editor Button Parameters

#7 Post by kekeljevic »

Hahahahahahahaha I like this guy :-)

You have to edit the same file as before.

FIND:

Code: Select all

if(!empty($ag_folders)){
  foreach($ag_folders as $ag_folders_key => $ag_folders_value){
    $ag_folderName = substr($ag_folders_value['relname'],$ag_init_itemURL_strlen);
    echo '<input type="radio" name="AG_form_folderName" value="'.$ag_folderName.'" /> '.$ag_folderName.'<br />';
  }
}
AND CHANGE TO:

Code: Select all

echo '<select name="AG_form_folderName">';
if(!empty($ag_folders)){
  foreach($ag_folders as $ag_folders_key => $ag_folders_value){
    $ag_folderName = substr($ag_folders_value['relname'],$ag_init_itemURL_strlen);
    echo '<option value="'.$ag_folderName.'" />'.$ag_folderName;
  }
}
echo '</select>';
AND FIND ON THE BOTTOM:

Code: Select all

var AG_triggerCode='{AG}'+AG_jQuery('input[name="AG_form_folderName"]:checked').val()+'{/AG}';
AND CHANGE TO:

Code: Select all

var AG_triggerCode='{AG}'+AG_jQuery('select[name="AG_form_folderName"]').val()+'{/AG}';

User avatar
53nord
Komusubi
Komusubi
Posts: 26
Joined: Tue Nov 09, 2010 9:09 pm

Re: Editor Button Parameters

#8 Post by 53nord »

Thanks kekeljevic,

that works - if i ask for more code I'l have a complete new extension ;-)

I'd like to make it for my customers as easy as possible - thats what they pass on: nice and easy to handle ;)

Maybe you can put this idea in your next release.

Best Regards and thanks a lot for your help

Torsten

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: Editor Button Parameters

#9 Post by kekeljevic »

Revision 173 will have it implemented. Yesterday I put a droplist for Album selection and a checkbox for use of the Params.

Admiror Gallery 5 - Fundraising Campaign

boardrider
Posts: 2
Joined: Sat May 14, 2011 10:32 pm

Re: Editor Button Parameters

#10 Post by boardrider »

I downloaded latest version yesterday and realized that the dropdown menu for the folders was empty. At firebug I found out that the <option> tags were empty.

To fix it I changed the code from:

echo '<option value="'.$ag_folderName.'" />'.$ag_folderName;

to

echo '<option value="'.$ag_folderName.'">'.$ag_folderName.'</option>';

Then I was able to see my folders on the drodown.

I hope this will help other people and hope you guys could include this fix on the next release.

I have a question now: This dropdown list will only display 3 levels of folders, how can i increase it to display 5 or 6 levels?

Thanks a lot.

Post Reply