Can I get a parameter from album list of control panel? Can I get a parameter from album list of control panel?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Can I get a parameter from album list of control panel?

Started by mykee, August 16, 2013, 11:25:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mykee

Dear developers,

I made a plugin, and I think, I will use this plugin more than once on index.php. Can I use or call this plugin with parameters from album list? Like you: "catlist,4" -> "myplugin,(parameter)"? Ex.: myplugin,rand\myplugin,lastn\myplugin,lastup\alblist ?

Thanks,
Mykee
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

I don't get what you're asking for. If you want to add different content to the main page, I suggest to use different keywords instead of the same keyword concatenated with another keyword. I'm not sure if this will work at all.

mykee

I need use same plugin on index.php, but with different parameters, like coppermine albums (random, latest, etc.). Can I add parameter on configure site or not? (like row numbers: "lastn,4")
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

Sure, but it's only possible to add numbers, no strings. Have a look at the plugin hook:
$matches = CPGPluginAPI::filter('plugin_block', $matches);

I assume we're talking about your "isotope" plugin. If so, you implemented the filter incompletely:
function isotope_mainpage()
needs to be
function isotope_mainpage($matches)

If you now add something like
isotope,42
to the content of the main page, you're able to use that additional number in your isotope_mainpage function.

print_r($matches);
will return
Array
(
    [0] => isotope,42
    [1] => isotope
    [2] => 42
)

which means, that you can access your additional number via $matches[2].

mykee

Thanks for great help! Yes, this is isotope plugin, where I think put latest and random gallery with isotope - more gallery on index page. I will try your help at aftertnoon, and develop this plugin with more function.
I'd like this: if add a parameter, then select more gallery on one page at twice or more, if not add parameter, then select under config what see on frontpage.
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

mykee

Parameter works now. :) Thanks for help!
(I'm sad: I cannot add one plugin more than once to parameter list. :( )
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

Quote from: mykee on August 22, 2013, 06:16:05 PM
I cannot add one plugin more than once to parameter list
Do you mean you cannot enter something like
Quoteisotope,1/isotope,4/isotope,12
? As far as I know that should be possible, at least I'm quite sure I tested that with the default options (lastup, etc.).

mykee

Hmmm... Working now, if use more than one in parameter list, but isotope script no runned when second gallery showed. TipTip or Adipoli worked, just isotope not. :(
I will search why not. Thanks!
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

mykee

I rewrited my plugin id's, script, because if use plugin more at once, then category filter and isotope script not worked correctly. Check my website for this solution, this worked. Many thanks for great and usefull help!
If anyone need this plugin, I can publish it, but JQuery licenses is different on each script (Isotope, TipTip, Adipoli and LightBox) what includes in this plugin! Often free for personal use, but for commercial use not. I made this for better gallery start page :)
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php