Logout & home links
gilmichelz
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message
+Follow
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:
if (!$client['id']) {
redirect('dashboard');
}

...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:
redirect('member/login');


Thank-you for your help,
Gilbert
Oct 28th 2010, 3:52 pm
adil
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message
+Follow
I'm feeling something wrong in your code

if (!$client['id']) {
redirect('home');
}

u see the ! client has no dashboard

so try like this

!!!
Oct 28th 2010, 4:31 pm
gilmichelz
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message
+Follow
Hello adil,

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

Gilbert
Oct 28th 2010, 4:42 pm
adil
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message
+Follow
go for

redirect('member/logout');

it will (insha allah) by the god will!!!!
Oct 28th 2010, 4:48 pm
gilmichelz
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message
+Follow
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
Oct 28th 2010, 5:26 pm
gilmichelz
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message
+Follow
...well, i found a solution adding a slash at the end of the $uhome's url in my/config.php's file.

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


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:
$ubase = $uhome.'/';


New one:
$ubase = $uhome.'';
Oct 28th 2010, 5:55 pm
falcone
Join date: Sep 2nd 2010
Community posts: 891
View Profile
Send Message
+Follow
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.
Oct 28th 2010, 6:55 pm
gilmichelz
Join date: Oct 6th 2010
Community posts: 56
View Profile
Send Message
+Follow
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
Oct 28th 2010, 7:23 pm
falcone
Join date: Sep 2nd 2010
Community posts: 891
View Profile
Send Message
+Follow
thank you, gracias.

anyway strange link.
Oct 28th 2010, 7:44 pm