#1 2016-03-31 09:36:24

vaserra
Member
2013-05-17
166

Plugin AdditionalPages

Goodmorning everyone
I have a problem on:
AdditionalPages
I do not know how to create a page model to load in "load a page model"
can someone help me please?
thank you
regards
Vaserra

Piwigo 2.8.0
MySQL: 5.5.45-37.4-log [2016-03-31 09:24:46]
http://www.oldpainters.org/

Last edited by vaserra (2016-03-31 09:40:08)

Offline

 

#2 2016-03-31 13:34:31

flop25
Piwigo Team
2006-07-06
7038

Re: Plugin AdditionalPages

Hello

I think by looking at the code that you can add "model" from the admin folder wrongly named "distribued" https://github.com/Piwigo/AdditionalPag … c.php#L218 and then loose it on every update Or you have to write a "personal plugin" from LocalFile Editor to use the trigger https://github.com/Piwigo/AdditionalPag … c.php#L230 to add your model from another folder
the code would be something like

Code:

add_event_handler('load_ap_templates_list', 'Add_My_Model');
function Add_My_Model($distribued)
{
   $My_Model = array( //Add you own values
     'name'       => 'My Model', 
     'title'      => '', 
     'permalink'  => '', 
     'lang'       => 'ALL', 
     'homepage'   => false, 
     'standalone' => false, 
     'level'      => 0, 
     'users'      => array('guest', 'generic', 'normal', 'admin', 'webmaster'), 
     'groups'     => array(), 
     'content'    => '', 
   ); 

  $distribued=array_push($distribued, $My_Model);
  return $distribued;
}

and add you model like this https://github.com/Piwigo/AdditionalPag … alone_home


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2016-04-01 11:36:42

vaserra
Member
2013-05-17
166

Re: Plugin AdditionalPages

thank you
I'm trying
another question The album lists more than 20,000 items at the same time, there is some possibility to divide it?

Offline

 

Board footer

Powered by FluxBB

github linkedin newsletter Piwigo.org © 2002-2026 · Contact