Hi!
I'm using the sidebar loginform in another blog and have a problem that.
I'm using highlighting of the navbar links and it works just fine. When I'm on my first site the Homepage button is highlighted as it should be because I'm on the startpage (Startpage is "http://mydomain.de").
When I login with the sidebar loginform it takes me to the frontpage but with a http://mydomain.de "/index.php?". So the Navbar doesn't recognize the highliting thing anymore. Any help here?
Thanks, Lordcoffee
[solved] target page after sidbarlogin
-
lordcoffee
- Regular
- Posts: 308
- Joined: Tue Nov 29, 2005 10:22 pm
- Location: Munich - Germany
- Contact:
[solved] target page after sidbarlogin
Last edited by lordcoffee on Tue Jul 03, 2007 11:17 am, edited 1 time in total.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: target page after sidbarlogin
Hi!
How about
does that work? If not, you might need to check how Smarty allows to concatenace variables...or maybe use preg_match() within the IF...
Or you might just try "if {$is_startpage}"?
HTH,
Garvin
How about
Code: Select all
{if $startpage == $bla or $startpage == $bla . '?'}
Or you might just try "if {$is_startpage}"?
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
lordcoffee
- Regular
- Posts: 308
- Joined: Tue Nov 29, 2005 10:22 pm
- Location: Munich - Germany
- Contact:
Hi, I think Idon't understand what you mean. I'm curently using this configuration for the Home:
I extracted this code from abdussamads freshy port. It works fine each time I click on the "Homepage" button. but when I login with the loginform it redirects me to the /index.php? page and the button isn't highlighted. When I now click one more time on the Homepage button it's highlighted agein. Hmmm...
Thanks one more time, Lordcoffee
Code: Select all
<li class="{if $startpage }current_{/if}page_item">
<a href="{$serendipityBaseURL}">{$CONST.HOMEPAGE}<span></span></a>
</li>Thanks one more time, Lordcoffee
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Did you try this with serendipity 1.2 as well? I believe the startpage detection might only there include the page with "?"
Regards,
Garvin
Did you try this with serendipity 1.2 as well? I believe the startpage detection might only there include the page with "?"
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
lordcoffee
- Regular
- Posts: 308
- Joined: Tue Nov 29, 2005 10:22 pm
- Location: Munich - Germany
- Contact:
-
lordcoffee
- Regular
- Posts: 308
- Joined: Tue Nov 29, 2005 10:22 pm
- Location: Munich - Germany
- Contact:
Hi once more!
I've searched the forum and found the thread where you said that this would be no problem. Blog is still working
After updating the problem is the same. Maybe it has something to do with this line in the config.inc.php? :
Wouldn't it be easier (if it's possible of course) if the loginformplugin would redirect after the login to the "real" frontpage instead of "/index.php?index.php" ?
I've searched the forum and found the thread where you said that this would be no problem. Blog is still working
After updating the problem is the same. Maybe it has something to do with this line in the config.inc.php? :
Code: Select all
$serendipity['smarty']->assign(array('currpage'=> "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']));
-
lordcoffee
- Regular
- Posts: 308
- Joined: Tue Nov 29, 2005 10:22 pm
- Location: Munich - Germany
- Contact:
I changed this in the plugin:
to this:
I saw that if I'm using a staticpage as startpage the loginform plugin redirects me to the "index.php?frontpage" after login but not after logout. So I searched in the serendipity_event_loginform.php where the login and logout "buttons" are and saw the difference between them.
Is this a clean solution???
Thanks, Lordcoffee
Code: Select all
if (isset($serendipity['POST']['action']) && isset($serendipity['POST']['user']) && isset($serendipity['POST']['pass'])) {
serendipity_login();
} elseif (isset($serendipity['POST']['action']) && isset($serendipity['POST']['logout'])) {serendipity_logout();
header("Location: {$serendipity['baseURL']}{$serendipity['indexFile']}");
exit;
}Code: Select all
if (isset($serendipity['POST']['action']) && isset($serendipity['POST']['user']) && isset($serendipity['POST']['pass'])) {
serendipity_login();
header("Location: {$serendipity['baseURL']}{$serendipity['indexFile']}");
} elseif (isset($serendipity['POST']['action']) && isset($serendipity['POST']['logout'])) {
serendipity_logout();
header("Location: {$serendipity['baseURL']}{$serendipity['indexFile']}");
exit;
}Is this a clean solution???
Thanks, Lordcoffee
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Maybe this one helps:
HTH,
Garvin
Maybe this one helps:
Code: Select all
<li class="{if $startpage OR $view == 'start'}current_{/if}page_item">
<a href="{$serendipityBaseURL}">{$CONST.HOMEPAGE}<span></span></a>
</li>
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/