Hi, Firstly well done on a fantastic module. I do ahve a few questions though, and it is probably me missing something obvious.

1. If a user/visitor is not logged in, they get a message:

Please be sure to login on our site to have your preferences saved. If you do not have an account please register, and then you will be able to save your preferences.

Is there anyway to disable this? And pos. at the same time disable moving boxes around until a user does log in?

2. When I cluck on the settings icon in a block (see ttached image) I get empty boxes appear below the icon. They do not appear to do anything. What should they do?

3. Is there a reset to default anywhere? For example, I have logged in, changed things around, but then decide I like it as default. Is there a simple reset to default link anywhere?

Cheers,
Nick

CommentFileSizeAuthor
homebox1.png14.76 KBnickbits

Comments

nickbits’s picture

Ignore point 2 above, for some reason the colours were not showing up.

jchatard’s picture

Hi nickbits,

1. Simply remove permission for anonymous users (but this leads to have 403), but there is no way to disable JS from the module. BUT you can do it at the theme level if you want.
2. Ok
3. Well not for now, but this would be a really easy feature to add. Please feel free to submit a patch. I do not have that much time now.

Jérémy

garyh’s picture

+1 on the reset to original configuration

nickbits’s picture

Ji jchatard,

Okay, at least I know it can be done. Will see if I can find the time to have a crack at it.

Regards,
Nick

nickbits’s picture

Hi All,

Just for reference, I have added to my theme a way to disable the "Add Content" and disabling the moving of boxes around if the user is not logged in. Here is what I did:

  1. Copy homebox.tpl.php from the modules directory to your theme's directory.
  2. Insert between lines 12 and 13: <?php if (user_is_logged_in()): ?>
  3. Insert immediatly after line 21 - endif;

This removed the "Add Content" link for users not logged in. However the JavaScript is still loaded which is wasteful if we are not using it, but also this allows boxes to be moved around. To disable this simply add the following to your pre-process function in your template.php file:

if (!user_is_logged_in()){
	$js = drupal_add_js(NULL, NULL, 'header'); //get header js files in an array
	unset($js['module']['sites/default/modules/homebox/homebox.js']); //unset default drupal jquery js
	$vars['scripts'] = drupal_get_js('header', $js); //create script tags and set them to $scripts
/}

Hope this helps some of you.
Nick

Babalu’s picture

thank you nickbits. i would be great to have a option at the homebox settings where i can disable this for anonymous users and to disable the message: "Please be sure to....."

Babalu’s picture

i think it would be better when the message "Please be sure to ...." only will be displayed if the anonymous user changes a setting at the home box

brianV’s picture

Status: Active » Closed (fixed)

Homebox earlier than 6.x-3.x is no longer supported.