It would be cool if redirects were allowed for both anonymous users and logged in users. I'm trying to use this module for a magazine website where the frontpage 'cover' would change every month for the regular user. For contributors to the magazine it's not as important to have a custom page, but i'm sure I can make use of that too. Thanks!

Comments

Dublin Drupaller’s picture

Have added in php functionality to the module...so it is just as easy to set the redirect using PHP for anonymous users...

i.e.

<?php
drupal_goto("node");
?>

The above code redirects users to "node".......change "node" to suit your needs.

(don't forget to select the PHP code chekbox when saving your front page)

Hope that makes sense..

Dub

Dublin Drupaller’s picture

Have added in php functionality to the module...so it is just as easy to set the redirect using PHP for anonymous users...

i.e.

<?php
drupal_goto("node");
?>

The above code redirects users to "node".......change "node" to suit your needs.

(don't forget to select the PHP code chekbox when saving your front page)

Hope that makes sense..

Dub

Dublin Drupaller’s picture

Assigned: Unassigned » Dublin Drupaller

sorted.

Anonymous’s picture

mishaikin’s picture

Category: feature » bug

Well, I've been searching a lot for this modification, however it does not work as expected - if I use:
drupal_goto("node/137"); for e.g. for the anonymous and have redirect to another node for the logged in users (for e.g. node/105), until I log in, it seems to work fine, but when log in - the site remains on the same page (node/137 instead of the other node) and only when I click on "home" link (which goes to "/" of the site) the Drupal changes to the page it is supposed to be - node/105.
Could you help me solve this problem?

Best regards.

Dublin Drupaller’s picture

not sure if that is a bug in the front_page.module...is that a cache thing?

Dub

Dublin Drupaller’s picture

have re-created the problem you're having....

I notice that it doesn't seem to like when both are redirects...but works fine if one is text and the other is a redirect.

Will have to look into this in more detail...in the meantime can you paste the node contents for NOT logged in users into the first box and use the redirect for LOGGED IN USERS as opposed to the php redirect?

That works fine...it just seems to not like when both are redirects.

Will look into it and post back up here if I find a solution/workaround..

Dub

mishaikin’s picture

Thanks!
I'll wait for the workaround because my first pages (both for the anonymous and logged in) have sidebar content which complicates the the case, and also the one for the anonymous is with switched-off block (that's the reason I want front_page.module to redirect to a concrete page) ....
So, thanks again and I'll will wait ;-)

Dublin Drupaller’s picture

have updated the front_page.module with the added REDIRECT for anonymous users option...sorry it took so long to implement.

Works with drupal 4.6. Click through to the CVS repository for the latest version is you're downloading today (18th May) otherwise the normal link from the downloads section will update in a day or two.

http://cvs.drupal.org/viewcvs/drupal/contributions/modules/front/

cheers

Dub