Page 1 of 2

Editor Button Parameters

Posted: Wed Mar 23, 2011 4:34 pm
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

Re: Editor Button Parameters

Posted: Thu Mar 24, 2011 11:50 am
by kekeljevic
This is great idea. We will add this option for sure. Thanks.

Re: Editor Button Parameters

Posted: Thu Mar 24, 2011 1:16 pm
by 53nord
what code do i have to remove that i just have the option to choose the album in the editor button dialog?

Re: Editor Button Parameters

Posted: Thu Mar 24, 2011 2:02 pm
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}';

Re: Editor Button Parameters

Posted: Thu Mar 24, 2011 2:04 pm
by kekeljevic
You can remove for 49-64 if You want not to see parameters.

Re: Editor Button Parameters

Posted: Sun Mar 27, 2011 1:39 pm
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?

Re: Editor Button Parameters

Posted: Tue Apr 05, 2011 8:23 am
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}';

Re: Editor Button Parameters

Posted: Tue Apr 05, 2011 11:25 am
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

Re: Editor Button Parameters

Posted: Wed Apr 06, 2011 8:23 am
by kekeljevic
Revision 173 will have it implemented. Yesterday I put a droplist for Album selection and a checkbox for use of the Params.

Re: Editor Button Parameters

Posted: Sat May 14, 2011 10:36 pm
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.