Advertisement:

Author Topic: changing posted_item hook position  (Read 1634 times)

RajaSekar

  • Hero Member
  • *****
  • Posts: 791
  • ராஜசேகர்
changing posted_item hook position
« on: August 20, 2012, 12:48:52 am »
suggestion for next release

using this hook we can't redirect user using the custom plugin

to support the plugin redirect

changing root item.php line  to osc_run_hook('posted_item', $item);  line 157

after the this line $this->redirectTo(osc_search_category_url()); line 160


trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: changing posted_item hook position
« Reply #1 on: August 20, 2012, 01:14:00 am »
The one problem I see with doing that change is the hook posted_item would never get called because the redirectTo function would execute before the hook.

I just remembered withe the paypal plugin if you have pay per publish enabled it redirects you to the page to pay for your listing you could look at its code and see how they are doing the redirection.

Jay

RajaSekar

  • Hero Member
  • *****
  • Posts: 791
  • ராஜசேகர்
Re: changing posted_item hook position
« Reply #2 on: August 20, 2012, 04:34:34 pm »

Thanks jay i will take a look on paypal plugin