I'd lie a simpler interface for the shoutbox. It's a great module, but I'd like to put the web page and username settings in the user profile. Perhaps make the username automatic as well?

CommentFileSizeAuthor
#3 shoutbox.module32.83 KBbigbman

Comments

Moofed’s picture

I second this feature. I know you already know about from http://drupal.org/node/29312 but I think it is a very important feature to have.

benshell’s picture

Priority: Critical » Normal

I'll try to get to this soon, but for now I'm marking this as "normal", not "critical".

bigbman’s picture

StatusFileSize
new32.83 KB

Benshell, I found a way to do this for what I neededI added a checkbox (called simple ui) in the settings for the module, which sets the url to the user's profile page, and hides the username and url fields. So far, it works great! I've attached the module if anyone's interested.

poisonpill’s picture

I can't seem to get your module to work. I copy it into my module dir and shoutbox behaves the same as before.

I'd really like it if only authenticated users can post with their authenticated user name in the shoutbox.

poisonpill’s picture

err nevermind, got it. works great, thanks!

tobyspark’s picture

Version: 4.6.x-1.x-dev » 4.7.x-1.x-dev

Definately interested - Is there a 4.7 revision?

I've spent a little time comparing this 4.6 fork and the vanilla 4.7 module, I can see roughly whats going on, but I've never coded a line of php in my life and the priority now is the site dev as a whole - shame. I think the update would be relatively trivial for somebody au fait with php, hope it happens soon =]

Toby

ricmadeira’s picture

And here's another user "shouting" for this feature. It would really be great!

charly’s picture

And another one! I had sent you a patch some time ago, i see you didnt take care of it.
Now, the shoutbox module seems to have changed a lot, no providing an inline feature anymore... I hope it will grow well, including theses features a lot of users request....

Thanks

Charly

charly’s picture

For users wanting to use automaticaly the username as nick on the shoutbox and disabling the nickname form when user are logged in:

edit shoutbox.module (version 4.7) and replace the bloc of code from the line 173 (just before $default_nick declaration) to the line juste before the "$form['message'] = array(" by this bloc:

if ($GLOBALS['user']->name != "") {
$default_nick = $GLOBALS['user']->name;
$logged=1;
}
else {

$default_nick = t('Your Name/Nick');
}

$default_msg = t('Enter Message');
$default_url = t('Your Website URL');

$form = '';

if (!$logged) {
$form['nick'] = array(
'#type' => 'textfield',
'#attributes' => array('onfocus' => 'javascript: if (this.value == "' . $default_nick . '") { this.value = "" };'),
'#default_value' => $default_nick,
'#size' => 15,
'#maxlength' => 30,
);
}
else {
$form['nick'] = array(
'#type' => 'hidden',
'#default_value' => $default_nick,
);
}

That should work. I didnt really test it...
You can still come back to the original bloc of code:

$default_nick = t('Your Name/Nick');
$default_msg = t('Enter Message');
$default_url = t('Your Website URL');

$form = '';

$form['nick'] = array(
'#type' => 'textfield',
'#attributes' => array('onfocus' => 'javascript: if (this.value == "' . $default_nick . '") { this.value = "" };'),
'#default_value' => $default_nick,
'#size' => 15,
'#maxlength' => 30,
);

Charly

dsiminiuk’s picture

I noticed this too and I hacked my way through the module code to remove the URL entry box and force the username to be the $name from the user info array. It is not pretty and I am too embarrased to share the code here because I know nothing really of PHP. It does work however despite the hatchet job I did and I did break the timestamp in doing so. I'll be trying to reverse that damage back out.

I would be most interested in a proper release with the ability to force the registered username.

I would also like the shout box to have a "view" element in the access control so that I can easily hide this module from anonymous users. There is probably another way to do this but I haven't figured it out yet.

disterics’s picture

Status: Active » Fixed

This is in the 4.7.x and upward versions.

disterics’s picture

Status: Fixed » Closed (fixed)