Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Architecture: Allow Signal on threadentry.rendered #4676

Closed

Conversation

t-oster
Copy link
Contributor

@t-oster t-oster commented Jan 29, 2019

Hi. In order to make all my addons for OsTicket suitable for other users, I want do distribute them as Plugins. I need some more interface than the existing Signals, so I will provide some pull requests, which just add more signals to the core code.

Please merge them or tell me how you would like me to proceed, so I can soon create more powerful plugins.

This particular PR contains just one Signal: threadentry.rendered. It comes with the ThreadEntry Object and a hashmap containing the html code.

A possible plugin would be one to fix broken HTML (ebay sometimes sends such mails), which crash the ticket-view page otherwise.

Another use-case is replacing order-numbers in tickets with links to the ERP system, or amazon-order numbers with links to the seller-central, ebay names with links to the ebay customer etc.

@protich
Copy link
Member

protich commented Feb 1, 2019

@t-oster - I absolutely agree signals should be expanded to cover most of actions that might be of interest to plugins. We just have to make sure we follow some convention similar to variables we use in email templates.

@t-oster
Copy link
Contributor Author

t-oster commented Feb 1, 2019

Thank you for your answer. I agree conventions make sense.
Please guide me with the following questions:

  • When to use Signal::send vs the manager::register pattern used in many places?
  • What are naming conventions for the signal and its parameters?
  • How can plugins hook into templates (.tmpl.php files). One could insert signal send and the plugin can use echo,but that seems dirty
  • Is it OK for signals to have null as object if no useful object exists in the case

@t-oster
Copy link
Contributor Author

t-oster commented May 8, 2019

@protich could you please answer the questions, so I can update the pull-request accordingly?

@t-oster
Copy link
Contributor Author

t-oster commented Nov 10, 2020

@protich sorry, but you did not answer. I really would like to develop a bunch of useful plugins, but I need more signals/hooks whatever you call them in order to add custom html, javascript and php logic.

@t-oster
Copy link
Contributor Author

t-oster commented Nov 12, 2020

closed in favor of #5693

@t-oster t-oster closed this Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants