×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Custom Coding Help

Custom Coding Help 9 years 1 month ago #32683

  • Dima um
  • Dima um's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
Hello,
I need to code some specific coding for a client. I need to do it together/after adding a hotspot location into DB.
Basically I need to know where the store function is in the code (I cannot find it) . I am talking about adding/editing a hotspot location from the admin.
I will be using the array of the spot info (lat, lng, address, etc...)

Thanks

Custom Coding Help 9 years 1 month ago #32684

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Dima,
Look at the Hotspots -> email plugin. Basically you need to make the same plugin and add your code to the onAfterHotspotSave function.

Regards,
Daniel
The following user(s) said Thank You: Dima um

Custom Coding Help 9 years 1 month ago #32694

  • Dima um
  • Dima um's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
Thanks Daniel, It seem exactly what I need. This email plugin though, I added firePHP into it, and when I save new location or edit and save existing, this plugin does not run at all. Plugin is activated (just in case). Is it supposed to run on on front end submissions? If so, I still need a way to accomplish what I need from the backend save.
Thanks

Custom Coding Help 9 years 1 month ago #32702

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
The plugin event runs in both frontend and backend. Have you made changes directly to the mail plugin, or have you created a new plugin as I told you?

Custom Coding Help 9 years 1 month ago #32714

  • Dima um
  • Dima um's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
I made a new plugin, and when I saw that it didn't run, I put firePHP code in the email plugin too, it didn't run also.

Custom Coding Help 9 years 1 month ago #32735

  • Dima um
  • Dima um's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
Hello?

Custom Coding Help 9 years 1 month ago #32736

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Make a die('something') in the onAfterSaveHotspots funciton and see if after posting you get a white page. with 'something" written on the screen. If you do, then the plugin is being called.
The plugin works for sure, as I'm getting e-mails on new hotspots.

Regards,
Daniel

Custom Coding Help 9 years 1 month ago #32746

  • Dima um
  • Dima um's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
I did similar thing with firePHP, but just to be sure, just put a die() in the beginning of email.php, and on the start of onAfterHotspotSave function. Saved edited hotspots twice - no problem, the die() does not run.

Update: Just tried on another website with new hotspots installation - same thing the email plugin does not run at all.
  • Page:
  • 1
Time to create page: 0.106 seconds