Jump to content
Sign in to follow this  
hungryfrank

Problem making a.simple redirect hook for admin

Recommended Posts

Posted (edited)

I have made a hook  to simply redirect the pages to index.php but it dose not work.

<?php
/*

  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

class hook_admin_siteWide_redirect_admingroup {
  var $version = '1.0';



  function listen_injectRedirects() {
    global $PHP_SELF;
    
 
		tep_redirect(tep_href_link('index.php'));

  }
  
}

I am trying to put the redirect code that was supposed to go at the bottom of application_top.php to a hook

Edited by hungryfrank

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Share this post


Link to post
Share on other sites

There is no injectRedirects callout in admin.  That is why it does not work.


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites
Posted (edited)

it its in template_top.php 1.0.6.0  what can I use

3 minutes ago, burt said:

There is no injectRedirects callout in admin.  That is why it does not work.

🙏

Edited by hungryfrank

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Share this post


Link to post
Share on other sites

There is no ability to perform a redirect in admin.  Good news for you is that we are in the process of adding in pre-placed hooks now.

What you need to do is add in a callout, in admin/includes/template_top.php and test it. 

Then let me know where you added and what you added and how you tested it...and it might become core code.

If any of the items in bold are not provided, it definitely will not become core code.


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×