I have a 'help' block that shows up for users. However, I would like for it to 'go away' after the user has logged in x times - or something along those lines.

I would like to use php visibility settings, but I also need to limit it to a specific page.

Thanks.

Comments

francort’s picture

In the first place, you would need to count the times that a user has logged in.
I've seen a module under development which maybe can do that: http://drupal.org/project/user_stats
If you have that module, you can do something for visibility settings:

$max_times_logged_in = 10;// change this
$my_page = "custom-page-with-a-good-name";//name of the page in which you want to show the block, change this too

$times_logged_in  = variable_get('user_stats_count_logins', TRUE);

//if the times that the user has logged in is greater than the times you have set, the block would appear
if(!($max_times_logged_in > $times_logged_in)) return false;
//To show it just if it is the page you want
if( $_GET['q'] == $my_page || drupal_get_path_alias($_GET['q']) == $my_page ) return true;

return false;

It would be something like this, but i haven't tested it...
The module doesn't exist for drupal 4.7 :(