In my Drupal work for the Swedish Computer Society I was asked to make some changes and to fix a bug in the Front Page module. The list of changes needed.

1. Set a default value for landing zone if no front_page variables are filled. If the module is turned on
but empty in certain fields then a redirection loop will occur.

2. Add a time based front page. If a member is away for the set timeperiod then they will get a one time only frontpage where they will be updated with the latest news and there after get the default frontpage.

3. A general clean up of the code for readbility and ease of development.

Here's a patch and then a completed module in a following comment

CommentFileSizeAuthor
#1 front_page_new.module14.99 KBcarlmcdade
frontpage_01.patch16.96 KBcarlmcdade

Comments

carlmcdade’s picture

StatusFileSize
new14.99 KB

Here's a completed file ready to use.

Dublin Drupaller’s picture

thanks hiveminds...looks good..I'll have a quick look during the week and test it before comitting..

Dub

Dublin Drupaller’s picture

Quick one:

I've tweaked your patch a bit to be a bit more globally applicable. I have adapted it to display a special Mission style notice rather than a full page. I think that makes more sense and might be more globally useful to other Drupallers.

I've also updated the module with a "front page by role type" option. Which allows site admins to specify a custom front page based on role.

Here's a forum thread I've started to open it up to the community at large

hope that's okay.

cheers

Dub

carlmcdade’s picture

Actually, I was hoping that Nedjo's improvements would be committed because they are ones that we also need in the future.

Your changes are okay by me since we will be using our custom version. You might want to get more input though because after asking a few of the sites moderaters and users it was decided that full page HTML was needed rather than just a section. This may not be true for all but it was the outcome of our little group poll. Perhaps making it switchable in the admin?

Dublin Drupaller’s picture

I went a step further with nedjo's suggested patch (assume you're talking about the front page by role) which was just a redirect by role, to be more flexible.

re: special notice for inactive users.

I think it won't be too difficult to add in a "make this a full page" type checkbox, so the users have the option.

cheers

dub

Dublin Drupaller’s picture

Status: Active » Closed (fixed)