Jump to content

gutterboy

Members
  • Posts

    284
  • Joined

  • Last visited

Everything posted by gutterboy

  1. I'm just wondering are transactions created for ANY payments the user makes or payments recorded or made via admin as well? ...even if the payment is partial? What if it isn't attached to an invoice? Thanks!
  2. When I clicked the log out button OR was redirected to the log out page via logging out on our main system is when that error showed. Full error: Files does not exist: D:\Website_Needs\CodeBase\Gimko_V2\billing\app\views\client\bootstrap\client_logout.pdt on line 120 in D:\Website_Needs\CodeBase\Gimko_V2\billing\lib\view.php Printing Stack Trace: #0 D:\Website_Needs\CodeBase\Gimko_V2\billing\lib\controller.php(277): View->fetch('client_logout', NULL) #1 D:\Website_Needs\CodeBase\Gimko_V2\billing\lib\dispatcher.php(128): Controller->render() #2 D:\Website_Needs\CodeBase\Gimko_V2\billing\index.php(21): Dispatcher::dispatch('/gimko_v2/billi...') #3 {main}
  3. Any idea why when I change my method name to something else such as "redirect" I get a file doesn't exist error? ie; Change this: public function getEvents() { return array( array( 'event' => "Users.logout", 'callback' => array("this", "run") ) // Add multiple events here ); } public function run($event) { // code here } To this.. public function getEvents() { return array( array( 'event' => "Users.logout", 'callback' => array("this", "redirect") ) // Add multiple events here ); } public function redirect($event) { // code here } Basically an error stating a file doesn't exist which comes from line: 120 of lib/view.php
  4. Hmmm ok. Well I guess that leaves me with my initial problem then haha......... guess I'll have to include a config file or something.
  5. Is there any docs on creating components? Can I run similar code in there that will trigger on the user logout event?
  6. Yeah, don't want to edit the core files or anything - just trying to figure out how this stuff is usually done. For example this is my plugin handler code: class LogoutRedirectPlugin extends Plugin { public $url; public function __construct() { $this->loadConfig(dirname(__FILE__) . DS . "config.json"); } public function getEvents() { return array( array( 'event' => "Users.logout", 'callback' => array("this", "run") ) // Add multiple events here ); } public function run($event) { header('Location: http://localhost/gimko_v2/'); } } If I was doing it normally I would just do something like this: $logout = new LogoutRedirectPlugin(); $logout->url = 'http://www.mydomain.com/'; OR... $logout = new LogoutRedirectPlugin('http://www.mydomain.com/'); ...and then set it in the constructor.
  7. I just made my very first plugin (very very simple at that haha) and it's basically a plugin that redirects the user after they logout. However I would like to be able to set a member variable for this action so I can pass in the URL I want to redirect to; I can do it via including a config file but I thought updating the member variable would be a better way. How can I pass in a URL I want it to redirect to such as by setting the value of a member variable or even via a parameter that is passed to a constructor? Thanks!
  8. I think it's some kind of problem with the naming convention with this as I changed the plugin name and had no install issues like this.
  9. I ended up commenting out the redirect in that file and then making a very simple plugin that triggers the redirect after the logout event.
  10. Inside the plugins folder it goes like this.. my_plugin/ controllers/ models/ views/ default/ config.json my_plugin_controller.php my_plugin_model.php my_plugin_plugin.php
  11. I am having a similar problem to this thread: http://www.blesta.com/forums/index.php?/topic/3077-failing-to-make-a-simple-plugin-a-existing-pluginhandler-not-found/ I followed the documentation but I get the same errors as in that thread. My file is called "my_plugin_plugin.php" and the class is called "MyPluginPlugin". Why is it then looking for "MyPlugin"?
  12. Hmmmm..... I'd prefer to do it another way, but if I chose to do it that way where would I put that code? You mean in our main system?
  13. Hmmm ok, had a look at this. Pretty new to working with the blesta code myself, is there a way I can extend this or something so I can change it so I can pass in a redirect url or something? Because it will vary depending on the environment (dev/test/prod).
  14. Well I'm sure I can redirect the user via a GET request to the blesta log out, but not sure how to get blesta to do a redirect after logging them out?
  15. If I just redirected them to the logout URL then that's where they would end; I need the process to be seamless so they end up back on the main page of the site - which is where they are sent now when they log out.
  16. Thanks for the reply. Basically what I am doing is I am using the shared login plugin cody made to log the user into Blesta at the same time as they log into our main site, so when they log out of our main site I want to log them out of Blesta as well.
  17. I noticed there is a user::logout method and according to the docs it requires the users "session" to be passed in; my question is how do I get this information for the user to pass to the user::logout method? Thanks!
  18. Nvm...... seems it was because the user was using their email as the login and not the username. All fixed now.
  19. Ok, seems that was because I was sending it to plugins and not plugin; however I fixed that but now I get a blank page when I am redirected to the blesta URL.
  20. I just tried this out with the redirect option and when I got redirected to the blesta url login page all it showed me was the directory contents of the folder for that plugin. I followed the docs as per: http://docs.blesta.com/display/user/Shared+Login
  21. Hmmm ok. So a client I created with clients::create I need to use contacts::edit and NOT clients::edit to edit their details?
×
×
  • Create New...