Active
Project:
Ajax Login/Register
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2010 at 23:54 UTC
Updated:
12 Dec 2011 at 05:03 UTC
A request, to make this very useful module more customizable, on how to avoid the display of "Welcome: ..." message.
Now there's no way to do it without modifying the module, because it is blocked in a non themable function, I can't neither use css to display none:
function ajax_get_login_block_content() {
global $user;
$user_uri = theme('my_account_link', array());
$login_uri = theme('user_login_link', array(), array());
$register_uri = theme('user_register_link', array(), array());
$logout_uri = theme('user_logout_link', array());
if (user_is_anonymous()){
$block_content = "<div id='ajax_register_block_anonymous'>". $login_uri ."<br/>". $register_uri ."</div>";
return $block_content;
}
else{
$block_content = "<div id='ajax_register_block_authenticated'><p>".t("Welcome: ")."<span class='ajax_register_user_name'>". theme('username', $user) ."</span></p>". $user_uri ."<br/>". $logout_uri ."</div>";
return $block_content;
}
}
Comments
Comment #1
BrianLewisDesign commented/*Use CSS*/
#first-time { width:0; height:0; visibility:hidden; overflow:hidden; }
Comment #2
appmux commentedDon't use that CSS, it will hide welcome message from viewer but not from the search crawlers... and you don't want 'Welcome to your new Drupal website!' text appear under search results...
Unwelcome module allows you to remove the welcome message clean way, without any kind of hacks. Download-enable and that's it!
Comment #3
appmux commentedThere's an update available for the Unwelcome module, which now enables promoted content to show up on the home page when available. Now it works even better!