ba36814d8d
Added Basic IP Search. Added more items to .gitignore Add a VSCode settings file. Refactored the theme system to allow me to add a per-user theme switcher in the following commit. Fixed h1s, rowmenus, profiles and the Control Panel Dashboard on Tempra Simple. We now catch more extreme edge case errors. Renamed route_panel_themes_default to route_panel_themes_set_default. Centralised some of the per-route ExtData fields. Added an ExtData field to headerLite. Moved SettingLabels into the Phrase System.
24 lines
690 B
Go
24 lines
690 B
Go
package main
|
|
|
|
func init() {
|
|
plugins["helloworld"] = NewPlugin("helloworld", "Hello World", "Azareal", "http://github.com/Azareal", "", "", "", initHelloworld, nil, deactivateHelloworld, nil, nil)
|
|
}
|
|
|
|
// init_helloworld is separate from init() as we don't want the plugin to run if the plugin is disabled
|
|
func initHelloworld() error {
|
|
plugins["helloworld"].AddHook("rrow_assign", helloworldReply)
|
|
return nil
|
|
}
|
|
|
|
func deactivateHelloworld() {
|
|
plugins["helloworld"].RemoveHook("rrow_assign", helloworldReply)
|
|
}
|
|
|
|
func helloworldReply(data interface{}) interface{} {
|
|
reply := data.(*Reply)
|
|
reply.Content = "Hello World!"
|
|
reply.ContentHtml = "Hello World!"
|
|
reply.Tag = "Auto"
|
|
return nil
|
|
}
|