Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-08-20 12:48:04
- tameboy
- Plugin Author
- Registered: 2006-06-29
- Posts: 48
Default Sign in Redirection
Hi
Is there an easy way to change the default page that shows after you sign into textpattern admin side. I have always found it slightly irritating that you are directed to a new article as I very rarely start a new admin session creatively!
Ideally I would like to be able to alter this default action from within a plugin. Is this possible or would I have to use a hack?
Any suggestions gratefully received.
Offline
Re: Default Sign in Redirection
There are a few dashboard plugins that do something similar. You may want to have a look at those.
Offline
#3 2008-08-20 14:08:09
- tameboy
- Plugin Author
- Registered: 2006-06-29
- Posts: 48
Re: Default Sign in Redirection
Hi ruud (again!)
Sorry to be a pain, but I had a good search through this forum and the textpattern resource site before posting and couldn’t find any relevant info. I’ve had another look and I still can’t find any plugins which have this function.
If you know of a particular one that does please let me know. By ‘dashboard’ plugins do you mean ‘admin-extensions’? I really had a thorough look through that section and could see none that advertises this as a feature.
Cheers
Offline
Re: Default Sign in Redirection
If you can create a plugin yourself, here’s a bit of code (assumes your plugin prefix is abc). Note that this may not be compatible with all admin-side plugins.:
[code deleted. caused problems. See below for alternate solution.]
This would cause you to land on the preferences page after login instead of on the write tab.
Last edited by ruud (2008-08-20 17:29:04)
Offline
Offline
#6 2008-08-20 16:13:18
- tameboy
- Plugin Author
- Registered: 2006-06-29
- Posts: 48
Re: Default Sign in Redirection
thanks guys for your help – got it sorted. Ruud’s code cause errors for some reason – but I lifted and modified code from your dashboard plugin and got the result I was after:
if (gps('p_password') && !gps('event')) {
$uri = 'http://' . $GLOBALS['siteurl'] . '/textpattern/index.php?event=boy_enduser_docs';
txp_status_header("302 Found");
header("Location: $uri");
exit;
}
Last edited by ruud (2008-08-20 17:28:36)
Offline
#7 2008-08-20 17:22:57
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Default Sign in Redirection
I’m a little late for tameboy, but if I didn’t misunderstand something completely (curious if I did), here an easier way for everyone else who doesn’t like to code anything:
You can simply use a bookmark like e.g. http://localhost/txpdemo.dev/textpattern/index.php?event=smd_wu
which would open into the smd_where used tab, regardless of whether you’re logged out or don’t have to pass the login screen.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Default Sign in Redirection
Uli wins the award for the most efficient solution.
Offline
Pages: 1