Question

I am writing software to generate an amount of couponcodes, the user has to be able to pick an algorithm that generates the codes.

I want to write a couple of algorithms and make them into plugins with the CTools Module. Depending on which algorithm the user has selected (through a settings form) that algorithm is set as the 'current algorithm to generate codes'.

when the user then chooses to generate an amount of codes (using the Batch API for this) the generate_code() function in the chosen plugin should be called.

I have been searching multiple days now for good tutorials or documentation on how to do this, but I can't seem to figure it out. I have gone through the 'ctools_example_plugins' code, and

Anybody who can help me out here? or has more information on plugins..

would be appreciated!

Was it helpful?

OTHER TIPS

I don't know anything about CTools plugins....

but it sounds like you could define your own hook function for the algorithm, and then have seperate modules to implement the distinct algorithms

see Can you Create your Own Hook in Drupal?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top