[geeklog-devel] Feature Request: ADMIN_list (2 requests)

Joe Mucchiello joe at ThrowingDice.com
Tue Aug 21 23:30:07 EDT 2007


I can't really make the forms have different action urls. They pull 
their action url out of the $_GET array (so that they don't mess up 
the other display) and thus end up identical. It's too complicated to 
explain here. But I've figured out a different change that would be 
easier on you and not as messy in the


Add a hidden input with the $component variable in it to the form.

<input type="hidden" name="component" value="{component}">  // added 
to (probably) the list.thtml just before the table opens.

$admin_template->set_var('component', $component);  // added 
somewhere in the big function

That would be an easy fix for my dilemma and I wouldn't need the 
delitem change.
----------
Passing templates into admin_list would be cool:

     $admin_templates = new Template($_CONF['path_layout'] . 'admin/lists');
     $template_files = array (
         'topmenu' => 'topmenu.thtml',
         'list' => 'list.thtml',
         'header' => 'header.thtml',
         'row' => 'listitem.thtml',
         'field' => 'field.thtml',
         'menufields' => 'menufields.thtml'
     );

     if (isset($options['templates'])) {
          foreach ($options['templates'] as $k => $v) {
               $template_files[$k] = $v;
          }
     }

     $admin_templates->set_file($template_files);

if you pass in Array('list'=> 'mylist.thtml', 
'special'=>'special.thtml') the 'list' element overwrites the default 
template array and the 'special' element is just added on. You'd need 
to use PLG_templatesetvars to use the extra template, still, it could 
be interesting.

At 11:03 PM 8/21/2007, Oliver Spiesshofer wrote:
>Ok, I get what you mean now.
>
>However, if you have two different functions since you have two 
>different lists, the fact that the form fields are called the same 
>should not be an issue no? I am not sure how the "Check all" behaves though...
>Finally the url of each form can be different, and include 
>get-variables to differentiate two forms pointing to the same target 
>file (such as .../index.php?form=1)?
>
>The additional fields on the bottom can be done with an additional 
>code in the array similar as you indicated. I do not think that 
>would be too complicated
>
>Oliver
>
>Joe Mucchiello wrote:
>>No, I just want to be able to NAME the checkboxes. Currently they 
>>are delitem and I need to put two admin lists on the same page and 
>>based on the setup, it isn't easy to generate unique form urls for 
>>the two lists. Multiple checkboxes would be a bit insane. (Although 
>>being able to specify where the check boxes appear would be nice too. :-) )
>>
>>Adding things through templates only works if I can pass in the 
>>name of the template to admin_list(). I don't want ALL admin lists 
>>to have extra buttons.
>>
>>The extra buttons would go on the same line as the trash can.
>>
>>All the code changes are basically in my email. You just need to 
>>search for the lines to make the modifications. If you like, I'll 
>>send you a full function with my changes and you can compare it 
>>that way. (I'll have to go look at CVS's lib-admin to make sure I'm 
>>not losing any important fixes though.)
>>
>>Basically it would be nice to have something like:
>>[] data data data
>>[] data data data
>>[drop list [v] [GO]
>>
>>So you could perform actions on several items besides deleting 
>>them. For example,
>>[] data data data
>>[] data data data
>>Move to folder [drop list of folders [v] [GO]
>>
>>As much as you don't want to overcomplicate that beast of a 
>>function, I don't want to clone it and maintain a fork. :-)
>>
>>   Joe
>>
>>At 09:21 PM 8/21/2007, Oliver Spiesshofer wrote:
>>>And I thought the whole Adminlist was complicated enough already :-)
>>>
>>>Can you tell me what you want to do? I do not want to blow this up 
>>>into a monster where no one can handle the code afterwards anymore.
>>>I would prefer to allow the codewriter to add things through 
>>>templates or so instead of making the main function even more complex.
>>>You want to have several checkboxes and then also for the next row 
>>>another button on the end of the row?
>>>
>>>Oliver
>>
>>----
>>Joe Mucchiello
>>Throwing Dice Games
>>http://www.throwingdice.com
>>_______________________________________________
>>geeklog-devel mailing list
>>geeklog-devel at lists.geeklog.net
>>http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
>_______________________________________________
>geeklog-devel mailing list
>geeklog-devel at lists.geeklog.net
>http://eight.pairlist.net/mailman/listinfo/geeklog-devel

----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com  




More information about the geeklog-devel mailing list