Hybrid
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Callback URL using $wp_rewrite->add_external_rule() not workingForum: Fixing WordPress
In reply to: wp_redirect not redirectingFor those struggling with wp_direct for some reason using
add_action( ‘init’, ” ); does not work.you need to use
add_action( ‘template_redirect’, ”, 1 );Forum: Fixing WordPress
In reply to: Add Code before wp_headok np will do so, much appreciated.
Forum: Fixing WordPress
In reply to: Add Code before wp_headOk i was setting add_action( ‘init’, ” ); twice
i have now changed it to –
// inject session header function init_web_header(){ include web_plugin_dir . '/pages/web-session.php'; } // SSO callbacks function web_sso_callback() { global $wp_rewrite; $plugin_url = plugins_url( 'authcallback.php', __FILE__ ); $plugin_url = substr( $plugin_url, strlen( home_url() ) + 1 ); // The pattern is prefixed with '^' // The substitution is prefixed with the "home root", at least a '/' // This is equivalent to appending it to <code>non_wp_rules</code> $wp_rewrite->add_external_rule( 'authcallback.php$', $plugin_url ); } // init functions function web_init_action(){ init_web_header(); web_sso_callback(); } add_action( 'init', 'web_init_action' );
so session seems to now be ok but the wp_redirect again is not working. I dont seem to be able to get both to work together for some reason
And within web-session.php i have –
$location = $authsite . $authurl . '?response_type=code&redirect_uri=' . $redirect_uri . '&client_id=' . $client_id . '&scope=&state=' . $state; wp_redirect( $location );
Really appreciate all the help you are giving as I am very very new to WP. All the codes works in pure PHP so i know it works outside of WP
Forum: Fixing WordPress
In reply to: Add Code before wp_headoh and is pulled from a custom table within the wordpress dbase
Forum: Fixing WordPress
In reply to: Add Code before wp_headI am building a custom SSO login system which will go into a custom user area as i don’t wont to completely rewrite the wp-login system
and unfortunately add_action( ‘init’, ‘process_post’ ); doesnt appear to do anything at all, so should the add_action go into the plugin base file or somewhere else.
Forum: Fixing WordPress
In reply to: Add Code before wp_headthe full path is wp-content/plugins/myplugin/pages/web-session.php’
At the moment i am just trying to get the following code to be accepted
session_start();
if (isset($_SESSION[‘auth_characterid’])) {
echo “Logged in. “.$_SESSION[‘auth_characterid’];
exit;} else {
if(is_page(‘Login’)) {
echo “not logged in”;
// deal with SSO redirect
}
}Forum: Fixing WordPress
In reply to: Add Code before wp_headThanks
ok so i am using this format and I get the feeling i am not using it correctly
In the plugin php file I have –
function init_web_header(){
include web_plugin_dir . ‘/pages/web-session.php’;
}
add_action(‘template_redirect’, ‘init_web_header’);Is this the correct place/usage. Sorry for all the questions.
Forum: Fixing WordPress
In reply to: Add Code before wp_headAhhh ok sorry guys I miss read exactly what it does.
Appreciate you correcting me otherwise I would have completely missed it.
Which i have screwed something up in my code instead….well at least i can narrow down the issue better.
Forum: Fixing WordPress
In reply to: Add Code before wp_headThat was my first attempt but because the redirect is inserted at the end of the wp_head section it doesn’t work.
I has to come at the very top as well as the session variables that i am using.
So what i will probably end up doing is injecting pages/templates via the plugin into the theme which is not what i really wanted to do.
Forum: Fixing WordPress
In reply to: Add Code before wp_headwell i am creating a plugin not a theme and so i suppose the only way i can do it create templates that get copied across to the theme’s folder.
But surely there must be a hook I can use to insert before the header/top of the page.
I just cant find anything elegant or clean that would work.
Any more suggestions?
Forum: Plugins
In reply to: [EVE ShipInfo] can we get this working?Hi Aeon
Sorry for the delay, been a manic week.
I disabled it but will try re enable and repeat the error.
Thanks
HybridForum: Plugins
In reply to: [EVE ShipInfo] can we get this working?Im having the same issue and the fix you suggested doesnt seem to work.
However I did notice that whenever i import a fit, most of it gets cutoff and is missing when viewed.
Any ideas on a solution?
Much Appreciated as it looks great