Login     Sign up
Logout & home links
Gilbert Michel (@gilmichelz)
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message

Hello,

I do not know if this bug only happen on my server, but the thing is that when i click the home or logout's links the url that result in my browser look like the following one:

[url]http://domainname/jcow/?p=/home/username/public_html/jcow[/url]

The home's link only work well when connected.

If you can help, for i do not find where is the logout's link function stipulated, apart in the theme folder.

As proposed in an other thread for redirection, i have tried with adding in home.php (home's module) under set_menu_path('home') the following code:
[code]if (!$client['id']) {
redirect('dashboard');
}[/code]
...but after redirection to dashboard it does not show the content of dashboard page.

So the only solution i am using at the moment is to add the following code after line 26 in home.php:
[code]redirect('member/login');[/code]

Thank-you for your help,
Gilbert

164 months ago
adil (@adil)
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message

I'm feeling something wrong in your code
[code]
if (!$client['id']) {
redirect('home');
}
[/code]
u see the ! client has no dashboard

so try like this

!!!

164 months ago
Gilbert Michel (@gilmichelz)
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message

Hello adil,

Thank you but i have allready test that code, and page just don't load at all.

Gilbert

164 months ago
adil (@adil)
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message

go for
[code]
redirect('member/logout');
[/code]
it will (insha allah) by the god will!!!!

164 months ago
Gilbert Michel (@gilmichelz)
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message

Hi Adil,

Allready tested to, and not working...

No, the only solution is to find how to resolved the display of the user path in url, but for that i need to know where is the correspondant function.

Gilbert

164 months ago
Gilbert Michel (@gilmichelz)
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message

...well, i found a solution adding a slash at the end of the $uhome's url in my/config.php's file.

[code]$uhome = 'http://www.domainname/jcow/';[/code]

So that way there is no need to change the home.php file.

Just that way it look like that it is necessary to change the line 23, in my/config.php, as follow:

Actual one: [code]$ubase = $uhome.'/';[/code]

New one: [code]$ubase = $uhome.'';[/code]

164 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

http://domainname/jcow/?p=/home/username/public_html/jcow

strange link that you have. the part after the p is what get if you do echo $_SERVER['DOCUMENT_ROOT'] on a shared host.

164 months ago
Gilbert Michel (@gilmichelz)
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message

Hi Falcone,

First of all (Sorry i forgot yesterday) happy birthday to you!

My jcow website is not hosted on a shared server, and the url that i was dealing with is the one that was been displayed after i clicked on logout link, when connected, or on home link when not connected.

But now this problem is resolved on my side after changing the way the url works in config.php.

Gilbert

164 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

thank you, gracias.

anyway strange link.

164 months ago